You are here:  » merchant logo within Featured product


merchant logo within Featured product

Submitted by fstore on Fri, 2012-10-19 06:52 in

Hi David
I am trying to add the merchant name/logo in the feature area of each produca just above the more information link.
You helped me before to implement this for search results listing.

I added the following HTML code under PT setting> feature product>each. but its not showing the name or logo of merchant.
Is there any other changes require?

 <br />
<nobr><a href='%MERCHANT_SEARCH_URL%'>%MERCHANT%</a></nobr> <br/>

Regards
Hassan

Submitted by support on Fri, 2012-10-19 07:10

Hello Hassan,

The code needed to support the placeholders needs to be added to pto_featured.php. In that file, look for the following code at line 77:

    $each = str_replace("%PRODUCT_NAME%",$row->name,$each);

...and REPLACE with:

    $each = str_replace("%PRODUCT_NAME%",$row->name,$each);
    global $pto_config_merchantBaseHREF;
    global $pto_config_externalPath;
    global $pto_config_externalBaseHREF;
    $merchant_search_url = get_bloginfo('url').$pto_config_merchantBaseHREF."/".pto_common_hyphenate($row->merchant)."/";
    $each = str_replace("%MERCHANT_SEARCH_URL%",$merchant_search_url,$each);
    $merchant_html = $row->merchant;
    if ($pto_config_externalPath)
    {
      if (file_exists($pto_config_externalPath."logos/".$row->merchant))
      {
        $merchant_html = "<img border='0' src='".$pto_config_externalBaseHREF."logos/".$row->merchant."' />";
      }
    }
    $each = str_replace("%MERCHANT%",$merchant_html,$each);

Cheers,
David.
--
PriceTapestry.com