Hello David
I've asked this before but cannot find the relevant thread with the answer.
I'm trying to import a feed where the price field is a price range, so for example "£200 - £300"
Is it possible to work with this?
Thanks Mally
Hello David
I've just checked and it would appear the actual field for price says "363 - 593" in the datafeed, so does not have the pound symbol.
I've done what you mentioned above and the price is showing only as 363
Its deleting the - 593
I've changed the config back to £ so that appears, just not sure whay the price range is not showing, can you help?
Thanks Mally
Hi Mally,
Could you email me a copy of your includes/admin.php and I'll check it out - if everything looks OK i'll send back a debug script to figure out where the field is being converted...
Cheers,
David.
Hi Mally,
On a new installation, where all price fields are going to be like that it would be straight forward to change the price field in the products table to VARCHAR(255) instead of DECIMAL(10,2).
Code changes wise, primarily this would be within the import record handler function - you'd need to remove or comment out the following code on line 168 of includes/admin.php:
$record[$admin_importFeed["field_price"]] = tapestry_decimalise($record[$admin_importFeed["field_price"]]);
With that in place, if you simply set $config_currencyHTML to an empty string in config.php; e.g.
$config_currencyHTML = "";
...then price fields should be displayed exactly as imported - and this would save you from having to remove the currency variable from all fields.
Hope this helps!
Cheers,
David.