Discounts not calculating correctly

  • Posts: 139
  • Thank you received: 1
10 years 11 months ago #158214

Below is a list of the coupons that used to work for calculating my discounts,



No it only ever applies a 10% discount. It should only give 10% for purchases in the 200's, 15% if in the 300's, 20% if in the 400s, etc

What might have change or have I done wrong?

Attachments:

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

  • Posts: 139
  • Thank you received: 1
10 years 11 months ago #158215

I tried changing the order of the coupons and it made no difference.

This how a coupon is set up


Attachments:

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

  • Posts: 83746
  • Thank you received: 13549
  • MODERATOR
10 years 11 months ago #158345

Hi,

Add the code:

unset($cart->products[$k]->cart_modified);
				unset($cart->products[$k]->cart_coupon);
before the line:
$currencyClass->calculateProductPriceForQuantity($cart->products[$k]);
in the file administrator/components/com_hikashop/classes/cart.php and that should solve the problem.

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

  • Posts: 139
  • Thank you received: 1
10 years 11 months ago #158397

Hi

I tried this ie

foreach($cart->products as $k => $row){
                                unset($cart->products[$k]->cart_modified);
                                unset($cart->products[$k]->cart_coupon);
				$currencyClass->calculateProductPriceForQuantity($cart->products[$k]);
			}

And it made no difference, still only applying the 10% one.

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

  • Posts: 83746
  • Thank you received: 13549
  • MODERATOR
10 years 11 months ago #158488

Hi,

It's working fine for me with that change.
Please provide a link to the shop with the problem, a backend access in order to check your settings, a FTP access so that we can look at the code and a link to this thread via our contact page:
www.hikashop.com/contact-us.html

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

  • Posts: 139
  • Thank you received: 1
10 years 11 months ago #158508

Just sent the details. I did sent one a day or so ago but that will no longer be valid. The correct one will be the one with the ftp details in. Thanks again

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

  • Posts: 83746
  • Thank you received: 13549
  • MODERATOR
10 years 11 months ago #158811

Replace the file administrator/components/com_hikashop/classes/cart.php with the one in this archive and that should fix the problem.

File Attachment:

File Name: h0b272b4.zip
File Size:15 KB

Attachments:
The following user(s) said Thank You: abasel

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

  • Posts: 139
  • Thank you received: 1
10 years 11 months ago #158843

Many thanks, just a quick question, will I loose this in future updates of will it be included?

Thanks again :cheer:

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

  • Posts: 83746
  • Thank you received: 13549
  • MODERATOR
10 years 11 months ago #158852

It will be included of course.

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

Time to create page: 0.114 seconds
Powered by Kunena Forum
loading