Hi David,
Is there a guide to printing logos instead of names on the merchant page?
Thanks,
Patrick
Hi David,
Just implemented and got this error
"Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/sites/tabletopdishwasher.org.uk/public_html/merchants.php on line 16"
according to dreamweaver line 16 is
$item["name"] "";
thanks
Patrick
Hi Patrick,
ooops - there was an = missing - i've corrected in the post above...
Cheers,
David.
Just another comment to add; if using the new distribution you would need to use $product["merchant"] in place of $feed["merchant"], otherwise exactly the same.
Cheers,
David.
v12/10B
Hi David,
Tried the above using $product["merchant"] and still unable to display the merchant logo instead of their text name.
Have the following (BEFORE this mod) in merchants.php (excluding the "$banner" & "require" items at the bottom):
<?php
require("includes/common.php");
$atoz["items"] = array();
$sql = "SELECT DISTINCT(merchant) FROM `".$config_databaseTablePrefix."products` ORDER BY merchant";
if (database_querySelect($sql,$rows))
{
foreach($rows as $product)
{
$item = array();
$item["name"] = $product["merchant"];
if (file_exists($config_logoDirectory."logos/".$product["merchant"]))
{
$item["logo"] = $config_logoBaseHREF."logos/".$product["merchant"];
}
if ($config_useRewrite)
{
$item["href"] = urlencode(tapestry_hyphenate($product["merchant"]))."/";
}
else
{
$item["href"] = "search.php?q=merchant:".urlencode($product["merchant"]).":";
}
$atoz["items"][] = $item;
}
}
Suggestions?
Thanks!
Hi,
This section of your mod:
if (file_exists($config_logoDirectory."logos/".$product["merchant"]))
{
$item["logo"] = $config_logoBaseHREF."logos/".$product["merchant"];
}
...would rely on $config_logoDirectory and $config_logoBaseHREF being set - they're not distribution variables so that would be reliant on them being present, otherwise you could have a go with:
if (file_exists("logos/".$product["merchant"]))
{
$item["logo"] = $config_baseHREF."logos/".$product["merchant"];
}
Cheers,
David.
--
PriceTapestry.com
Hi David,
I think this mod is interfering:
http://www.pricetapestry.com/node/4611
Hi,
Ah, your custom $config_logoDirectory and $config_logoBaseHREF variables already contain the logos/ part, so have a go with just:
if (file_exists($config_logoDirectory.$product["merchant"]))
{
$item["logo"] = $config_logoBaseHREF.$product["merchant"];
}
Cheers!
David.
--
PriceTapestry.com
Hello David
I purchased the Dark Thoughts Template, have uploaded very easily. Now the Merchant logos do not show up on the product page - just the name of the merchant can you help me with this.
Also is there an option to use an image for the "Visit Store"
Thank You
Bobby
Hi Patrick,
Have a look at the information in this thread regarding showing merchant logos within the price comparison table. The directory and method of storing merchant logos would be the same; and then to use those logos in place of the merchant name on the merchant index page; have a look for the following code on line 14 of merchants.php
$item["name"] = $feed["merchant"];
...and REPLACE that with:
if (file_exists("logos/".$feed["merchant"]))
{
$item["name"] = "<img src='".$config_baseHREF."logos/".$feed["merchant"]."' border='0' />";
}
else
{
$item["name"] = $feed["merchant"];
}
Hope this helps!
Cheers,
David.