PlantScraper: Instruction for Variant Naming

To make sure our custom code recognises your quantity options correctly, please include one of the following words in the variant name whenever you create or edit product options that represent quantities:

Allowed trigger words:

  • quantity

  • amount

  • pack

  • bags

  • units

Our system uses a rule that looks for these specific words in the option name:


{%- if option_name_downcase contains 'quantity' or option_name_downcase contains 'amount' or option_name_downcase contains 'pack' or option_name_downcase contains 'bags' or option_name_downcase contains 'units' -%} {%- assign is_qty_option = true -%} {%- endif -%}

This ensures that options like:

  • “Choose Your Amount”

  • “Select Your Quantity”

  • “How many 8.5L bags?”

  • “Pick Your Quantity”

  • “Choose Packaging”

are all correctly detected as quantity selectors.

Important:
Going forward, please always include at least one of these trigger words (quantity, amount, pack, bags, or units) in your quantity option titles.
If you use a different phrase without these words, the code will not recognise it as a quantity selector and it may not work as expected.