Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Limit number of products in the cart to 10 units


rotulistaz

Recommended Posts

Please I need help understanding how to modify the quantity of identical products

in the cart to not allow add more than 10 units of the same product.

 

This means that only supports 2 digits and not 80 as brings defect oscommerce

 

Thanks for your help

Link to comment
Share on other sites

Limit number of products in the cart to 10 units

you can use the following module:

http://addons.oscommerce.com/info/1250

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

Please I need help understanding how to modify the quantity of identical products

in the cart to not allow add more than 10 units of the same product.

 

This means that only supports 2 digits and not 80 as brings defect oscommerce

 

Thanks for your help

 

Thank you very much for quick reply, now I try and tell you

 

Regards

Rotulistaz

Link to comment
Share on other sites

Thank you very much for quick reply, now I try and tell you

 

Regards

Rotulistaz

 

Hello again, I tried the module but does not help, because it is to support a minimum amount of money, and I need is to limit the quantity of items equal

you can buy, that you can not buy more than 10 identical items.

That is limiting the field to two digits and can not enter more than 10 units.

I hope explained me because my English is not very good

 

Regards

Rotulistaz

Link to comment
Share on other sites

Hi rotulistaz,

in the file includes/application_top.php, search for:

$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);

 

And change it to:

if ((int)$HTTP_POST_VARS['cart_quantity'][$i] > 10) {
								$HTTP_POST_VARS['cart_quantity'][$i] = 10;
								}
                                 $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);

Link to comment
Share on other sites

Hi rotulistaz,

in the file includes/application_top.php, search for:

$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);

 

And change it to:

if ((int)$HTTP_POST_VARS['cart_quantity'][$i] > 10) {
								$HTTP_POST_VARS['cart_quantity'][$i] = 10;
								}
                                 $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);

 

Thanks for your response, I tried the change but does not work, because it only allows the purchase of 1 product.

Here you put a link to see what I like to do, but not if there are any module to do

 

This shop have drop down menu very nice for number item customer want

http://www.popthetop.com/catalog/shopping_cart.php

Link to comment
Share on other sites

Thanks for your response, I tried the change but does not work, because it only allows the purchase of 1 product.

Here you put a link to see what I like to do, but not if there are any module to do

 

This shop have drop down menu very nice for number item customer want

http://www.popthetop.com/catalog/shopping_cart.php

No, it allows you in this case to put 10 of each product to your cart. I have the same script in my shop with 999999, so no one can buy more than 999999 pcs. of a product at a time. I made a test with 10, it works, believe me. When you put 11 or 999 to your cart, it changes to 10. Of course you can change the number to anything you want.

 

I dont like dropdown boxes for quantity. This shop has a dropdown with 50pcs each, so if you want to order 43, it takes some time to find the right quantity.

Link to comment
Share on other sites

No, it allows you in this case to put 10 of each product to your cart. I have the same script in my shop with 999999, so no one can buy more than 999999 pcs. of a product at a time. I made a test with 10, it works, believe me. When you put 11 or 999 to your cart, it changes to 10. Of course you can change the number to anything you want.

 

I dont like dropdown boxes for quantity. This shop has a dropdown with 50pcs each, so if you want to order 43, it takes some time to find the right quantity.

 

 

Finally found a solution to this module: order max dropdown_1_2_3

 

Thanks for your help

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...