- Posts: 71
- Thank you received: 0
Discount percentage and price rounding
-- Joomla version -- : 3.4.1
Hi,
For certain customer groups we've set a discount of 25%. The discounted price however should be rounded to the nearest .05 eg. when the discounted price is 6.53, it should show 6.55 or with 6.52 it should show 6.50. How can this be achieved?
Thanks.
Michel
Please Log in or Create an account to join the conversation.
Did you configure a rounding increment of 0.05 in the settings page of your currency that you can edit via the menu System>Currencies ?
If not, then it's normal that it round the prices by 0.01 increments as that's the default rounding increment of the system.
Please Log in or Create an account to join the conversation.
As you can see from the screenshots below, the increment is set to 0.05, but the discounted prices are still shown with a 0.01 rounding...
Thanks,
Michel
Please Log in or Create an account to join the conversation.
Ok, I see the issue.
Can you try to change the code:
Please Log in or Create an account to join the conversation.
Thanks for the reply!
Unfortunately it doesn't work. See result in Screenshot.
Thanks,
Michel
Please Log in or Create an account to join the conversation.
It seems to be working way better than before though on your screenshot.
I see however on my end that the price with tax isn't rounded as it should.
With that code however, it works fine on my end:
Please Log in or Create an account to join the conversation.
With the code before no discount was deducted.
With the new code you sent, it's the same as before (see screenshot), the prices are not rounded to nearest 0.05.
Thanks,
Michel
Please Log in or Create an account to join the conversation.
Please provide:
- a link to the page with the issue
- a backend access to check your settings
- a FTP access to your website so that we can look and modify the code
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I had the same problem.
Maybe this will help:
www.hikashop.com/forum/checkout/876704-round-price.html
Regards
Please Log in or Create an account to join the conversation.
I'm not able to access your backend. There is a htaccess authentication before the login screen and you didn't provide the credentials for that. Could you provide them too ?
Please Log in or Create an account to join the conversation.
Thanks,
Michel
Please Log in or Create an account to join the conversation.
As Nicolas wrote one week ago ; we do not have any credentials for the Htaccess authentication for your backend.
You sent us a login and password for Joomla but that does not work for the first authentication part.
So please provide us that information and please use the "contact us" form, specially if you want us to be able to read your message.. Private message are inefficient for the support.
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.
As I have written, I sent the credentials by pm, not being aware that it should have been sent through the contact form.
I have now sent them using the contact form.
Thanks,
Michel
Please Log in or Create an account to join the conversation.
Sorry for the delay.
I was able to check your settings and indeed, the code modification I gave is correct and you correctly put it in place.
The issue is that you had turned off the "round prices during calculations" setting of the HikaShop configuration, and thus prices weren't rounded during the discount calculations anymore.
I've turned it on and the results are correct now on your website as far as I can see.
Please Log in or Create an account to join the conversation.
Great. Thanks! Could you tell me where this setting is? I can't find it....
How is it when I install an update of Hikashop? Will this modification be included or should I apply the changes again, after updating?
Michel
Please Log in or Create an account to join the conversation.
For the setting see : www.hikashop.com/support/support/documen...nfig.html#main_taxes
Otherwise, the fix that Nicolas gave you will be include in the next release.
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.
- Posts: 3
- Thank you received: 0
I am using latest version of hikashop and selected the option Round off with calcultion on hikashop configuration page.
My product price is 25,90 € and after applied the discount of 25% the amount will be 19.43 € and want to round of this value to 19.40 or 19.45 € .
Could you please tell me the way to get this value without changing the original price of the product and discount percentage.
Thanks,
Regards,
Vijay
Please Log in or Create an account to join the conversation.
The rounding option in the Hikashop configuration is to have the prices rounded during calculations or not based on the rounding configured in the settings of the currency. So for example if you have a product costing 10.01 and you have a tax of 10% on top of that, it means the tax is 1.001 so it is rounded to 1. But suppose you have 10 elements of that product in the cart.
In that case, the total tax will either be 10 or 10.01 based on how that setting is configured.
So this setting has no influence on what you're trying to do.
By default the euro currency is configured with a rounding increment of 1 cent, so what you want to do, it's to edit the euro currency via the menu System>Currencies and change the rounding increment from 0.01 to 0.05. That way, it will round prices with 5 cents steps instead of 1 cent steps.
Please Log in or Create an account to join the conversation.