Next Webinar: Maximizing Magento - Get the Most out of Promotions. Register Today!

Magento

Open Source eCommerce Evolved

Magento Forum

   
Category page meta tags don’t work
 
magentocommerce
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2007-11-21
 

Category page add Meta Description and Meta keyworkds right now but it sames don’t work.All my category use default setting too.There have Meta.phtml in the files but i havn’t find out where to add a dynamic meta.

 Signature 

china wholesale
tiffany jewelry

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2007-09-06
France
 

is there a solution for this problem ?
thanks

 Signature 

Lorenzo, a french guy.
Sorry for my english !!

 
Magento Community Magento Community
Magento Community
Magento Community
 
iblastoff
Sr. Member
 
Total Posts:  253
Joined:  2007-08-31
 

yes i fixed it on my installation. will show results in a little bit.

 Signature 

stevelam.ca | xpattern.net

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2007-09-06
France
 

how proceed to fix this bug ?
thanks

 Signature 

Lorenzo, a french guy.
Sorry for my english !!

 
Magento Community Magento Community
Magento Community
Magento Community
 
iblastoff
Sr. Member
 
Total Posts:  253
Joined:  2007-08-31
 

relevance: (ver. 0.8.16100)

this should get metakeywords and metadescriptions working when you’re viewing a category.

open the following:

app/code/core/Mage/Catalog/Block/Category/View.php

replace the protected function _prepareLayout() with this:

protected function _prepareLayout()
    
{
        parent
::_prepareLayout();

        
$this->getLayout()->createBlock('catalog/breadcrumbs');

        if (
$headBlock $this->getLayout()->getBlock('head')) {
            
if ($title $this->getCurrentCategory()->getMetaTitle()) {
                $headBlock
->setTitle($title.' '.Mage::getStoreConfig('catalog/seo/title_separator').' '.Mage::getStoreConfig('system/store/name'));
            
}
            
/*
            elseif ($headBlock = $this->getLayout()->getBlock('head')) {
                $headBlock->setTitle($this->getCurrentCategory()->getName());
            }
            */
            // start iblastoff metakeyword & metadescription fix
            
if ($keyword $this->getCurrentCategory()->getMetaKeyword()) {
                $headBlock
->setKeywords($keyword);
            
elseif( $currentCategory Mage::registry('current_category') ) {
                $headBlock
->setKeywords($currentCategory->meta_keywords);
            
}

            
if ($description $this->getCurrentCategory()->getMetaDescription()) {
                $headBlock
->setDescription( ($description) );
            
else {
                $headBlock
->setDescription$this->getCurrentCategory()->getDescription() );
            
}
            
// end iblastoff metakeyword & metadescription fix
        
}
        
if ($layout $this->getCurrentCategory()->getPageLayout()) {
            $template 
= (string)Mage::getConfig()->getNode('global/cms/layouts/'.$layout.'/template');
            
$this->getLayout()->getBlock('root')->setTemplate($template);
        
}

        
return $this;
    
}

 Signature 

stevelam.ca | xpattern.net

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2007-09-06
France
 

Works fine Thanks a lot.

 Signature 

Lorenzo, a french guy.
Sorry for my english !!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
40793 users|260 users currently online|87430 forum posts