3 / 7
Aug 2010

I want to pre-fill the quantity field



ie show a quantity of 2 automatically instead of a blank field where the customer has to type in the number



How do I do this?



Thanks



Denis

  • created

    Aug '10
  • last reply

    Aug '10
  • 6

    replies

  • 1.2k

    views

  • 2

    users

  • 6

    links

Could you provide the URL of a page where this is happening, so we could examine that? Quantity shown in the cart should never be blank; it always defaults to 1 unless an &quantity= parameter in the button URL specifies otherwise.

Oh, now I see. It appears you're using customized button code to let buyers enter a quantity on your page before they add an item to their cart. Normally, buyers would edit quantity in the cart itself after they add an item, so that's where I got confused. Adding a value="" attribute to your quantity <input> tag would prefill that field with whatever value you specify, e.g.:



<input type="text" name="quantity" size="2" value="2">