Round problem for products when discounts

  • Posts: 190
  • Thank you received: 0
10 years 7 months ago #189930

-- 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

Please Log in or Create an account to join the conversation.

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 7 months ago #189942

Hi,

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.

  • Posts: 190
  • Thank you received: 0
10 years 7 months ago #189999

Thanks Nicolas for answering.
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.

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 7 months ago #190002

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 ?

Please Log in or Create an account to join the conversation.

  • Posts: 190
  • Thank you received: 0
10 years 7 months ago #190119

Thanks Nicolas









Last edit: 10 years 7 months ago by codewarrior.

Please Log in or Create an account to join the conversation.

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 7 months ago #190128

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

Last edit: 10 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.

  • Posts: 190
  • Thank you received: 0
10 years 7 months ago #190240

Thanks Nicolas, you're the best !
It works fine now.

Could it be an option in new versions ?

Please Log in or Create an account to join the conversation.

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 7 months ago #190315

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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum