You are here:  » Currency not overwritten in searchresult.php when multiple merchants exist for one product

Support Forum



Currency not overwritten in searchresult.php when multiple merchants exist for one product

Submitted by juiank on Fri, 2012-05-11 12:05 in

Hello David again,

Thank you very much for your great support earlier.

I have another problem : I have several GBP currency merchants and one USD currency merchants. I have set the default currency to GBP, and showing USD$ for this specific merchant following the steps shown in the URL below :

http://www.pricetapestry.com/node/3982

This works great when there is only one merchant for one product. However when there are muliple merchants (e.g. 4 GBP merchants and 1 USD merchant for one product), tapestry_currencyHTML($product) does not work, "£" is shown for this merchant too.

(I have customized the searchresult.php so that all the merchant logos / prices are shown to the right of product description simultaenously. I will be sending over a screenshot to you if I am not explaining this very well. The code in problem looks like below :

      foreach($rows as $row)
        {
          print "<tr>";
print "<td width='100' align='center'><b><big>".tapestry_currencyHTML($product).$row["price"]."</big></b></td>";
print "<td width='100' align='right'><a target='_blank' href='".tapestry_buyURL($row)."'><img border='0' src='".$config_baseHREF."logos/".$row["merchant"]."' alt='".$product["name"]."' /></a></td>";
          print "</tr>";
        }

Strange thing is that tapestry_currencyHTML($product) works OK for price.php, even when there are multiple merchants shown in product.php, $ is shown to the merchant I have specified.

I bet some change is needed to searchresult.php, but I don't know what to change. Your help is greatly appreciated.

Cheers,

Juliank

Submitted by support on Fri, 2012-05-11 12:25

Hi Julian,

I think just a very small change required; in the code you posted; where you have:

tapestry_currencyHTML($product)

...instead use:

tapestry_currencyHTML($row)

Cheers,
David.
--
PriceTapestry.com

Submitted by juiank on Fri, 2012-05-11 14:08

Hello David,

The code perfectly worked !
I am very happy to have purchased Price Tapestry.
Your support is just too fantastic.

Have a nice weekend there -

Cheers,

Juliank