Skip to main content

Missing in product listing

More
15 years 4 weeks ago #24697 by emergentec
Hi!

Since the last update to HikaShop 1.5.3 there is no <title> tag when accessing the product listing page. (Joomla 1.7). On the product pages it works as it should

Best regards

Please Log in or Create an account to join the conversation.

More
15 years 4 weeks ago #24699 by nicolas
Hi,

I can see the title tag on products listings with the latest version regardless of the version of joomla (I tried them all just to make sure). I can also see the title tag on our demo website on listings.

So everything is OK on our end.

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #24847 by emergentec
OK, but where and how is this title generated? So I could solve the problem.

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #24848 by nicolas
It's added with the function setTitle in the file components/com_hikashop/views/product/view.html.php in the listing function.
As I said, it works properly so maybe you have something else on your website which removes the title after it's been added ?

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #24949 by emergentec
Could this problem be linked up to the fact, that in the menu manager the menu item to the product listing page is of type: HikaShop » com_hikashop_product_VIEW_DEFAULT_TITLE?

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #24950 by emergentec
I also just found a PHP Notice in our error log which could be the problem:
Code:
PHP Notice: Trying to get property of non-object in /.../www/components/com_hikashop/views/product/view.html.php on line 354, referer: http://....com/

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #24951 by nicolas
No, no, I was more thinking about a system plugin which would remove the title at the end of the page processing.

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #24982 by emergentec
But why should this system plugin only remove the title on the product listing page?

Line 354 of the view.html.php sets the title
Code:
$document->setTitle( strip_tags($element->category_name) );

I would also like to remove the error, there is obviously a bug in the view.html.php on line 354

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #24986 by nicolas
Hi,

Here is the code in the current version:
Code:
$page_title = $this->params->get('page_title'); $document =& JFactory::getDocument(); if((empty($page_title) && !empty($element->category_name)) || !$this->params->get('use_module_name')){ @$this->params->set('page_title',$element->category_name); $document->setTitle( strip_tags($element->category_name) ); }else{ $document->setTitle( $page_title ); }



Here is the code that will be in next version of HikaShop:
Code:
$document =& JFactory::getDocument(); $title = $this->params->get('page_title'); if(empty($title)){ $title = $this->params->get('title'); } $use_module = $this->params->get('use_module_name'); if(empty($use_module) && !empty($element->category_name)){ $title = $element->category_name; } $document->setTitle(strip_tags($title)); $this->params->set('page_title',$title);
I'm not sure if it will be ok to just replace it but you should try.

Please Log in or Create an account to join the conversation.

More
15 years 2 weeks ago #25318 by emergentec
Apart from missing braces in both code parts, it works now and the error message is gone! Thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.203 seconds
Powered by Kunena Forum