- Posts: 966
- Thank you received: 11
Coupon Amount Incorrect in Email
Attached is a pic of the result of my test using the coupon with both awoCoupon and Hikashop.
The coupon is configured to take 100% off the shipping cost which is $5.00. And I checked "apply changes before taxes" and there is no taxes on the coupon code.
No matter what I try the coupon amount is not showing correctly in the Email. The amount shows correctly on the website and on Paypal but not in the email. It keeps adding more to the discount. The coupon discount that I'm testing is $5 when the email comes in it's showing $6.70.
I do not have taxes on the coupon so I don't understand the extra amount that is being added and I don't know what to do next. I've been trying to get this to work for about 4 days now
Thanks!!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Total $100.00
Coupon $-5.00
Shipping $5.00
Taxes $13.00
Order Total $113.00
This is what it shows in the email.
Total $100.00
Coupon : $8.00
Shipping Method : $5.00
Taxes : $13.00
TOTAL with Tax : $113.00
Please Log in or Create an account to join the conversation.
Here's an example that I used with HikaShop Coupon:
THE WEBSITE:
Total $100.00
Coupon $-10.00
Shipping $5.00
Taxes $13.00
Order Total $108.00
THE EMAIL:
Total $100.00
Coupon $3.00
Shipping $5.00
Taxes $13.00
Order Total $108.00
Thanks!!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 27
- Thank you received: 0
further info: tax rate set is 20 percent and option apply coupon before tax is already chosen in the global config
Please Log in or Create an account to join the conversation.
Could you please give me screenshot of your coupon configuration?
Also, an example of case where the price emailed is wrong would be welcome
Please Log in or Create an account to join the conversation.
- Posts: 27
- Thank you received: 0
For further info: I have modified the the checkout/cart.php as instructed by Nicolas in another thread to show only net prices at checkout: $this->params->set('price_with_tax', 0); in the checkout/cart.php.
Thanks for your quick help!
Christoph
Please Log in or Create an account to join the conversation.
First, please make sure that you're using the latest version of HikaShop. We fixed different things with the tax/discount calculations so it could come from the fact that you're on an old version of HikaShop.
Then, please try to remove any customization to the emails/checkout page as they could produce such display (do a backup and then use the trash icon on the Emails/Views listing for the elements you customized).
Please Log in or Create an account to join the conversation.
- Posts: 27
- Thank you received: 0
I did what you said (update to 1.6.0. and get rid of cutom.) on my backed up xampp environment but as expected it turned out to become a big mess as my site is highly customized with changes in many different files and not all changes done by recommended way via "views" (work on 1.5.8.). also submitting an order has no effect to my cart module...
I am unfortunately short of time (marketing campaign starting in less than 2 weeks) and I need to get the discount system running showing the correct figures on site and the email. I have for now achieved a basic workaround for the email notification (order creation) with the only problem remaining that I have to use a fixed figure and not a variable here (so I can´t use different levels of discounts):
if(bccomp($data->order_discount_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_COUPON').' : ';
if($config->get('price_with_tax')){
echo $currencyHelper->format(($data->order_discount_price/1.2)*-1,$data->order_currency_id);
}else{
echo $currencyHelper->format(($data->order_discount_price-@$data->order_discount_tax)*-1,$data->order_currency_id);
}
Can you help and let me know if there is a solution for that. The code in the last line does reproduces VAT-discount*(1+tax rate) - in this case 20%). Also, how can I implement a subtotal without VAT as shown on the screenshot of my previous email. If there a a couple of products added I need this.
Thanks for your help!
regards
Christoph
Please Log in or Create an account to join the conversation.
- Posts: 27
- Thank you received: 0
I was thinking too complicated. I have onlyproducts with the same tax rate so the "1.2" fixed figure always works and the discount in the settings can be different without the need to change anything in the files.
To close the thread can you pls. advise on the only remianing questition on how to display a subtotal without vat.
Many thanks
Christoph
Please Log in or Create an account to join the conversation.
You can use that PHP to display the total with VAT:
<?php echo JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->order_currency_id)); ?>
That's what we're doing actually in the latest versions of HikaShop based on whether the VAT display is turned on or off in the configuration.
Please Log in or Create an account to join the conversation.
- Posts: 27
- Thank you received: 0
thanks. I was not precise - sorry - I need the subtotal without tax before discount (this is shown in the cart but not in the email notification). Tried for hours but without php knowledge its always a guess how to change the code. I can get the figure by adding the total without vat + discount using your code after the final total but I have no clue how to code it to be displayed before the discount.
Thanks for your continous help
Please Log in or Create an account to join the conversation.
The discount is displayed by that code:
echo $currencyHelper->format($data->order_discount_price*-1,$data->order_currency_id);
just put your code before.
Please Log in or Create an account to join the conversation.
- Posts: 27
- Thank you received: 0
works perfectly many thanks!
Please Log in or Create an account to join the conversation.