Post by Jsf » Mon Feb 17, 2014 7:28 pm

Hello,
I'm trying to find and understand how getLinks() works. My problem that in product source page
URL is without category, only example.com/product_keyword.

This only in source where
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" /><?php } ?>

although my URL in address bar is example.com/category_keyword/product_keyword

In controller/common/header.php I found only $this->data['links'] = $this->document->getLinks();
How to do <link href=... the same as URL in address bar?

/*
My personal OpenCart modules list
*/


User avatar
Jsf
New member

Posts

Joined
Sun Jan 26, 2014 4:08 am

Post by Jsf » Mon Feb 17, 2014 9:14 pm

found...
$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');

/*
My personal OpenCart modules list
*/


User avatar
Jsf
New member

Posts

Joined
Sun Jan 26, 2014 4:08 am
Who is online

Users browsing this forum: Bing [Bot] and 34 guests