Tweak Library
Note: We have updated our folder structure in Neto 6 and this has not been updated on all tweaks yet. More info.

Quantity Field

A quantity field, so that the user can choose their desired quantity before adding to cart.

Industries

  • Computers & Electronics
  • Alcohol
  • Arts & Crafts
  • Books & Stationary
  • Food & Beverages
  • Wholesale

Wireframe

Yotube Button

Coding Instructions

Open thumbs/products/template.html, replace <input type="hidden" id="qty[@rndm@][@SKU@]" name="qty[@rndm@][@SKU@]" value="1" class="input-tiny"> with the following block of code:

[%if [@extra@] eq '' AND ![@has_child@] AND [@store_quantity@] > 0%]
    <input type="text" id="qty[@rndm@][@sku@]" name="qty[@rndm@][@sku@]" value="1" placeholder="Qty" class="form-control">
[%else%]
    <input type="hidden" id="qty[@rndm@][@sku@]" name="qty[@rndm@][@sku@]" value="1" placeholder="Qty" class="input-tiny">
[%/if%]

Step 2. Update the quantity field code for the list view thumb template

Open thumbs/products/list.template.html, replace <input type="hidden" id="qty[@rndm@][@sku@]" name="qty[@rndm@][@sku@]" value="1" placeholder="Qty" class="input-tiny"> with the following block of code:

[%if [@extra@] eq '' AND ![@has_child@] AND [@store_quantity@] > 0%]
    <input type="text" id="qty[@rndm@][@sku@]" name="qty[@rndm@][@sku@]" value="1" placeholder="Qty" class="form-control">
[%else%]
    <input type="hidden" id="qty[@rndm@][@sku@]" name="qty[@rndm@][@sku@]" value="1" placeholder="Qty" class="input-tiny">
[%/if%]

Final Result

Download Files

Download Files