hi
charging by quantity problem
if customer orders product X, I have discounts for quantities eg 10 items the price is $10.00 per item, 11-20 items the price is $8.00 per item. there colour options eg red, blue, white lids
if a customer orders orders product X, 10 items in blue lid, and then another 10 items with white lid then the cart see this as 20 items ordered and gives the whole order the 20 item discount
How can I stop this?
Assuming that you are using 2.3.0.2. Edit file system/library/cart/cart.php. Find this line:And put this line right above it:
Code: Select all
$product_discount_query = $this->db->query("SELECT price FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$cart['product_id'] . "' AND customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND quantity <= '" . (int)$discount_quantity . "' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY quantity DESC, priority ASC, price ASC LIMIT 1");
Code: Select all
$discount_quantity = $cart['quantity'];
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Who is online
Users browsing this forum: No registered users and 7 guests