Liquid, JavaScript, themes, sales channels
Hi All, would really appreciate someones help!
I've been having issues creating templates for different product types, that require various minimum quantities and increments,
I've set the overall default to 12 in the main.product file with the below code, however a few products require different volumes, 6 packs of beer etc, 3 bottles of rum
How can I set these values at the product template level? Then assign templates to product types rather than the main file?
main.product-
<input class="quantity__input"
type="number"
name="quantity"
id="Quantity-{{ section.id }}"
min="12"
value="12"
step="12"
form="{{ product_form_id }}"
>
Solved! Go to the solution
This is an accepted solution.
****** UPDATED********
I was able to get it working now using a plugin that adds metafields for non flow stores, I imagine it's a long way round, but it's working for now!
Thank you for your help,
I've tried to define and call the metafield to replace the min/value/step in the theme files, however I still have no luck.
If I input a single value, it works fine, but seemingly not the product metafield,
Is there a step I may have missed?
Thanks
Hello @Ricky_Strike ,
Add a metafield definition for products named 'Product min quantity' or whatever you want.
After this you will find with every product there is an option available to define the value.
Now in next step call that metafield e.g.
min="{{ metafield }} "
value="{{ metafield }} "
step="{{ metafield }} "
Thanks
1) Add metafield for product ( Settings -> metafield )
For more details follow the URL
https://help.shopify.com/en/manual/shopify-plus/flow2/reference/actions/add-product-metafield
2) Edit theme file and call metafield ( in place of min, value and step )
This is an accepted solution.
****** UPDATED********
I was able to get it working now using a plugin that adds metafields for non flow stores, I imagine it's a long way round, but it's working for now!
Thank you for your help,
I've tried to define and call the metafield to replace the min/value/step in the theme files, however I still have no luck.
If I input a single value, it works fine, but seemingly not the product metafield,
Is there a step I may have missed?
Thanks
User | RANK |
---|---|
33 | |
25 | |
17 | |
9 | |
9 |
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023