You are here:  » High Price Products Displaying Wrong Price


High Price Products Displaying Wrong Price

Submitted by raveon on Sun, 2011-12-18 10:55 in

Hello,

I just imported a large datafeed and products that contain a price value of "2,995.00" (for example) are being displayed as "3.00".

I am importing a CSV file that is not using quotes around the text if that has any relevance. (this has worked the best by far)

When the CSV file is viewed in Excel the large value is correct.

Thanks

Submitted by support on Sun, 2011-12-18 10:59

Hi Raveon,

To correct this for high price products using comma separation; in includes/tapestry.php look for the following code at line 36:

    $price = str_replace(",",".",$price);

...and REPLACE with:

    $price = str_replace(",","",$price);

Cheers,
David.
--
PriceTapestry.com

Submitted by raveon on Sun, 2011-12-18 23:24

Thanks David, that fixed it.

Submitted by Perce2 on Tue, 2022-03-22 15:10

Hi David,

having the exact same issue on a WordPress site, items that should be £4,599 are showing as £4.60.

Have tried your fix but it didn't make any difference, I assume this should still work?
Any ideas?

Regards

Submitted by support on Wed, 2022-03-23 09:28

Hi,

To add support for this format, reverse the above modification if not already done so, and then look for the following code at line 33:

    if (strpos($price,","))

...and REPLACE with:

    if ((strpos($price,",")>2) && (!strpos($price,".")))
    {
      $price .= ".00";
    }
    if (strpos($price,","))

Cheers,
David.
--
PriceTapestry.com

Submitted by Perce2 on Wed, 2022-03-23 10:47

Perfect!

many thanks David.