I'm using Opencart 1.5.4.
How to echo canonical link in the product.tpl? I need that for some reason (twitter counturl).
I can see in the header.tpl that canonical link is easily echoed using this:
Code: Select all
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
I think this must be something related with controller file.
But I just want simple solution. Since the canonical link has been declared in the header, can we just "copy paste" that form header.tpl to product.tpl?
Example, in header.tpl we use $copy_canonical = $link['href']; and then in product.tpl just echo $copy_canonical;
I think that will not be as simple as that, right?
What is the simplest solution?