Hi everyone,
I am tearing my hair out with a customer’s requirement on the quantity sector on the product page.
He doesn’t want to have to deal with options and variants.
If the price of the item is less than €200 => Display a drop down with quantities that are multiples of 6: minimum 6, if stock equal to or greater than 6 and maximum depending on the LP quantity.
If the price of the item is greater than €200 => Display a classic quantity selector, minimum 1, multiple of 1, maximum quantity depending on the LP quantity.
In our case, 1 item = 1 variant. No option. The product is the default variant.
The condition greater than or equal to €200 is to be applied to the variant price.
Available quantity can be found in metafields => Metafield: specs.quantity_LP [number_integer]
I had found the MultiVariants plugin but they can’t adapt the conditions.
If anyone has any advice, a plugin to advise to work on this piece of code, I’m all ears!
{%- when 'quantity_selector' -%}
{%- if block.settings.show_label -%}
{{ 'product.form.quantity' | t }}:
{%- endif -%}
{%- assign quantity_minus_one = line_item.quantity | minus: 1 -%}