|
103f035f1a17774ab98893d030725906
|
Add to Cart not workingby joey marchy - Member - 04:09PM, Aug 10, 2006 |
|
If I try to add to my cart, I get this error: http://pinhero.myshopify.com/cart/add I have been looking at the source code of some other shopify sites and it appears I am missing the hidden form field that contains the id of the product to add to the cart: [input type=”hidden” name=”id” value=”42” id=”radio_42” /] I have enabled the test payment gateway, set up shipping rates, tax, etc. What am I missing? Thank you! |
|
|
Yeah, you are missing any kind of input field with the id of the product/variant that should be added to your cart. Within your form, create a new input with name="id"and value="{{variant.id}}" where {{variant.id}} usually comes from an iteration through all of your product’s variants.
If you have only one variant per product, you can use a similar syntax being used in most of our standard themes:
If you have more than one variant per product, you might want to check if it’s only one variant or more and if there are more render a combobox or a radio button selection of all your variants.
Also you should move the submit button out of the first
|
daniel
jaded Pixel
08:51PM, Aug 10, 2006