Hi I have a configurable product that can come in 1000's of options. I know you can send data in a form like this to the cart:
<form action="http://your.shopify.url/cart/add" method="post">
<input type="hidden" name="id" value="VARIANT-ID" />
<input type="hidden" name="return_to" value="back" />
<input type="submit" value="BUY NOW" />
</form>
But instead of
<input type="hidden" name="id" value="VARIANT-ID" />
I would like to add the fields:
<input type="hidden" name=“price” value=“300” />
<input type="hidden" name=“info” value=“Bird fabric with black wood” />
<input type="hidden" name=“image” value=“imageOfProduct.png” />
and send this information to the cart. Can this be done? If not is there a way to do this? Thanks!
Update:
May be I’m missing something or maybe my question was not clear.
I have this code (a buy button) on my web page just plain HTML:
<form action="http://your.shopify.url/cart/add" method="post">
<input type="hidden" name="id" value="VARIANT-ID" />
<input type="hidden" name="price" value="300" />
<input type="hidden" name="info" value="Bird fabric with black wood" />
<input type="hidden" name="image" value="imageOfProduct.png" />
<input type="hidden" name="return_to" value="back" />
<input type="submit" value="BUY NOW" />
</form>
You say to make it work I should add to the product.liquid page:
<input type="hidden" name="properties[price]" id="price" value="300" />
<input type="hidden" name="properties[info]" id="info" value="Bird fabric with black wood" />
<input type="hidden" name="properties[image]" id=“image” value=“image.png” />
I’m fairly sure the value should not be on the product.liquid page?
Thanks for your help!
Open
product.liquid
and after<form action="http://your.shopify.url/cart/add" method="post">
but before the submit button add