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

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

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

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.michaelsen wrote: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???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.

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)

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 . "'
```

Code: Select all

`quantity <= '" . (int)$quantity . "'`

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

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 :-(Qphoria wrote: ↑Fri Jul 11, 2014 2:38 amYes I fixed it back in 1.4.9.x to include the discount for all variants.michaelsen wrote: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???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.

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)

Now you want it back the old way? oy vey!

Try this.

1. EDIT: system/library/cart.php

2. FIND:

3. REPLACE WITH:Code: Select all

`quantity <= '" . (int)$discount_quantity . "'`

Code: Select all

`quantity <= '" . (int)$quantity . "'`

Thanks!

$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!

kadlevent wrote: ↑Wed Jan 24, 2018 1:59 amManaged 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

Who is online

Users browsing this forum: No registered users and 11 guests