I'm trying to add products to the cart using an url, but I can't figure out how to set a customField (e.g. an boolean).
URL Example:
/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&customPlugin[20][textinput][comment]=&customPrice[0][24]=54&quantity[]=1&option=com_virtuemart&view=cart&virtuemart_product_id[]=3
The custom field:
(http://img80.imageshack.us/img80/1198/customprice0.th.jpg) (http://imageshack.us/photo/my-images/80/customprice0.jpg/)
The product:
(http://img193.imageshack.us/img193/5492/customprice1.th.jpg) (http://imageshack.us/photo/my-images/193/customprice1.jpg/)
In this case it's about &customPrice[0][24]=54
- 0 is the product of course (first in row, i'm adding multiple at once)
- 24 is the custom field id (a boolean)
- 54 seems to be yes (and 55 for example will be no)
My problem is with the values 54/55.. these seem to change (from time to time or when other custom field are added?), so I can't rely on them.
So my question basically is: Is there another reliable way to set custom field using URL parameters?
Hi, thanks for the useful link.
Since I had many problems due to SEF settings I did use the form post. It should be better
Now I am mobile and I can't find the link to the thread where it's explained. Next post...
Do you know how do the customPlugin and customPrice fields work?
I mean, in my case they don't have the same field id: customPlugin[19] and customPrice[13] with value="19"
The cart only add the product when I use those fields in that way... But I can't understand from where the 13 value is coming.
I can't find anything to