Page 1 of 1

Quantity box and shopping cart

Posted: Sun Aug 24, 2014 7:37 pm
by mai
Using safari as browser the quantity box and shopping cart are not adjusting the width if a customer wants to order a large number of products. It is working ok with the other browsers. Anybody any idea how to fix this?

Re: Quantity box and shopping cart

Posted: Thu Aug 28, 2014 10:31 pm
by treoden
Use css to change it's width,make it bigger

Re: Quantity box and shopping cart

Posted: Thu Aug 28, 2014 10:42 pm
by mai
Sorry, I have tried that, but is not working. The point is that the widt adjust itself when using Firefox or chrome, but not when you use Safari. That is what I do not understand.

Re: Quantity box and shopping cart

Posted: Tue Nov 14, 2017 4:09 am
by AntonVE
I know this is a very late response and the tc will not benefit from my message.
However as i just found myself in this same situation and this was about the only post i could find, i would like to post my solution.
Don't know if it is the only way to work this out, but with the css i had no luck either.

Go to:
catalog/view/theme/default/template/product and open product.tpl

and around line 221 there is this section:

Code: Select all

div class="cart">
        <div><?php echo $text_qty; ?>
          <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
          <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
In that section change the line:

Code: Select all

 <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
Adjust the size="2" to your needs, so in my case i changed it to 5 to make it show 5 digits quantity box.

Please note this only affects the productpage quantity box, if you need it changed in the Cart view also...
Go to: catalog/view/theme/default/template/checkout, open the cart.tpl and around line 66 look for:

Code: Select all

<td class="quantity"><input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" />
Als change that where it says size="1" to your desire.

Hope this helps anybody!
Anton

Re: Quantity box and shopping cart

Posted: Sat May 30, 2020 1:27 pm
by teuscher1
Many thanks for this one!