Hi Rebecca,
Thanks much for this awesome project, couldn't find anything similar any where.
I know this project has been created 9 years ago, however, a client want's to move to Plug n Pay Payments.
Based on the request, it is supposed to integrate with Ubercart on Drupal 7.
I know Ubercart is old and Drupal 7 will be EOL soon but just trying to meet client needs in the present.
I saw that Plug n Pay, now has a Smart Screens V2 hosted gateway forms to enable integration into their services.
Is it possible to provide some guidance on this?
Thanks much for the response.
I have changed the callback function arguments:
/**
* Callback function to update the second select field.
*/
function custom_text_to_select_get_update_max_options(array &$form, FormStateInterface $form_state) {
// Return the updated second select field to replace its content via AJAX
return $form['field_property_sale_price_value'];
}
I am reading the through the document you sent.
In my case, I think I'm trying to return a Render Array as I have set up in my code.
At load time, it seems to work through the switch statement and the update works, but when a change happens I get the same error.
Right now I'm just lost. Even looking at the example my code looks similar.
Is the problem now what I am returning?
Found the issue.
Solution:
I had to assign each view a unique ID, especially when a page has more than one flexbox slider.
It seems they both try to fallback to the same default ID.
shockwave08 → created an issue.
Thanks much for the response..
I know it's difficult having to keep up with these isues.
So I'm using Basic Auth now.
Set the username and password to solr:SolrRocks..
Same user/pass in the security.json.
Using this tool to create encrypt the passwords.
I am able to sign into the Solr Admin UI with the user/Pass So I know it works..
I also went ahead and set these op:
SOLR_AUTH_TYPE="basic"
SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
Errors Shown under logging in the Solr UI
The errors are basically the same but now they say
Unauthorized
for the same paths.
So the Apache Solr Server I set up under Search API is still unavailable.
Is there something I'm missing.
ShockWave08 → created an issue.
This is also an issue in 3.0.5 on Drupal 9.5.11.
I can only choose "HTML5 Video Player" on the Manage display tab, only if I had choosen "Video embed" from the Manage form display tab.
If I need to upload a video and choose "Video upload" from the Manage form display tab, the only options available on the Manage display is "HTML5 Video Player Compact" or "URL to Video".
I got around by choosing "Video upload" from the Manage form display tab, uploading the videos I need and then changing from "Video upload" to "Video embed" and then choosing "HTML5 Video Player" from the Manage display tab.
This is not a long term solution, because I can not subject the client to this back and forth.
Hey @Japan
How would you rewrite this code for D7?
If you don't mind please.
Thanks so much bro.
I had figured it out but this is the exact thing I did.
This will be gold to someone with the same problem in the future.
It's basically a small demo of vacation homes online.
Content Type 1 (Lets call it Property)
- The content type Property has those fields I mentioned. (Title, pool, backyard, fenced, rates(reference)).
- Each Property has different features (pool, backyard, fenced, rates(reference)).
Content Type 2 (Lets Call it Rates)
- This content type is referenced by Content type 1
- Contains fields such as time:
- Time of year (summer, winter, fall)
- price
When creating a new content for Content Type 1 it would look like:
- Title - Glass House
- Pool - Yes
- Backyard - No
- Fenced - Yes
- Rates(referenced from Content Type 2)
- Summer - $111
- Winter - $222
Problem
- Whenever I create a View of those Properties
- I can't filter Min or Max using the Rates friends in the Content Type 1 (Property).
- After much reading, I figured I would have to create a relationship using the Price field in Content Type 2 (Rates).
- But the relationship field shows me no fields from the Content Type 2( Rates).
- I was just really wanted to know is there any other way to get the filters working.
I was just hoping for advice or some resource similar to my situation.
I'm really just trying to figure out how to filter entity references in views.
I am doing a site to display properties.
The properties each have a price.
I would like to add an Icon near the price, which I could click and a pop up would appear with the prices in different currencies.
Drupal has currency conversion modules but paid.
I am just a newbie, so I wanted to try first with a currency conversion API online.
I am successfully retrieving the curriencies I need from the API, now I just gotta figure out how will I get it to the display on each property page.
I was really hoping to get advice from the community om what would be the best content type to use.
The data is basically an associative array.
Initially, my mind was on setting up a List text but i'm still not sure yet.
Thanks much Jaypan..
Now I'm not sure if to create a new question on here but I gotta alter or completely change the code for a Drupal 7 version of a sister site.
Been researching for a while about how Drupal 7 internals work.
Can most of the code be reused or I'd have to start over completely?
How would you do it?
Views
- Whenever I install the module the views created for the content type breaks
- Clicking on a field under the Fields section, doesn't open up the dialog box for editing that field
- Even if, I comment out every piece of code in the module, it
Line breaks on change - ($image_field_names = ['field_image'];)
- The field machine name for the images is "field_photos", whenever I change it to this the whole site breaks.
- TypeError: Argument 1 passed to Drupal\Core\Routing\RequestContext::fromRequest() must be an instance of Symfony\Component\HttpFoundation\Request, null given,
-
Drupal\Core\Routing\RequestContext->fromRequest(NULL)
- As it's an array I try doing this:
- ($image_field_names = ['field_image', 'field_photos'])
- but nothing changes
To be honest, I may be looking at it completely wrong..
Any tips?
Thanks much for the example.. I spent all day looking for examples like these.
I was developing an algorithm myself but no where close to this.
Namespaces
- Currently, I had these namespaces. Should I keep any?
-
use Drupal\Core\Entity\Query\QueryInterface;
-
use Drupal\Core\Entity\EntityInterface;
-
use Drupal\node\Entity\Node;
- use Drupal\Core\Entity\EntityTypeManager;
-
Thanks much for your response @Jaypan.
- I guess I'd have to create a mymodule.install
- Then carry the implementation over in the hook_update_N()
- Then figure out the best N to use
Drush
- Interesting..
- Seems a lil more trouble but I've already taken the module road.
- If anything, I'll come back to it.
Entity over Node
- I guess it's a reference to an Image Entity. Field type is Image.
- How then would I get the node title to add to the Image ALT for the specific entity?
- Would I have to write join queries statements?
Load() over LoadMultiple
- Thanks much.. Makes much sense.
Thanks soo much for your advice.
I was able to add fields and styles to get a similar look to what I intended.
The default User name and Password comes with; username, email, password and password confirmation.
Problem:
- I need to add placeholders to each of the default fields. There is no option to add any in the manage fields or display settings.
- using hook_form_alter(), I was able to add place holders to the email and username.
-
Using $form['account']['mail'] and $form['account']['name']
-
- However, I'm met with difficulty for the Password and Confirm Password fields
- Using $form['account']['pass'], I am able to detect the Confirm Password field but cannot apply a placeholder.
Any advice on this?
Also, can you alter the User name and password in the theme or core level to include more fields.
I can add more fields using this code but It don't come up in mange fields. So I'm not sure if this is a viable solution for production:
Any advice would go a long way.
$form['account']['fname'] = array(
'#type' => 'textfield',
'#weight' => 7,
'#markup' => t('Testing'),
'#maxlength' => 255,
'#required' => FALSE,
);
$form['account']['fname']['#attributes']['placeholder'] = t('First Name*');
The order in which the array of options was wrong.
They had to be flipped.
e.g
// Create an array of options
$min_price_options = ['$100,000' => 100000, '$250,000' => 250000, '$500,000' => 500000, '$1,000,000' => 1000000];
// Create an array of options
$min_price_options = [100000 => '$100,000', 250000 => '$250,000', 500000 => '$500,000', 10000000 => '$1,000,000'];
Should be:
Value => "name"