Menu
Contact Us

E-junkie Guide

Tips and tools for beginners and experts alike.

  • E-junkie Help
  • Let buyer enter quantity before clicking Add to Cart

Normally, you would just enable Let buyer edit quantity in each product's settings, so as soon as they add an item to their cart, they can enter their preferred quantity then or anytime before they proceed to checkout.

However, if you prefer to provide a quantity field next to your product's Add to Cart button, so the buyer can enter their quantity before they click the button, you can do that with a bit of custom HTML coding. If your product already uses Variations or Variants, you can simply add an <input type="text" name="quantity"> field to the standard button code we generate for such products, like so:

<form action="https://www.e-junkie.com/ecom/gb.php?c=cart&ejc=2&cl=XXXXXX&i=YYYYYY" method="POST" target="ejejcsingle" accept-charset="UTF-8">
<input type="hidden" name="on0" value="Size">
Color:<br>
<select name="os0">
<option value="Small">Small</option>
<option value="Large">Large</option>
</select><br>
Quantity:<br>
<input type="text" name="quantity" size="3" value="1"><br>

<input type="image" src="https://www.e-junkie.com/ej/ej_add_to_cart.gif" border="0"  alt="Add to Cart" class="ec_ejc_thkbx" onClick="return EJEJC_lc(this.parentNode);">
</form>

For products that don't use Variations/Variants, just use the Add to Cart code below, replacing the XXXXXX with your E-junkie Client ID (you can find this in Seller Admin > View Account Summary), and replacing the YYYYYY with the Item Number from the relevant product's settings:

<form action="https://www.e-junkie.com/ecom/gb.php?c=cart&ejc=2&cl=XXXXXX&i=YYYYYY" method="POST" target="ejejcsingle" accept-charset="UTF-8">
Quantity:<br>
<input type="text" name="quantity" size="3" value="1"><br>
<input type="image" src="https://www.e-junkie.com/ej/ej_add_to_cart.gif" border="0"  alt="Add to Cart" class="ec_ejc_thkbx" onClick="return EJEJC_lc(this.parentNode);">
</form>

If you prefer to show a quantity menu (rather than a text field), you'd use the version below; you can add as many <option value...etc.> lines as you need, and the text shown to buyers for each menu item (e.g. One, Two, Three in this example) can be customized to say anything you wish:

<form action="https://www.e-junkie.com/ecom/gb.php?c=cart&ejc=2&cl=XXXXXX&i=YYYYYY" method="POST" target="ejejcsingle" accept-charset="UTF-8">
Quantity:<br>
<select name="quantity">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<br>
<input type="image" src="https://www.e-junkie.com/ej/ej_add_to_cart.gif" border="0"  alt="Add to Cart" class="ec_ejc_thkbx" onClick="return EJEJC_lc(this.parentNode);">
</form>

Was this article helpful?
Yes, thanks!
Not really

Can't find what you're looking for?

Contact Us