cannot find variant' error on new custom variant field

1 0 0

I've been trying to manually add a custom field so that customers can input text for a personalisation.


I'm a complete newbie. Not even sure if you are supposed to mess around like this. 


I have added a new template and have created a main-custom-product.liquid where I have added the following code: 


<label for="custom-personalistion">Enter Personalisation</label>

<input type="text" id="custom-personalistion" form="{{product_form_id}}" name="properties[Personalisation]"/>


I can see the new field on my storefront but if I try to use it I get a 'cannot find variant' error. 


I can see in my theme (Craft) that the new variant is not within the variant block. 


I should state that I am following a You Tube video on how to do this and the code around my 'variant-picker' in the main-custom-product.liquid file is empty in comparison to the You Tube video. I'm not sure if this could be the reason? 



Replies 0 (0)