Hello Nicols,
You are right about the second issue, I removed javascript that and cart is redirecting . Thank you.
About second issue, I beg to differ. I believe that it came from Hikashop mistake.
Price after coupon with discount override was calculated like:
$coupon->discount_percent_amount * $product->prices[0]->$price
In $price[0] is already discounted value
instead of
$coupon->discount_percent_amount * $product->prices[0]->$price_without_discount
I fixed it in file back/classes/discount.php in this section:
ORIGINAL - WRONGcase 2:
if(isset($product->prices[0]->$price_without_discount)) {
$coupon->discount_flat_amount += ($coupon->discount_percent_amount * $product->prices[0]->$price) / 100;
$coupon->discount_flat_amount -= $product->prices[0]->$price_without_discount - $product->prices[0]->$price;
if($coupon->discount_flat_amount < 0)
$coupon->discount_flat_amount = 0;
break;
}
FIXEDcase 2:
if(isset($product->prices[0]->$price_without_discount)) {
// MISTAKE FIXED BELLOW
$coupon->discount_flat_amount += ($coupon->discount_percent_amount * $product->prices[0]->$price_without_discount) / 100;
$coupon->discount_flat_amount -= $product->prices[0]->$price_without_discount - $product->prices[0]->$price;
if($coupon->discount_flat_amount < 0)
$coupon->discount_flat_amount = 0;
break;
}
Is that right?
Maybe there will be more needed fixes to this issue, if you create a patch for that, please, let me know.
Thank you
F.