Discount coupon applies on total amount

  • Posts: 16
  • Thank you received: 0
6 years 9 months ago #272325

We created a coupon that activates automatically when a customer buys 2 or more products from a speciifc category.
It gives a discount of 20%.

When a customers buys 1 product from another (non-included) category and 1 from the included category, the coupon code does not work. That's how it should be.
When a customers buys 1 product from another (not-included) category and 2 from the included category, the coupon code is activated. That's ok, but here comes the problem. The discount is applied to the total amount, so to all the products also the one frome the non-included category. And that's not what we want.

On screenshot coupon1.png u can see 3 products. The third 'slip-on geel / cienta: 30" is not in the category ('stapelkorting') from the coupon. So the discount should be 20% from €110 + € 130, in total that would be € 48 and not € 53 (20% from € 265)


-- url of the page with the problem -- : www.theodoor.be/index.php/webshop
-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.6.5
-- Browser(s) name and version -- : Safari 10.1.1


Attachments:
Last edit: 6 years 9 months ago by dotsandcolors.

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

  • Posts: 4486
  • Thank you received: 609
  • MODERATOR
6 years 9 months ago #272389

Hello,

I don't know, if that's will be relevant as I do not know the structure of your categories but maybe you have to switch On the "Including sub categories" option ?

On our side, I try to reproduce, you configuration from what you give, and my coupon works as expected AND as you required.
Check your categories structure, and check that your third product don't depends from several categories ?

Awaiting news from you.

Regards

Last edit: 6 years 9 months ago by Philip.

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

  • Posts: 16
  • Thank you received: 0
6 years 9 months ago #272394

It's just a single category (stapelkorting) without subcategories and specially made for this discount.
Because I had to exclude some brands and the coupon system doesn't work with the brands.
So I created a new category and placed all the products (from brands that should be discounted) through the mass-action-system in this new category.

Attachments:

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

  • Posts: 4486
  • Thank you received: 609
  • MODERATOR
6 years 9 months ago #272409

Hello,

Can you provide an Url link to your website AND a frontend/backend access in order to process some tests ?
Precise if your website is on production phase.
And use our Contact us form to provide these elements, add an url link to this topic and notify us here we it's done.

Regards

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

  • Posts: 16
  • Thank you received: 0
6 years 9 months ago #272460

I just send all the info.

Here are some more screenshots of the problem ...

Ok



Ok


The problem

Attachments:
Last edit: 6 years 9 months ago by dotsandcolors.

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

  • Posts: 16
  • Thank you received: 0
6 years 9 months ago #272862

Can you please inform me about the progress in this case? It's a week old and no new info

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
6 years 9 months ago #272890

Hi,

I was able to found the issue and fix it.
It only happens with coupons restricted to categories with products with characteristics.
Change the line:

if(isset($product->cart_product_parent_id) && $product2->cart_product_id == $product->cart_product_parent_id && $product2->product_id == $productid[0]) {
to:
if(!empty($product->cart_product_parent_id) && $product2->cart_product_id == $product->cart_product_parent_id && $product2->product_id == $productid[0]) {
in the file administrator/components/com_hikashop/classes/discount.php and that will fix the problem.

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

  • Posts: 16
  • Thank you received: 0
6 years 9 months ago #272920

Perfect! Thanks!

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

Time to create page: 0.101 seconds
Powered by Kunena Forum