- Posts: 190
- Thank you received: 0
Round problem for products when discounts
- codewarrior
-
Topic Author
- Offline
Less
More
11 years 7 months ago #189930
by codewarrior
Round problem for products when discounts was created by codewarrior
-- url of the page with the problem -- :
www.patrickguedj-paris.com/ventes-flash
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5
Hi,
I reinstalled my existing site with a Joomla 3 and a new template.
After performing all customizations and migrations for past users and commands, I would like to create a new product for a sale.
This product has a regular price of 350€ TTC and should be sold 129€ TTC
I created a discount category affected to the product and a Discount of 63.14%
Finally the product is displayed at 129.01 € TTC
Because of roundings in the products price HT or TTC, or in Discounts, I'm never able to have round prices for HT and TTC (350€ and 129€)
Could you please help me ?
Regards
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5
Hi,
I reinstalled my existing site with a Joomla 3 and a new template.
After performing all customizations and migrations for past users and commands, I would like to create a new product for a sale.
This product has a regular price of 350€ TTC and should be sold 129€ TTC
I created a discount category affected to the product and a Discount of 63.14%
Finally the product is displayed at 129.01 € TTC
Because of roundings in the products price HT or TTC, or in Discounts, I'm never able to have round prices for HT and TTC (350€ and 129€)
Could you please help me ?
Regards
Please Log in or Create an account to join the conversation.
11 years 7 months ago #189942
by nicolas
Replied by nicolas on topic Round problem for products when discounts
Hi,
Did you try changing the option "round prices during calculations" in the HikaShop configuration ?
Did you try changing the option "round prices during calculations" in the HikaShop configuration ?
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
11 years 7 months ago #189999
by codewarrior
Replied by codewarrior on topic Round problem for products when discounts
Thanks Nicolas for answering.
If you mean Taxes / Round prices during calculations ?
of course I tested it and see no differences.
If you mean Taxes / Round prices during calculations ?
of course I tested it and see no differences.
Please Log in or Create an account to join the conversation.
11 years 7 months ago #190002
by nicolas
Replied by nicolas on topic Round problem for products when discounts
Hi,
Could you provide a screenshot of your discount options and a screenshot of your tax rule so that we know exactly how they are configured ?
Could you provide a screenshot of your discount options and a screenshot of your tax rule so that we know exactly how they are configured ?
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
11 years 7 months ago - 11 years 7 months ago #190119
by codewarrior
Replied by codewarrior on topic Round problem for products when discounts
Last edit: 11 years 7 months ago by codewarrior.
Please Log in or Create an account to join the conversation.
11 years 7 months ago - 11 years 7 months ago #190128
by nicolas
Replied by nicolas on topic Round problem for products when discounts
Hi,
So, in that case, the solution is to increase the number of decimals of the discount percentage.
You can do that in two steps:
- First, run this SQL query in your MySQL database via your phpmyadmin:
ALTER TABLE `#__hikashop_discount` CHANGE `discount_percent_amount` `discount_percent_amount` DECIMAL( 10, 3 ) NOT NULL DEFAULT '0.00'
After replacing #__ by your table prefix.
- Change the percentage value of your discount from 63.14 to 63.143
So, in that case, the solution is to increase the number of decimals of the discount percentage.
You can do that in two steps:
- First, run this SQL query in your MySQL database via your phpmyadmin:
ALTER TABLE `#__hikashop_discount` CHANGE `discount_percent_amount` `discount_percent_amount` DECIMAL( 10, 3 ) NOT NULL DEFAULT '0.00'
After replacing #__ by your table prefix.
- Change the percentage value of your discount from 63.14 to 63.143
Last edit: 11 years 7 months ago by nicolas.
The following user(s) said Thank You: codewarrior
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
11 years 7 months ago #190240
by codewarrior
Replied by codewarrior on topic Round problem for products when discounts
Thanks Nicolas, you're the best !
It works fine now.
Could it be an option in new versions ?
It works fine now.
Could it be an option in new versions ?
Please Log in or Create an account to join the conversation.
11 years 7 months ago #190315
by nicolas
Replied by nicolas on topic Round problem for products when discounts
From next version on, we'll have three decimals support in the discount percentage field for new installs.
You won't need to do anything.
You won't need to do anything.
Please Log in or Create an account to join the conversation.
Time to create page: 0.330 seconds