This is a discussion on Minimum Order Quantity Per Product within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; Fix for bypassing the shopping cart and going to checkout. A user can add a quantity less than the minimum, ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| Fix for bypassing the shopping cart and going to checkout. A user can add a quantity less than the minimum, instead of going to shopping cart, can go to checkout and the price, quantity never gets updated. Added a check on checkout_shipping.php for checking quantities in cart with minimum quantity for product. The addition simply does a check, if a product does not have the correct quantity, they will be redirected to the shopping cart for it to make the udpates. On line (42) or somewhere close find: require(DIR_WS_CLASSES . 'order.php'); $order = new order; Add this below: // ================================================== =============== // CHECK FOR MINIMUM QUANTITY FOR CHECKOUT // fix for contribution Minimum Product Quantity // if user adds less than minimum quantity for product, the // checkout button lets them proceed and make the purchase // with out the minimum quantity. // ================================================== =============== for($xix = 0; $xix < count($order->products); $xix++) { $check_quantity_query = tep_db_query("SELECT minorder FROM ".TABLE_PRODUCTS." WHERE products_id=".tep_get_prid($order->products[$xix]['id'])); $check_quantity_results = tep_db_fetch_array($check_quantity_query); if($order->products[$xix]['qty'] < $check_quantity_results['minorder']) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART) ); } } // ================================================== =============== // END CHECK FOR MINIMUM QUANTITY FOR CHECKOUT // ================================================== =============== More...
__________________ Michael Sasek osCMax Developer
|
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| minimum quantity per product | ctbhost | osCMax v2 Customization/Mods | 1 | 06-01-2008 10:10 AM |
| Minimum Product Quantity with Admin v1.5 | Twister | osCMax v2 Customization/Mods | 2 | 05-27-2007 03:23 AM |
| Minimum Order Quantity Per Product | michael_s | New osCommerce Contributions | 0 | 01-12-2007 07:56 PM |
| Minimum order with low order fee | FSUddin | osCommerce 2.2 Modification Help | 2 | 12-14-2004 08:19 AM |
| Quantity to order shown on Product detail | doug | osCommerce 2.2 Modification Help | 5 | 03-06-2003 01:51 AM |