You are here:  » Mod for merchants.php


Mod for merchants.php

Submitted by thelegacy on Wed, 2012-01-04 03:36 in

Hi again David,

I was wondering, would it be possible to add say a paragraph of text along with the merchant's logo to show on the merchants page? I tinkered with the current code of the latest installation, but was only able to get one or the other to show at a time.

I remember vaguely how to add just the text files for merchants, but I'd like to include the logo's with these as well to better promote the fashions I am running.

Thanks,

Ray

Submitted by support on Wed, 2012-01-04 07:01

Hi Ray,

Sure - as a first step create your merchant info HTML in files according to the similar modification as described in this thread.

With the /merchantinfo/ folder in place, in merchants.php look for the following code at line 30:

      $atoz["items"][] = $item;

...and REPLACE with:

      $merchantinfoFilename = "merchantinfo/".$product["merchant"].".html";
      if (file_exists($merchantinfoFilename))
      {
        $item["info"] = file_get_contents($merchantinfoFilename);
      }
      $atoz["items"][] = $item;

Finally, in html/atoz.php, look for the following code at line 58:

    print "</p>";

...and REPLACE with:

    if (isset($item["info"]))
    {
      print $item["info"];
    }
    print "</p>";

Cheers,
David.
--
PriceTapestry.com

Submitted by thelegacy on Thu, 2012-01-05 01:38

Thanks David,

Works a treat as usual.