Jump to content

Buying more than 999 of an item.


Christopher Short

Recommended Posts

So far, I have found four edits necessary:

/classes/cart.class.php, near line 210, find:
if (!is_numeric($quantity) || $quantity < 1 || $quantity > 999) {

Change to:
if (!is_numeric($quantity) || $quantity < 1) {

skin template element.product.call_to_action, near line 33, find:
<input type="number" name="quantity" aria-label="{$LANG.common.quantity}" value="{$PRODUCT.minimum_quantity|default:'1'}" min="{$PRODUCT.minimum_quantity}"{if $PRODUCT.maximum_quantity gte $PRODUCT.minimum_quantity}max="{$PRODUCT.maximum_quantity}"{/if} maxlength="3" class="quantity required text-center">

and delete this part:
maxlength="3"
skin template content.homepage.php, near line 62, find:
<input type="number" name="quantity" aria-label="{$LANG.common.quantity}" maxlength="3" value="{$product.minimum_quantity|default:'1'}" min="{$product.minimum_quantity}" class="quantity required text-center">

and delete this part:
maxlength="3"

skin template content.category.php, near lines 116 and 176, find:
<input type="number" name="quantity" aria-label="{$LANG.common.quantity}" value="{$product.minimum_quantity|default:'1'}" maxlength="3" class="quantity text-center">

and delete this part:
maxlength="3"

 

You can learn about this at:

https://github.com/cubecart/v6/issues/2086

So, maybe make the changes so that the max would be 99999 (maxlength="5") -- or whatever suits your expectations.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...