You are here:  » Productpage include links to category, brand and merchant page.


Productpage include links to category, brand and merchant page.

Submitted by APZ215 on Wed, 2019-02-06 09:40 in

Hello David
Can you show the code we need to use to link the category, brand and merchant page from a productpage.

EXAMPLE TEXT: Buy 'Dishes (1)' from the category 'Tableware (2)' of the brand 'Denby (3)' on the website of 'Pricetapestry (4)'

Productpage include links to category, brand and merchant page.

1 /product/ProductName/
2 /category/CategoryName/
3 /brand/BrandName/
4 /merchant/MerchantName/

SAMPLE @ {link saved}

Second question:
I can't find the SidebarFilters.zip from https://www.pricetapestry.com/node/4788 in the download section, is it gone? I am searching the support form for filter options and using text links instead of dropdowns, have you got any suggestions wich node to check?

Thanks and greetings Arlo

Submitted by support on Wed, 2019-02-06 10:03

Hi Arlo,

The code for that text for use in html/product.php would be:

    <p>
      Buy <?php print "<a href='".tapestry_productHREF($product_main)."'>".$product_main["name"]."</a>"?>
      from the category <?php print "<a href='".tapestry_indexHREF("category",$product_main["category"])."'>".$product_main["category"]."</a>"?>
      of the brand <?php print "<a href='".tapestry_indexHREF("brand",$product_main["brand"])."'>".$product_main["brand"]."</a>"?>
      on the website of <?php print "<a href='".tapestry_indexHREF("merchant",$product_main["merchant"])."'>".$product_main["merchant"]."</a>"?>
    </p>

If all products have category and brand then you can just use the above but if not, you can make the category and brand text conditional as follows:

    <p>
      Buy <?php print "<a href='".tapestry_productHREF($product_main)."'>".$product_main["name"]."</a>"?>
      <?php if($product_main["category"]): ?>from the category <?php print "<a href='".tapestry_indexHREF("category",$product_main["category"])."'>".$product_main["category"]."</a>"?><?php endif; ?>
      <?php if($product_main["brand"]): ?>of the brand <?php print "<a href='".tapestry_indexHREF("brand",$product_main["brand"])."'>".$product_main["brand"]."</a>"?><?php endif; ?>
      on the website of <?php print "<a href='".tapestry_indexHREF("merchant",$product_main["merchant"])."'>".$product_main["merchant"]."</a>"?>
    </p>

Sidebar Filters (Foundation Templates) download can be found here (scroll down to Other Downloads section)...

Cheers,
David.
--
PriceTapestry.com

Submitted by APZ215 on Wed, 2019-02-06 12:46

Thanks again David... #ThumbsUp!