Eliot
thanks for the reply. The default code for views product show is
<?php
if(isset($this->element->product_canonical) && !empty($this->element->product_canonical)){
$parsedCanonical = parse_url($this->element->product_canonical);
$parsedCurrent = parse_url(JURI::base());
if(!isset($parsedCanonical['query']))
$endUrl = $parsedCanonical['path'];
else
$endUrl = $parsedCanonical['path'].'?'.$parsedCanonical['query'];
$canonicalUrl = $parsedCurrent['scheme'].'://'.$parsedCurrent['host'].$endUrl;
$doc =& JFactory::getDocument();
$doc->addCustomTag( '<link rel="canonical" href="'.$canonicalUrl.'" />' );
}
?>
Nicolas advised me to change it to
$canonical=false;
if(!empty($this->element->main->product_canonical)){
$canonical = $this->element->main->product_canonical;
}elseif(!empty($this->element->product_canonical)){
$canonical = $this->element->product_canonical;
}
if($canonical){
$doc = JFactory::getDocument();
$doc->addCustomTag( '<link rel="canonical" href="'.hikashop_cleanURL($canonical).'" />' );
}
I then get an error
Call to undefined function hikashop_cleanURL() in /test/templates/shape5_vertex/html/com_hikashop/product/show.php on line 19
Dave