News:

Support the VirtueMart project and become a member

Main Menu

Please don't strip my zeros!

Started by serazoo, December 27, 2020, 17:15:46 PM

Previous topic - Next topic

serazoo

Hello VM community :)

I'm using Joomla 3.9.23 and VirtueMart 3.8.6 10373
I'm sure this not a bug but can this be modified?

I'm using a php report that pulls virtuemart info directly form database
In product "Cost price", "Base price" or "Final price", I would like them to keep the .00 decimals, they all are stripped away when I save product info
I've checked, unchecked "Show rounded price"... and played with the "price" tab : in rounding values : -1 , or 0  or 2...

My report still gives me :
4$
3,22$
13,5$
190$
8,05$
3,16$

instead of :
4,00$
3,22$
13,50$
190,00$
8,05$
3,16$

Thank you :)



GJC Web Design

must be your code as the price is stored to 6 figures

try displaying as number_format($price,2);
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42