Post by peter006 » Sun Feb 21, 2010 1:59 am

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...

Newbie

Posts

Joined
Tue Feb 16, 2010 9:12 am

Post by 12oclocker » Sun Feb 21, 2010 10:24 pm

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

Active Member

Posts

Joined
Fri Feb 19, 2010 10:50 am

Post by quaffershotglasses » Tue Feb 23, 2010 9:47 pm

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?


Posts

Joined
Mon Feb 22, 2010 8:02 am

Post by Qphoria » Tue Feb 23, 2010 11:16 pm

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

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by quaffershotglasses » Tue Feb 23, 2010 11:49 pm

That worked pefect! Thanks!


Posts

Joined
Mon Feb 22, 2010 8:02 am

Post by 12oclocker » Thu Feb 25, 2010 1:07 am

Cool Qphoria, nice job

Active Member

Posts

Joined
Fri Feb 19, 2010 10:50 am

Post by michaelsen » Fri Dec 06, 2013 5:20 am

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)

New member

Posts

Joined
Tue May 03, 2011 3:17 am

Post by Grandstand » Fri Jul 11, 2014 2:09 am

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?

New member

Posts

Joined
Sat Aug 27, 2011 8:03 am

Post by Qphoria » 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 . "'

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bigbigjimbo » Fri Jun 17, 2016 12:08 pm

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

Newbie

Posts

Joined
Thu Feb 07, 2013 6:54 pm

Post by Qphoria » Wed Jun 22, 2016 3:20 am

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

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by kadlevent » Tue Jan 23, 2018 4:47 am

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!

Newbie

Posts

Joined
Mon Nov 11, 2013 6:38 pm

Post by kadlevent » 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!

Newbie

Posts

Joined
Mon Nov 11, 2013 6:38 pm

Post by dazzul » Sat Feb 03, 2018 9:01 pm

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

New member

Posts

Joined
Mon Feb 10, 2014 3:42 am
Who is online

Users browsing this forum: No registered users and 11 guests