Multiple Quantity Discounts

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21743

Here's the scenario that I need to make happen. There are 32 products with 16 variants each, but technically they are all the same price and the same type of item - like, widget left - blue, widget right - blue, etc.

For every widget sold, no matter what variant I need to have a cost for qty 1-3, qty 4-7, and qty 8+

I bought the essential to get this working with coupons, and have two coupons set up - one that is to kick in at 4 or more, another at 8 or more. But of course, only the first gets autoloaded no matter the quantity. I know that I could have the customer delete the one and enter the other at checkout, but the client really wants this automated.

What I really need is quantity pricing by category. Any ideas?

Aubrey

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21748

It's not possible to have quantity prices across products.

If you use the latest version of HikaShop, the auto loaded coupons now reload automatically when the cart changes so the customer don't have to delete anymore the coupon to get the new coupon price based on his new cart.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21749

...I know that I could have the customer delete the one and enter the other at checkout...


Oops. I take that back. It does show the coupon deleted, but it is still there. I guess it is automatically adding it back.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21752

Ahhh. Now I see - but it doesn't replaced the second coupon when the cart quantity reaches the second amount.

The problem is, we did a custom add to cart via ajax link. Basically we are running an array to submit add to cart urls. Is that causing the problem?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21753

No that should be fine. the auto coupons are processed during the display of the cart, not when the cart is modified.

As I said, that won't work with previous versions of HikaShop. Are you using the latest version 1.5.2 ?

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21754

Yes. I am on 1.52 - just downloaded it today. I've triple checked both coupon settings. Any other ideas?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21755

Could you do a screenshot of the configuration of your coupons ?

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21757
Last edit: 13 years 4 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21758

hmmm. images didn't post but those urls should work to see the screenshots.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21777

Thank you. We'll try to reproduce the problem on our end and report back.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21830

It seems that there is a calculation problem:
the coupon change is done when the items quantity is n+1 instead of n in the cart. Do you confirm ?

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21831

For me, the 2nd coupon is never added, no matter the quantity

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21832

Mmmm. Since we can't reproduce the problem on our end we would have to look at the problem directly on your website. Could you provide a back end and an FTP access to your website so that we can look at the problem and eventually fix it ?

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21835

Just sent you the access. Thanks again for your help!!!

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21845

Thanks. We'll look at that during the week end.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21883

I found the problem.It's because the minimum number of products option is not handled properly for auto loaded coupons.

I had to change the code:
$query = 'SELECT * FROM '.hikashop_table('discount').' WHERE '.implode(' AND ',$filters).' ORDER BY discount_minimum_order DESC';

to:
$query = 'SELECT * FROM '.hikashop_table('discount').' WHERE '.implode(' AND ',$filters).' ORDER BY discount_minimum_order DESC, discount_minimum_products DESC';

in the file administrator/components/com_hikashop/classes/cart.php

and that fixed the problem. We'll include it in next version.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21936

Nicolas - thanks so much for your help that did fix the problem.

Having one slight issue though. The client wants a round number discount -- example, 1-3 price = 149, 3-7=129, 8+ = 99. To get the percentage discount to even numbers requires more than 2 decimal positions for the calculation, but it seems only two are used to calculate.

If changing that is a big deal, is there a limit on the number of coupons that can be active? A workaround would be to have a coupon for a certain amount off for qty 3,4,5,6,7,8,9,10... etc

Thanks again for all your help!

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #21940

Changing the number of decimals of the corresponding field in the database should do it. You need to edit the table hikashop_discount via phpmyadmin and increase the number of decimals of the field discount_percent_amount and that should do it.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
13 years 4 months ago #21950

That worked perfectly! you guys are awesome!!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum