You are here:  » Linking additional fields on product page

Support Forum



Linking additional fields on product page

Submitted by Convergence on Sun, 2012-05-20 08:27 in

v12/10B

Greetings,

Have added additional fields to the product page (html/product.php) per http://www.pricetapestry.com/node/4056

Now we would like to link the displayed category to their respective category.

Example:

We have Category: [category name]
We want to link [category name] to:
example.com/category/[category name]/

Code we have now is:

        <?php if ($mainProduct["category"]): ?>
          <?php print translate("Category"); ?>:&nbsp;<?php print $mainProduct["category"]; ?></p>
        <?php endif; ?>

Thanks!

Submitted by support on Mon, 2012-05-21 07:43

Hi,

Have a go with:

  <?php if ($mainProduct["category"]): ?>
    <?php print translate("Category"); ?>:&nbsp;<a href='<?php print $config_baseHREF."category/".tapestry_hyphenate($mainProduct["category"])."/"?>'><?php print $mainProduct["category"]; ?></a></p>
  <?php endif; ?>

Cheers,
David.
--
PriceTapestry.com

Submitted by Convergence on Mon, 2012-05-21 08:10

Hi David,

Works PERFECTLY, thank you!