Tag Cloud for this topic:
accept-charset action button cart choices code covers desired don ejc enable enabled example explains field form format handle help image indeed input item key menu method names note option page post product return screen select setting settings system target text topic type url utf-8 variable vice-versa wish working
Hi, my product inlcudes both variants and variations and i wish to construct a URL that will pass all the relevant choices through.
What is the format for passing variations?
I am using this format for variants which works well:
However I'm not sure how to pass variations through in the URL. My variations are 'text', 'colour' and 'font'.
POSTED ON: May 6, 2012 @ 02:09 GMT -7
This help page subsection covers that topic to some extent:
This help page explains Variations and Variants configuration:
Our system can handle GET and POST variables interchangeably, so anything passed via a form field/menu can also be passed via URL parameter with the same variable name, and vice-versa -- e.g., this is our typical Cart button code for an item using Variations:
<form action="https://www.e-junkie.com/ecom/gb.php?c=cart&i=XXXXXX&cl=YYYYYY&ejc=2" target="ej_ejc" method="POST" accept-charset="UTF-8">
<input type="hidden" name="on0" value="Size"/>
...but you could also pass a predetermined Size parameter using Variations via this URL:
Note that Variations parameters must be passed in pairs (on0/os0, on1/os1, on2/os2) but the values passed for those names can otherwise be completely arbitrary -- i.e., they don't need to match names/values specified in the product's Define Variations screen, and indeed you don't even need to enable "Variations which tell more..." in the product's settings (that setting and Define Variations are only used to auto-generate button code with the desired menus/fields).
However, if you're using Variants (as distinct from Variations), that must be enabled and configured in the product settings, and any Variants values (o1, o2, o3) passed via form menu or URL parameter must exactly match values you have configured in the product's Define Variants screen.
POSTED ON: May 6, 2012 @ 17:57 GMT -7
MODIFIED ON: May 6, 2012 @ 18:01 GMT -7
Hi, Thanks for this.
It was the need to pass both the name and value that i had not realised - i've got it working now.
The key bit i could not find was this example:
POSTED ON: May 6, 2012 @ 22:40 GMT -7
You must be logged in to make a post. Please click here to login.