I have some products that have variations called "Additional Points", and the customer can select 0,1,2,3,4.
When the user has 1,2,3 or 4 selected, i would like to make a required text box appear on the cart page to enter information about these additional points.
So far, I have achieved this by editing;
This works fine, and when the product with SKU 'VARIENT-SKU' is in the cart, it appears and works perfectly. However I have 50+ of these variants, and checking each lineitem against a list of 50+ SKU's is a silly way to do this.
I believe the simplest way to do this is, is to give each variant a meta field. e.g. - product.metafields.additional-info.additional-points.yes and add the input box whenever this metafield is detected.
However, products are added as lineitems in the cart, so dont have the metafields, so assuming i have the productID or SKU from the lineitem in the cart page, how do I retrieve the product metafields?
Side note: I looked at option of sending the metafield as a lineitem.property but due to how out products are displayed using grouped/bundle products this isn't an option.