hi
Does anyone know if it is possible to create a marquee of the merchants automatically then when a user clicks on a merchant it takes you direct to that merchant?
thanks
hi david
thats great but how do i remove the border around the images and slow the scroller down.
great support as usual
cheers
paul
Hi Paul,
To remove the border, the following line:
print "<img src='".$config_baseHREF."logos/".$row["merchant"]."' />";
...should be:
print "<img border='0' src='".$config_baseHREF."logos/".$row["merchant"]."' />";
There are various attributes that can be applied to the marquee tag, try experimenting with different values for scrolldelay, e.g. in place of:
<marquee>
Try:
<marquee scrolldelay='100'>
The value is in milliseconds, and is the delay between each shift of the marquee content...
Cheers,
David.
--
PriceTapestry.com
Hello David,
I implemented this marquee into a page and it scrolled for the first 5 or so merchants, and then stops and restarts. Is there a quick way to have this feature scroll continuously and maybe restart when its done?
Thanks, TPH
Hello TPH,
I'm not sure why it's limiting to 5 merchants (I presume you have many more on your site) built check the HTML source code being generated by your script (use your browser's View > Source tool) then search for the <marqee> tags and check that all merchants appear to be displayed between them.
For continuous looping, try modifying the opening marquee tag as follows:
<marquee loop='infinite'>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
Hello David,
Yes the marquee tag in the source appears to be in the source but it seems to trigger a restart of the loop when it hits the other side of the page.
I'm not that bothered about this feature for now anyway.
Thanks for the quick response
Hi Paul,
The following code would create a MARQUEE element containing the list of merchants by name, or their logo (if exists)...
<marquee>
<?php
$sql = "SELECT DISTINCT(merchant) AS merchant FROM
`".$config_databaseTablePrefix."products` ORDER BY merchant";
database_querySelect($sql,$rows);
foreach($rows as $row)
{
if ($config_useRewrite)
{
$href = $config_baseHREF."merchant/".tapestry_hyphenate($row["merchant"])."/";
}
else
{
$href = $config_baseHREF."search.php?q=merchant:".urlencode($row["merchant"]).":";
}
print " <a href='".$href."'>";
if (file_exists("logos/".$row["merchant"]))
{
print "<img border='0' src='".$config_baseHREF."logos/".$row["merchant"]."' />";
}
else
{
print $row["merchant"];
}
}
?>
</marquee>
Cheers,
David.
--
PriceTapestry.com