Hi,
I need to put on an array the ids of products that come from the cart and then to call array and associate it [item_name] paypal.
example: [item_name] = 2,3,4,5, ...
or how to add more products into paypal variables
Thanks a lot
Cornelio
Hi Cornelio,
In the PayPal redirect action the "item_name" field accepts an array, you may also turn the debug setting in the PayPal action to check how the data provided is passed to PayPal.
From the PayPal redirect action:
The field name holding the item's title, if the field value is an array then multiple items will be shown on the PayPal page, and both the amount and quantity fields should be of type array too. also for this to work, the Command should be set to '_cart' and you should add upload="1" to the extra params box.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
i tryed with your suggestion and not any array as a result see attachments.
Best Regard
Cornelio
Hi Cornelio,
I can't work out what your code examples are supposed to do. The PHP one has <form> tags with no action URL so that will do nothing useful.
You need to make the Item name field, Amount field and Quantity inputs from your form all into arrays e.g. name=foto[], name=price[] name=qty[] and you need to validate that all three values are completed for each item.
You can them put these names in the PayPal redirect action - without the []
Note that you have a typo in the notify_url entry and the upload entry is missing the quotes - it should be upload="1"
Bob
Hi Cornelio,
You have "id_foto" in the "item_name" field, this field must supply an array of values if you want to send multiple values to PayPal, the way to do this is to change the field name to "id_foto[]", the same must be done with the amount and quantity fields.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks Max, but this is the first thing I tried, but without success.
if it puts [] not me carrying values of item_name paypal
Regards
Cornelio
Hi Cornelio,
The PayPal settings has "id_foto" in the "item_name" field, and so the fields named should be "id_foto[]", but you have a, b, c...ect, this will not work of course.
The JavaScript code for serializing data is also not helpful here and is not needed.
You need a field like this:
<input type="text" name="id_foto[]" value="1" />
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.