You are here:  » Link in description

Support Forum



Link in description

Submitted by henk on Thu, 2012-04-05 19:19 in

Hi David,

I want a link in the product description to all products who has that brand

This is what i have:

<p>Merk: <?php print $mainProduct["brand"]; ?></p>

Thx
Henk

Submitted by support on Thu, 2012-04-05 19:26

Hello Henk,

In place of your code, have a go with

<?php
if ($config_useRewrite)
{
  $brandHREF = $config_baseHREF."brand/".urlencode(tapestry_hyphenate($mainProduct["brand"]))."/";
}
else
{
  $brandHREF = $config_baseHREF."search.php?q=brand:".urlencode($mainProduct["brand"]);
}
?>
<p>Merk: <?php print "<a href='<?php print $brandHREF; ?>'>".$mainProduct["brand"]."</a>"; ?></p>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Thu, 2012-04-05 19:40

i hav now a link like this:

http://elektronica.linkik.com/product/<?php print/brand/Melitta/;?>

Thx Henk

Submitted by henk on Fri, 2012-04-06 09:41

It was easier then i thought:

<p>Categorie: <a href="/category/<?php print $product["category"]; ?>/"><?php print $product["category"]; ?></a> </p>
<p>Merk: <a href="/brand/<?php print $product["brand"]; ?>/"><?php print $product["brand"]; ?></a> </p

Thx
Henk