Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi all, I am setting up a wholesale website using Trade 15.0 theme.
I have been successful in controlling the product minimum order quantities by using the below code - referencing the products metafields.
I have implemented this on the main-product.liquid page and the modial when 'choose options' is opened (quantity-input.liquid). However I can't seem to make it function on the collection page where the featured collection section is used.
I have attached a screenshot here of where it's not working. Can anyone who is familiar with this theme advise if they are aware of where the quantity__input for that section might be?
My code that's working:
{% assign min_ws_quantity = product.metafields.custom.minimum-quantity %}
{% if min_ws_quantity == blank %}
{% assign min_ws_quntity = 1 %}
{% endif %}
<input
class="quantity__input"
data-quantity-variant-id="{{ variant.id }}"
type="number"
name="updates[{{ variant_id }}]"
{% # theme-check-disable %}
value="{{ cart | item_count_for_variant: variant.id }}"
data-cart-quantity="{{ cart | item_count_for_variant: variant.id }}"
min="{{ min }}"
data-min="{{ min_ws_quantity }}"
{% if variant.quantity_rule.max != null %}
max="{{ variant.quantity_rule.max }}"
{% endif %}
step="{{ variant.quantity_rule.increment }}"
{% # theme-check-enable %}
aria-label="{{ 'products.product.quantity.input_label' | t: product: variant.title | escape }}"
id="Quantity-{{ variant.id }}"
data-index="{{ variant.id }}"
>
Hi,
Have you used Javascript for functionality?
Hi there, I have since discovered that the input there is controlled by Javascript.
However the js is too complicated and outside of my knowledge.
Do you have any advice of suggestions on how to reference the metafields and have the functionality work in the same way as the liquid verioin?
Thank you!
Where exactly is it in the JS files? I'm running to the exact same issue on Trade theme. Cart and Product Page works but not on the main collections page.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025