[SOLVED] Discount Not Applied to Variants

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #7661

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: 13 years 9 months ago by hdracing. Reason: Solved we think!

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

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #7662

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:

Attachments:
Last edit: 13 years 9 months ago by hdracing. Reason: Added Normal Cart jpg

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

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #7667

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.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7671

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.

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #7824

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7826

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.

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #7827

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.

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #7830

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7933

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.

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #8402

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.

Attachments:

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

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #8403

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)

Attachments:

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

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #8404

But when that item is added to the cart, the price reflected in the Cart Module is incorrect.

Attachments:

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

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #8405

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.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #8444

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.

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #8697

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #8698

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #8701

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: 13 years 9 months ago by nicolas. Reason: wrong copy/paste

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

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #8747

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #8755

I fixed my copy/paste :)

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

  • Posts: 242
  • Thank you received: 0
13 years 9 months ago #8759

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.093 seconds
Powered by Kunena Forum