- Posts: 16
- Thank you received: 0
Discount coupon applies on total amount
- dotsandcolors
-
Topic Author
- Offline
Less
More
9 years 3 months ago - 9 years 3 months ago #272325
by dotsandcolors
Discount coupon applies on total amount was created by dotsandcolors
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
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
Last edit: 9 years 3 months ago by dotsandcolors.
Please Log in or Create an account to join the conversation.
9 years 3 months ago - 9 years 3 months ago #272389
by Philip
Replied by Philip on topic Discount coupon applies on total amount
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
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: 9 years 3 months ago by Philip.
Please Log in or Create an account to join the conversation.
- dotsandcolors
-
Topic Author
- Offline
Less
More
- Posts: 16
- Thank you received: 0
9 years 3 months ago #272394
by dotsandcolors
Replied by dotsandcolors on topic Discount coupon applies on total amount
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.
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.
Please Log in or Create an account to join the conversation.
9 years 3 months ago #272409
by Philip
Replied by Philip on topic Discount coupon applies on total amount
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
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.
- dotsandcolors
-
Topic Author
- Offline
Less
More
- Posts: 16
- Thank you received: 0
9 years 3 months ago - 9 years 3 months ago #272460
by dotsandcolors
Replied by dotsandcolors on topic Discount coupon applies on total amount
Last edit: 9 years 3 months ago by dotsandcolors.
Please Log in or Create an account to join the conversation.
- dotsandcolors
-
Topic Author
- Offline
Less
More
- Posts: 16
- Thank you received: 0
9 years 3 months ago #272862
by dotsandcolors
Replied by dotsandcolors on topic Discount coupon applies on total amount
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.
9 years 3 months ago #272890
by nicolas
Replied by nicolas on topic Discount coupon applies on total amount
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:
to:
in the file administrator/components/com_hikashop/classes/discount.php and that will fix the problem.
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:
Code:
if(isset($product->cart_product_parent_id) && $product2->cart_product_id == $product->cart_product_parent_id && $product2->product_id == $productid[0]) {
Code:
if(!empty($product->cart_product_parent_id) && $product2->cart_product_id == $product->cart_product_parent_id && $product2->product_id == $productid[0]) {
Please Log in or Create an account to join the conversation.
- dotsandcolors
-
Topic Author
- Offline
Less
More
- Posts: 16
- Thank you received: 0
9 years 3 months ago #272920
by dotsandcolors
Replied by dotsandcolors on topic Discount coupon applies on total amount
Perfect! Thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.262 seconds