hi
Is it possible to include a merchent image on the merchant page.
Thanks
brent
hi
What i want to do is put a the merchant logo on the merchant page ie
http://www.4utoday.co.uk/merchant/
at present it just generates and shows the merchants name.
thanks
Brent
Hi Brent,
The changes would have to made to line 14 of merchants.php, currently:
$item["name"] = $feed["merchant"];
The contents of $item["name"] is displayed by the html/atoz.php module within a hyperlink to the merchant's page. To implement this, first you would have to setup your merchant logos directory as described in the other thread:
http://www.pricetapestry.com/node/314
Next, replace line 14 of merchants.php with something like this, depending on how you want the logos to be displayed. This code will display the logo (if it exists) with the merchant name below:
if (file_exists("logos/".$feed["merchant"]))
{
$item["name"] = "<img src='".$config_baseHREF."logos/".$feed["merchant"]."' /><br />";
// if you don't want the merchant name displayed when
// there is a logo, just comment out the next line...
$item["name"] .= $feed["merchant"];
}
else
{
$item["name"] = $feed["merchant"];
}
Hope this helps!
Cheers,
David.
Hi Brent,
Have a look at this thread for information on using merchant logos (quite a few users have implemented this)
http://www.pricetapestry.com/node/314
When you say the merchant page; do you mean the search results "per merchant", having clicked browse by Merchant, and then selecting a merchant?
The actual page displayed at that point is search.php, where the query will be something like:
merchant:Merchant Name:
Within the script; the $q variable has been split on the ":" character into the $parts variable; so at any point within the html you can look at $parts[0] and if it contains "merchant" you know that $parts[1] will contain the merchant name. You can then use $parts[1] to look in your logos directory to see if this merchant has a logo; and then generate the imgage HTML as required.
Let me know where abouts you would like the logo to go if you want more help with the code...
Cheers,
David.