- Posts: 29
- Thank you received: 0
Order Total incorrect on Site
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 2.5.17
-- PHP version -- : 5.3.3
-- Browser(s) name and version -- : IE 10
-- Error-message(debug-mod must be tuned on) -- : Error_message
Since I have had no update where I originally posted this issue in the "Checkout" forum and I believe this is a true bug in the software, I'm reposting in hopes that someone will look into this problem.
We are using a 10% off coupon and when the order is totaled in the checkout portion, it is not correct. Below are screenshots that clearly show the problem:
Order with shipping only - no coupon. Totals correctly:
Order with coupon applied. Total is incorrect:
Please Log in or Create an account to join the conversation.
Are you using an option in order to "round" the prices ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
The prices are rounding (taxes and 10% discount), but not totaling correctly.
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.
I am running a special and have discount code that I forced to an affiliate.
For some reason, the code is taking more than it should.
The code is for 10% off but below are the subtotal and the amoumt deducted wjich is clearly more than 10%
Subtotal : $819.96
Coupon : $-111.99
Attached image is how I have the setting.
Your earliest response will be appreciated.
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.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
This is indeed a bug. We need time to debug such issue as it's really complex. Unfortunately, last week was a high load week on support and we didn't had the time to put the half a day of work required for such issue.
I hope we have more time in the next few days to look at it and we'll keep you posted once we find the problem.
Thanks for bearing with us.
Please Log in or Create an account to join the conversation.
When you tell me that last week was a "high load week on support", I was one of the support requests from last week and was either lost in the shuffle or not prioritized. It took me all of about 10 minutes to replicate my issue in your demo environment as it was actually very simple - set round calculations on and add a 10 percent coupon. My last post to you was that I had not touched any code and was using your product as delivered.
To me...this should have been a prioritized issue last week, even with a high load since it does have to do with a total amount in an ecommerce system - even if the total is only off by 1 cent. I would probably be much more understanding if you had posted this same message within a couple of days - but that was not the case. So, I remain disappointed.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I got some time today to debug the issue and went on, thanks to your FTP access. However, The access that you provided didn't had the permission to modify the files, so I couldn't add any trace to the code on your website:
Please Log in or Create an account to join the conversation.
Here are the steps I took to replicate my issue in your demo:
1. I added a new product, price $19.95 USD. to the Fashion, Men category called Test Product
2. Changed Main Currency to USD
3. Check that Round prices during calculations is set to yes.
4. Created a 10% off coupon called TestCoupon
In the Demo shop, add one Test Product to the cart, then go to checkout. Apply the TestCoupon at checkout.
Price will be off one cent.
Please Log in or Create an account to join the conversation.
Thank you for the exact step by step.
I was able to reproduce the problem now.
Please add the code:
Please Log in or Create an account to join the conversation.
if (bccomp($coupon->discount_flat_amount, 0, 5)) {
$coupon->discount_percent_amount = 0;
$coupon->discount_coupon_nodoubling = null;
}
$config =& hikashop_config();
if($config->get('round_calculations',0)){
$currencyHelper = hikashop_get('class.currency');
$coupon->discount_flat_amount =
round($coupon->discount_flat_amount,$currencyHelper->getRounding($coupon->discount_currency_id));
}
}
}
Here is a screenshot from my shopping cart after adding your code:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Currently, I changed the com_hikashop folder recursively in the administrator/components folder to give you write access. Please let me know if there is anywhere else.
Again, I can't see how this is possibly specific to my install since I have not customized any of your code...
Thanks and please let me know if there is anything else I can do to help you have the write access you need.
Please Log in or Create an account to join the conversation.
Replacing the lines:
if(empty($tax)) return $price;
by:
if(empty($tax)) return $this->_round($price,$round);
in the file administrator/components/com_hikashop/classes/currency.php solves the problem.
Please Log in or Create an account to join the conversation.