Discounts not working correctly

  • Posts: 11
  • Thank you received: 0
13 years 6 months ago #16250

I have several products that we are running discounts on, however I want to make sure that certain categorys do not receive a discount.
When adding items to the cart everything gets a discount even though I chose to only apply it to the specific category.
Here's a detailed example of what going on:
Category A - should be getting discount
Category B - should not be.

If I add the discount before adding products from category B, the entire cart gets discount.


If I apply the discount after items in category B are added, none of the items get a discount and I get an error:
"The coupon you entered cannot be used for the products in your cart"

Any help is greatly appreciated. :dry:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 6 months ago #16251

That's normal. A coupon applies to the would order.
The category option is for you to only allow the user to user a coupon if a product of a certain category is in the cart, and not the apply the coupon to only the products in that category.

If you want to do that, you would have to use discounts which are applied directly to the price of each prices and not to the whole order like coupons.

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

  • Posts: 2
  • Thank you received: 0
13 years 6 months ago #16759

Hello Nicolas,
I think limiting coupons by using categories is not working properly.
I setup the following categories:
Product category:
- cat A (child of product category)
- cat B (child of product category)
- cat C (child of product category)
- sub cat C1 (child of cat C)
- sub cat C2 (child of cat C)

I then created "coupons" (not discounts) to take off a flat amount of X on a minimum order Y. Under "Category", I included "cat C" and set "Include sub categories" to "yes". The result I need is that coupons apply to all products of "cat C" and any of it's sub-categories, but do NOT apply to "cat A" or "cat B".

When I add products from "cat A" or "cat B" to the cart, the coupons do not apply (this is correct).
Then, I ALSO add products from "cat C" and it's sub-categories to the cart, and the coupons suddenly apply to ALL items in the cart (this is NOT correct), the coupons should only apply to "cat C" products and should never apply to "cat A" or "cat B" products.

Please help!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 6 months ago #16767

That's normal. The coupons in HikaShop apply to the whole order and not to individual products like discounts do. It's explained in the documentation:
www.hikashop.com/fr/support/documentatio...p-discount-form.html

Category : You can limit a discount or a coupon to one category. For coupons, it means that you need at least once a product of this category in your order for the coupon to be valid. For discounts, it means that the discount is applied to products prices in this category only.

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

  • Posts: 2
  • Thank you received: 0
13 years 6 months ago #16786

Thank you, I understand now that I may need to use discounts instead of coupons.
Here is what I need to do (please refer to my ex above of cat A - C.
I have a lot of products under cat A, B, and sub-cat C1 - C2.
Products in cat A and B should never get a discount, even when they are in the cart with other products that do get a discount. All products in sub-cat C1 and C2 should get the following discounts:
$150 off with a minimum order of $300
$250 off with a minimum order of $400
$360 off with a minimum order of $720, etc...

How do I setup these discounts?
I tried setting up a "Discount" and limiting it to cat C, including sub-categories but it did not appear to work.
Thank you again,
Mike

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 6 months ago #16804

So it's actually a minimum order amount of products in a particular category that you want and not a minimum order amount which is the case actually in HikaShop for coupon restrictions.
There is no option to do what you want as you can set a minimum amount for a discount, only for a coupon.
You would have to change the code of HikaShop for that...

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

  • Posts: 6
  • Thank you received: 0
11 years 1 month ago #124911

Good evening, I have the same problem and I would like to change the object coupon so that I subtract the amount of the coupon just in the total of the products in the selected category and not all in your shopping cart.
Where can I change it? in components / com_hikashop / controllers / checkout.php?
Thank you very much and good work

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 1 month ago #124983

Hi,

There are restriction options for coupon, like a category restriction.
No need to modify the HikaShop core for doing such thing.

You can test it in our demo website:
demo.hikashop.com/administrator/index.ph...scount&task=edit&cid []=4

Advance coupon restrictions are in the commercial editions of HikaShop. Some in the Essential and more in the Business one.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: Piccirillo

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

  • Posts: 6
  • Thank you received: 0
11 years 1 month ago #125018

Thanks for the quick response!

The problem is the following:
For example I have a coupon of € 10,00 only active for products of category A.
In the cart I want the € 10.00 are excluded from the total of the items of Category A and not to the total cart that also contains products of category B and C.

Regards.
Dan

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 month ago #125086

Hi,

This feature is not available by default in HikaShop.
But you can create a custom plugin to manage this kind of coupons.

It require good php skills.
Here is some documentation:
www.hikashop.com/support/documentation/6...r-documentation.html

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

Time to create page: 0.107 seconds
Powered by Kunena Forum