News:

Looking for documentation? Take a look on our wiki

Main Menu

Change price format

Started by builders, April 17, 2013, 18:02:51 PM

Previous topic - Next topic

builders

I have VM 2.0.6 and i would like to solve a problem with price FORMAT.

I want VM to accept price with the following format 1.200,54   now this is accepted as 1000,54.
As i understand first i shall  change the field in mysql to accept the price with the format i want. (i use a parser and this is the format i get from the xml).
I found in table virtuemart_product_prices   the field Product_price has Decimal 15,5 how can i change it to accept the number as 1.000,54 ? After solving that what shall i change at VM to show the price like this ??

Thanks

jenkinhill

Note: all VirtueMart versions before 2.0.10 are insecure, so an update is recommended.

In the current version the Decimals, Decimal Symbol and Thousands Separator are set in the currency editor.
http://docs.virtuemart.net/manual/21-configuration-menu/68-edit-currency.html
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

builders

I have updated to 2.0.20b

I want the database field to accept this kind of number 1.203,58   i have to import those numbers as it. How can i do that ?

That change has to be at field in sql. Now product_price filed inside table virtuemart_product_prices   is  decimal(15,5) that is not accepting the number as 1.000,48 it only accepts 1000,48.  To what shall i change this field in order to accept the dot ?

Thanks

AH

change your input using a regex expression and leave the database alone - it will lead to issues in the rest of vm no doubt, if you mess with the DB
Regards
A

Joomla 3.10.11
php 8.0