This is a discussion on Maximum Product Quantity with Admin within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; This contribution is an excellent idea, but I found that it was possible to fill the cart with more than ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| This contribution is an excellent idea, but I found that it was possible to fill the cart with more than the maximum and proceed directly to checkout, bypassing the good work done by shopping_cart.php. The following snippet, inserted in the top of the catalog/checkout_shipping.php file, solved the problem for me, by redirecting "overfull" carts at checkout back to /catalog/shopping_cart.php to be corrected. If it helps you too, my work here is done! Find if (!tep_session_is_registered('cartID')) tep_session_register('cartID'); $cartID = $cart->cartID; Insert after //Check for maximum quantity if(MAXIMUM_ORDERS == 'true'){ for ($i=0, $n=sizeof($order->products); $iproducts[$i]['id']."'"); while ($max_order = tep_db_fetch_array($max_order_query)) { // set the cart item max var if ($order->products[$i]['qty'] > $max_order['max_quant'] ) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART) ); } } } } //End MAXIMUM quantity code More...
__________________ Michael Sasek osCMax Developer
|
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Product Quantity Dropdown on Product Info Page | michael_s | New osCommerce Contributions | 0 | 09-11-2007 11:13 AM |
| Product Quantity Dropdown on Product Info Page | michael_s | New osCommerce Contributions | 0 | 06-12-2007 01:14 PM |
| Minimum Product Quantity with Admin v1.5 | Twister | osCMax v2 Customization/Mods | 2 | 05-27-2007 02:23 AM |
| Maximum Stock Quantity on Stock Page? | Dubious | osCMax v2 Features Discussion | 0 | 08-18-2006 02:17 PM |
| Changing maximum number of orders displayed in admin panel | markymrk22 | osCommerce 2.2 Installation Help | 1 | 09-03-2005 10:56 AM |