fix decimal price bug(convert to integer)
Step 1: |
change price data type in DB by exec these sql statement
UPDATE `eav_attribute` SET `attribute_model` = NULL , `backend_model` = '', `backend_type` = 'int', `backend_table` = '', `frontend_model` = '', `frontend_input` = 'price', `frontend_label` = 'price', `frontend_class` = '', `source_model` = '', `default_value` = '' WHERE `attribute_id` =99 LIMIT 1 ;
then exec
insert into catalog_product_entity_int (entity_type_id, attribute_id, store_id, entity_id, value)
select entity_type_id, attribute_id, store_id, entity_id, value from catalog_product_entity_decimal where attribute_id=99;
Step 2: |
change currencyFormat in /lib/zend/locale/data/fa.xml to <currencyFormats>
<currencyFormatLength>
<currencyFormat>
<pattern references="R046">#,##0 ¤;''-#,##0'' ¤</pattern>
</currencyFormat>
</currencyFormatLength>
</currencyFormats>
step 3: |
delete from catalog_product_entity_decimal where attribute_id=99; in /lib/zend/currency.php line 63: change
'precision' => 2, // precision for currency
to
'precision' => 0, // precision for currency

