Skip to main content

[SOLVED] Discount Not Applied to Variants

More
15 years 7 months ago - 15 years 7 months ago #7661 by hdracing
Hello,

Maybe this is by design or maybe I missed something, but if I apply a percentage discount to a category of products, that discount does not show for any variants of those products. I expected the same percentage would be applied to the products in that category as well as all variants. I tried with sub-categories included and excluded with the same result.

Is there a way to include a discount on variants?

Regards,
Ed
Last edit: 15 years 7 months ago by hdracing. Reason: Solved we think!

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

More
15 years 7 months ago - 15 years 7 months ago #7662 by hdracing
I just noticed that adding a discounted product to the cart screws up the formatting of the cart at checkout.

In the example below, there should have been a 30% discount applied to the price, but the undiscounted price is what shows in the cart.



A normal cart should look like this:

Last edit: 15 years 7 months ago by hdracing. Reason: Added Normal Cart jpg

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

More
15 years 7 months ago #7667 by hdracing
It looks like the formatting problem above was fixed with the latest release. (I was testing the discounts on 1.4.4), but the problem with discount not being applied to variants is still there. The cart item says 30% discount, but the amount is not applied. The first item in the cart below is the base product with discount. The second item is the same item with a characteristic selected.

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

More
15 years 7 months ago #7671 by nicolas
Indeed the coupons on categories of products do not work well at the moment on variants

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

More
15 years 7 months ago #7824 by hdracing
Nicolas,

Do you have some idea when this issue might be fixed? Also, does the coupon/variant problem only exist when the coupon is applied to Categories, or would it also be a problem with other coupon restrictions?

Sorry to be a pain, but this is an important one for me.

Regards,
Ed

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

More
15 years 7 months ago #7826 by nicolas
If you apply the discount directly to the variant, I suppose it should work.
We'll look at that over the weekend.

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

More
15 years 7 months ago #7827 by hdracing
Thanks! I'll be recording our first race of the 2011 season this weekend so customer orders should start coming in through the new Hikashop component soon. (hopefully :laugh: )

Regards,
Ed

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

More
15 years 7 months ago #7830 by hdracing
nicolas wrote:

If you apply the discount directly to the variant, I suppose it should work.
We'll look at that over the weekend.


I couldn't find a way to apply a coupon directly to a variant, but I'll wait to see what you come up with for a fix. Not urgent for me right now (maybe others), but it is something I would like to see in a near-future release.

Ed

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

More
15 years 7 months ago #7933 by nicolas
Hi,

We uploaded a new build of hikashop which should add that capability. You should now be able to filter per categories discounts and coupons on products AND variants.

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

More
15 years 7 months ago #8402 by hdracing
It looks like there is still a problem with discounts and variants. I'm using the latest Business version (downloaded this morning) and while discounts do indeed get reflected in variant prices on the product page, they do not get passed correctly to the Cart Module and Checkout page reflects a different price from the cart module, but it is still incorrect. I'll post some screen shots to demonstrate.

This first shot is the product display showing a $5.00 flat rate discount correctly applied to the default product variant combination (Standard Definition DVD original price $30.00 with $5.00 discount = $25.00). When added to cart, all looks OK.

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

More
15 years 7 months ago #8403 by hdracing
This shot shows the variant High Definition BluRay selected and the product page reflects the correct discounted price (Original price for that variant $40.00 and with $5.00 discount = $35.00)

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

More
15 years 7 months ago #8404 by hdracing
But when that item is added to the cart, the price reflected in the Cart Module is incorrect.

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

More
15 years 7 months ago #8405 by hdracing
And to make it more confusing, when you go to Checkout, the price for that second product is now changed to $30.00 instead of the $25.00 that was in the Cart module, but still not what it should be, which is $35.00.

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

More
15 years 7 months ago #8444 by nicolas
Thank you for this thorough report of the problem. We'll investigate the problem tomorrow and keep you posted on our findings.

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

More
15 years 7 months ago #8697 by hdracing
Nicolas,

Something else that I forgot to ask is what is the number to the left of Proceed to Checkout in the Cart Module?

Hope the new office move has gone well for you,
Ed

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

More
15 years 7 months ago #8698 by nicolas
That's a bug in current version: www.hikashop.com/en/support/forum/3-bug-...-in-cart-module.html

It's going well. We'll be busy next week settling down there.

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

More
15 years 7 months ago - 15 years 7 months ago #8701 by nicolas
The problem seems to come from the fact that the discount could be applied several times to variants in the cart.
That should be better if you edit the file administrator/components/com_hikashop/classes/currency.php and replace the line:
if(!empty($element->discount)){
by:
if(empty($element->discount) && !empty($element->discount)){

and the line:
if(!empty($row->prices)){
by:
if(empty($row->discount) && !empty($row->prices)){
Last edit: 15 years 7 months ago by nicolas. Reason: wrong copy/paste

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

More
15 years 7 months ago #8747 by hdracing
Nicolas,

The two lines you gave are identical and there is only one instance of that line in the referenced file. Does the that change need to be made in another file?

Thanks,
Ed

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

More
15 years 7 months ago #8755 by nicolas
I fixed my copy/paste :)

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

More
15 years 7 months ago #8759 by hdracing
The line:
if(!empty($row->prices)){
is in that file three times. Should all three be changed?

Ed

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

Time to create page: 0.308 seconds
Powered by Kunena Forum