Page 1 of 1
Multiple Item Discount
Posted: Sun Feb 21, 2010 1:59 am
by peter006
Hey guys, do you know how i can set it so that if someone adds 5x of the same item they get 3% off that set of that item, 10x that item = 5% off, 20x that item = 10%off , etc...
Re: Multiple Item Discount
Posted: Sun Feb 21, 2010 10:24 pm
by 12oclocker
you can setup volume pricing inside the "Discount" tab of each product.
Problem I just ran into is...
I have a product with different options, example, COLOR RED, COLOR BLUE,
If someone orders 25 Red and 25 Blue, I want to be able to give them the VOLUME price for 50 units,
but OpenCart will not do that, if someone could point me in the correct direction of what source file to edit to allow this change I would greatly appreciate it.
I need it do tally the discount similar to the coupon method, but show the individual price beside the products at checkout
Re: Multiple Item Discount
Posted: Tue Feb 23, 2010 9:47 pm
by quaffershotglasses
Is there a way to set it so if someone picks 25 blue and 25 red, it would give them the discount you set up for 50?
Re: Multiple Item Discount
Posted: Tue Feb 23, 2010 11:16 pm
by Qphoria
You need my "Common Base Discount" mod here:
http://forum.opencart.com/viewtopic.php ... unt#p32689
By design, OpenCart sees products with options as 2 different entities
So
Product A with Option 1
is a different item than
Product A with Option 2
Which means that if you have a discount at 10 and someone buys 5 of Product A with option 1 and 5 of Product A with option 2, it won't give you the discount.
But it begs the point that a "product" discount
should apply to the product, regardless of the options. The code at the link should resolve that by matching the common base product with the discount scenario
Q
Re: Multiple Item Discount
Posted: Tue Feb 23, 2010 11:49 pm
by quaffershotglasses
That worked pefect! Thanks!
Re: Multiple Item Discount
Posted: Thu Feb 25, 2010 1:07 am
by 12oclocker
Cool Qphoria, nice job
Re: Multiple Item Discount
Posted: Fri Dec 06, 2013 5:20 am
by michaelsen
Qphoria wrote:
By design, OpenCart sees products with options as 2 different entities
So
Product A with Option 1
is a different item than
Product A with Option 2
Which means that if you have a discount at 10 and someone buys 5 of Product A with option 1 and 5 of Product A with option 2, it won't give you the discount.
That's not how it works in ver 1.5.5 and that's how I would like it to work. I guess it has been changed since ver 1.4 or maybe the option boost mod I installed has changed it???
If I have a qty discount at 10 and someone buy 6 option A and 4 option B, then they get the discounted price on all items.
(I know this is an old thread, but it keeps showing up in my google searches so I thought it was the most appropriate place to post)
Re: Multiple Item Discount
Posted: Fri Jul 11, 2014 2:09 am
by Grandstand
I also need an answer to this question. For me different options = 2 different products and volume discount should not be applied. Why did this change? Is there a way to change it back that anyone has found?
Re: Multiple Item Discount
Posted: Fri Jul 11, 2014 2:38 am
by Qphoria
michaelsen wrote:Qphoria wrote:
By design, OpenCart sees products with options as 2 different entities
So
Product A with Option 1
is a different item than
Product A with Option 2
Which means that if you have a discount at 10 and someone buys 5 of Product A with option 1 and 5 of Product A with option 2, it won't give you the discount.
That's not how it works in ver 1.5.5 and that's how I would like it to work. I guess it has been changed since ver 1.4 or maybe the option boost mod I installed has changed it???
If I have a qty discount at 10 and someone buy 6 option A and 4 option B, then they get the discounted price on all items.
(I know this is an old thread, but it keeps showing up in my google searches so I thought it was the most appropriate place to post)
Yes I fixed it back in 1.4.9.x to include the discount for all variants.
Now you want it back the old way? oy vey!
Try this.
1. EDIT: system/library/cart.php
2. FIND:
Code: Select all
quantity <= '" . (int)$discount_quantity . "'
3. REPLACE WITH:
Code: Select all
quantity <= '" . (int)$quantity . "'
Re: Multiple Item Discount
Posted: Fri Jun 17, 2016 12:08 pm
by bigbigjimbo
Hi,
Will this mod work for 2.1.0.2 or is there an extension that does it as I ain't that good with code and stuff.
jim
Re: Multiple Item Discount
Posted: Wed Jun 22, 2016 3:20 am
by Qphoria
Yea it should work with 2.1.0.2 and 2.2.0.0
for 2.2.0.0+ you'll need to edit the system/library/cart/cart.php file
Re: Multiple Item Discount
Posted: Tue Jan 23, 2018 4:47 am
by kadlevent
Qphoria wrote: ↑Fri Jul 11, 2014 2:38 am
michaelsen wrote:Qphoria wrote:
By design, OpenCart sees products with options as 2 different entities
So
Product A with Option 1
is a different item than
Product A with Option 2
Which means that if you have a discount at 10 and someone buys 5 of Product A with option 1 and 5 of Product A with option 2, it won't give you the discount.
That's not how it works in ver 1.5.5 and that's how I would like it to work. I guess it has been changed since ver 1.4 or maybe the option boost mod I installed has changed it???
If I have a qty discount at 10 and someone buy 6 option A and 4 option B, then they get the discounted price on all items.
(I know this is an old thread, but it keeps showing up in my google searches so I thought it was the most appropriate place to post)
Yes I fixed it back in 1.4.9.x to include the discount for all variants.
Now you want it back the old way? oy vey!
Try this.
1. EDIT: system/library/cart.php
2. FIND:
Code: Select all
quantity <= '" . (int)$discount_quantity . "'
3. REPLACE WITH:
Code: Select all
quantity <= '" . (int)$quantity . "'
Could you help me to get this going on 2.3.0.2? I tried the fix above but it didn't work for me in this version :-(
Thanks!
Re: Multiple Item Discount
Posted: Wed Jan 24, 2018 1:59 am
by kadlevent
Managed to works this out on v2.3.0.2 if anyone else needs it. Around line 178, use (int)$cart['quantity'] instead of (int)$quantity as demonstrated above. The line should look like the following:
$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)$cart['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");
Hope this helps!
Re: Multiple Item Discount
Posted: Sat Feb 03, 2018 9:01 pm
by dazzul
kadlevent wrote: ↑Wed Jan 24, 2018 1:59 am
Managed to works this out on v2.3.0.2 if anyone else needs it. Around line 178, use (int)$cart['quantity'] instead of (int)$quantity as demonstrated above. The line should look like the following:
$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)$cart['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");
Hope this helps!
I just tried this, i have 2.3.0.2.
1 product has 38 colour options. if people order 5+ of the same colour i want a discount but if they order 5 x1 of each colour i dont, how can i do this?
The mod above i just tried and it removes the discount if 5+
Just tried this on 2.3.0.2 and its working fine, just remember to clear your mods cache
Thanks