You are here:  » Currency Types


Currency Types

Submitted by waltonp on Tue, 2006-08-08 09:49 in

Hi

Is there any way of adjusting the price field to free text instead of integer as it is now. I have a number of products in different currencies and would like to adjust the currency for each product as necessary. If I use a record with say "50 Euros" in the price field then price tapestry just strips the "Euros" part out and only shows the integer part.

Thanks

Submitted by support on Tue, 2006-08-08 16:10

Hi,

It would be possible to make the price field free text, but does require quite a few mods and of course a change to the price field type in the database. You would need to remove the calls to the decimalisation functions (which is why "Euros" is stripped), and also remove the sort by price (ascending / descending) options from the search results.

Initially, I would start by changing the data type of the price field in the products table to VARCHAR(255) (you could use phpMyAdmin to do this); and then remove the call to tapestry_decimalise on line 166 of includes/admin.php. You should then be able to import free text into the price field; and it would then be a case of running through all the functions and making any cosmetic changes where necessary.

You would also want to leave $config_currencyHTML blank in config.php.

Cheers,
David.