Jump to content

[Solved] How to increase Maximum Order Quantity to 6 digits?


Recommended Posts

Hi,

I am using the Prestashop 1.5.4.1.

The customers are limited to a maximum order quantity of 999.

They cannot order more than 999 quantities for the same product, not possible to order 1000 products.

Is there any way to increase this number to 6 digits (ex:999999)?

 

Thank you

Edited by bruce-rez (see edit history)
Link to comment
Share on other sites

We set up an attribute called "Pack Size" with numbers 1, 2, 3, 4, 5, 10, 20, 50, 100. Each attribute as a price modifier associated with it

 

So if a customer wants to buy say 20000, they can purchase 200 * 100 pack

 

This way we can offer great discounts for multiple purchases

Link to comment
Share on other sites

Hello, I think it is possible through some SQL or PHP knowledge, but there is no way to change the max from the back office

Hi Benjamin,

I am not a coder neither do not know SQL or PHP knowledge.

So with Prestashop 1.5.4.1 we are limited to sell only a maximum quantity of 999 products? Is that correct?

Thank you.

Link to comment
Share on other sites

Hi Bruce-rez,

 

The maximum quantities are only limited by an arbitrary setting in YOURSTORENAME/themes/YOURTHEME/product.tpl

In version 1.5.4.1 scroll to line 328:

 

<input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />

 

This line sets the size of the quantity box displayed on the page. By default this is set to maxlength="3", limiting the number of products to 999. Changing this to 5 will give you max products of 99,999. If you need 6 digits (up to 999,999), change this to 6. It changes the correct number in the cart, so should be fine.

Edited by IDRsolutions (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi Bruce-rez,

To change the width of the quantity field on the order summary page you need to edit the file YOURSTORENAME/themes/YOURTHEME/css/global.css:

Find the following line(it was at line 765 in my file):

table#cart_summary .customization .cart_quantity {padding: 8px 12px 0;}
.cart_quantity .cart_quantity_input {
float:left;
margin-left: 5px;
width: 20px;
border:1px solid #fff
}

Change the width FROM 20px TO 50px and you should be able to see the rest of the field. If not you can try and make it a bit wider, but you will be getting close to the width of the cell so be careful. This worked for me.

Edited by IDRsolutions (see edit history)
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...