Mass Action Round Prices

  • Posts: 248
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
5 years 3 months ago #302298

-- url of the page with the problem -- : aquacorals.com
-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.2
-- Browser(s) name and version -- : Firefox 63.0.3

What would be the correct equation to round all prices to the nearest even dollar amount?

in Mass Actions I've got price_value=operation=round(price.price_value*1,2) to change a price like 57.33 to 57.00 or a price like 45.67 to 46.00
Is that correct?

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

  • Posts: 81509
  • Thank you received: 13064
  • MODERATOR
5 years 3 months ago #302342

Hi,

I think you want to use round(price.price_value*1, 0) so that you can round at the dollar level, not the cent level.

The following user(s) said Thank You: a2zcs

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

  • Posts: 248
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
5 years 3 months ago #302376

Perfect. Thanks!

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

Time to create page: 0.057 seconds
Powered by Kunena Forum