When i enter a price like : 2,55 the program change it to 2,00. when I use ","
I want to change input price decimal "." to ","
How to do it
My opencart is 1.4.9.3.
thanx
I want to change input price decimal "." to ","
How to do it
My opencart is 1.4.9.3.
thanx
Last edited by skip on Wed Nov 16, 2011 6:32 am, edited 1 time in total.
In this locked post (http://forum.opencart.com/viewtopic.php?t=839) member "lepotros" say:
In fact, i thought the problem was a SQL configuration in Decimal.
I changed, in SQL-Product-decimal the value of 15,4 for 15,2, that correspond to the configuration of Opencart, and it works.
But I dont know what he mean under "SQL-Product-decimal" ?
anybody understood ?
In fact, i thought the problem was a SQL configuration in Decimal.
I changed, in SQL-Product-decimal the value of 15,4 for 15,2, that correspond to the configuration of Opencart, and it works.
But I dont know what he mean under "SQL-Product-decimal" ?
anybody understood ?
Aha I know now
Go to phpmyadmin-> product table-> structure tab ->change the value to 15,2
But its not work now is admin price in this format 100.00 This number cut last 2 decimal places
(100.0000 to 100.00) but for input price I still must use "."
Go to phpmyadmin-> product table-> structure tab ->change the value to 15,2
But its not work now is admin price in this format 100.00 This number cut last 2 decimal places
(100.0000 to 100.00) but for input price I still must use "."
I"ll try this first but without result
In admin/language/mylanguage/mylanguage.php I change
$_['decimal_point'] = ',';
but product price input is posible only with point !
If I use comma -> all number behind cooma is lost
input 200,45 -> produce 200.00
In admin/language/mylanguage/mylanguage.php I change
$_['decimal_point'] = ',';
but product price input is posible only with point !
If I use comma -> all number behind cooma is lost
input 200,45 -> produce 200.00
I have problem for price also. instead of . or , the string "thousand_point" and "decimal_point" is showing with the price.
Ex: 5,240.00
it is showing 5thousand_point240decimal_point00
I attached the screenshot for your reference.
Ex: 5,240.00
it is showing 5thousand_point240decimal_point00
I attached the screenshot for your reference.
Attachments
There was an old VqMod, possibly basically explaining, where it shoud be done:
Ernie
Code: Select all
<modification>
<id>Comma as decimal point when saving product</id>
<version>1.5.4</version>
<vqmver>2.2.1</vqmver>
<author>Istvan Dobrentei, http://www.dobrenteiistvan.hu</author>
<file name="admin/model/catalog/product.php">
<operation>
<search position="after"><![CDATA[function editProduct($product_id, $data) {]]></search>
<add><![CDATA[
$data['price'] = str_replace(",", ".", $data['price']);
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[function addProduct($data) {]]></search>
<add><![CDATA[
$data['price'] = str_replace(",", ".", $data['price']);
]]></add>
</operation>
</file>
</modification>
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
for Version 1.5.4, really !?
Ernie

Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Well, this could possibly at least solve your problem on the front side,
and it comes for free, so, you can find out free of charge!
Good Luck
Ernie
---
Change default weight settings, separators, add weight units
0_decimals
- First, it will define the language setting of the user. For example from the English language 1,000.00 will become 1.000,00 in French.
- Second, will reduce the decimals to zero. It means that 30.00 will become 30.
1_decimal
- First, it will define the language setting of the user. For example from the English language 1,000.00 will become 1.000,00 in French.
- Second, will reduce the decimals to one. It means that 1,030.00 will become 1,030.0. For example in French 1,030.00 will become 1.030,0.
3_decimals
- First, it will define the language setting of the user. For example from the English language 1,000.00 will become 1.000,00 in French.
- Second, will set the decimals to 3. It means that 1030.00 will become 1,030.000. For example in French 1,030.00 will become 1.030,000. Nice when working in kilograms.
language_defined
- It will define the language setting of the user. For example from the English language 1,000.00 will become 1.000,00 in French. !!! NOTE !!! Only install this ocmod when the 0_decimals, 1_decimal or 3_decimals are NOT installed or used.
https://www.opencart.com/index.php?rout ... n_id=32974
---
and it comes for free, so, you can find out free of charge!
Good Luck

Ernie
---
Change default weight settings, separators, add weight units
0_decimals
- First, it will define the language setting of the user. For example from the English language 1,000.00 will become 1.000,00 in French.
- Second, will reduce the decimals to zero. It means that 30.00 will become 30.
1_decimal
- First, it will define the language setting of the user. For example from the English language 1,000.00 will become 1.000,00 in French.
- Second, will reduce the decimals to one. It means that 1,030.00 will become 1,030.0. For example in French 1,030.00 will become 1.030,0.
3_decimals
- First, it will define the language setting of the user. For example from the English language 1,000.00 will become 1.000,00 in French.
- Second, will set the decimals to 3. It means that 1030.00 will become 1,030.000. For example in French 1,030.00 will become 1.030,000. Nice when working in kilograms.
language_defined
- It will define the language setting of the user. For example from the English language 1,000.00 will become 1.000,00 in French. !!! NOTE !!! Only install this ocmod when the 0_decimals, 1_decimal or 3_decimals are NOT installed or used.
https://www.opencart.com/index.php?rout ... n_id=32974
---
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
It can not be changed.
Its how number are handeled in the database.
A comma is a data separator ie something in front of comma is a separate value something behind comma is a separate value.
15.0000 will be treated as a nummeric value with 4 decimals, 15,0000 will be treated as 2 separate pieces of data, 15 and 0000
This behavior is not limited to oc only, every e-commerce Application works like this.
Its how number are handeled in the database.
A comma is a data separator ie something in front of comma is a separate value something behind comma is a separate value.
15.0000 will be treated as a nummeric value with 4 decimals, 15,0000 will be treated as 2 separate pieces of data, 15 and 0000
This behavior is not limited to oc only, every e-commerce Application works like this.
Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com
Yes but this code
allows to write comma but saves point in the db and i would like to have the same for price options
Code: Select all
<modification>
<id>Comma as decimal point when saving product</id>
<version>1.5.4</version>
<vqmver>2.2.1</vqmver>
<author>Istvan Dobrentei, http://www.dobrenteiistvan.hu</author>
<file name="admin/model/catalog/product.php">
<operation>
<search position="after"><![CDATA[function editProduct($product_id, $data) {]]></search>
<add><![CDATA[
$data['price'] = str_replace(",", ".", $data['price']);
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[function addProduct($data) {]]></search>
<add><![CDATA[
$data['price'] = str_replace(",", ".", $data['price']);
]]></add>
</operation>
</file>
</modification>
Who is online
Users browsing this forum: No registered users and 2 guests