You are here:  » Using a common logo directory

Support Forum



Using a common logo directory

Submitted by Convergence on Sun, 2012-05-06 23:02 in

Greetings,

Have multiple installs within one site. Need to be able to call the merchant logos from a common directory (like what is done with '$config_feedDirectory =' in 'config.advanced.php').

Any suggestions?

Thanks!

Submitted by support on Mon, 2012-05-07 10:22

Hi,

No problem - it's not used in many places so firstly, add new config.advanced.php variables as follows:

  $config_logoDirectory = "/path/to/logos/";
  $config_logoBaseHREF = "http://www.example.com/logos/";

Then in merchants.php look for the following code at line 16:

      if (file_exists("logos/".$product["merchant"]))
      {
        $item["logo"] = $config_baseHREF."logos/".$product["merchant"];
      }

...and REPLACE with:

      if (file_exists($config_logoDirectory."logos/".$product["merchant"]))
      {
        $item["logo"] = $config_logoBaseHREF."logos/".$product["merchant"];
      }

And in html/prices.php, look for the following code _within_ line 11:

<?php print (file_exists("logos/".$product["merchant"])?"<img src='".$config_baseHREF."logos/".$product["merchant"]."' border='0' />":$product["merchant"]); ?>

...and REPLACE with:

<?php print (file_exists($config_logoDirectory."logos/".$product["merchant"])?"<img src='".$config_logoBaseHREF."logos/".$product["merchant"]."' border='0' />":$product["merchant"]); ?>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Convergence on Mon, 2012-05-07 11:38

Thank you, David!

Looking forward to making the changes.

Thanks, again!