On the Product page of magento, i want to get the product name, its category name and sub category name in the meta keywords tag.
Please help!!
Thanks in advance.
On the Product page of magento, i want to get the product name, its category name and sub category name in the meta keywords tag.
Please help!!
Thanks in advance.
Since products already have an attached MetaKeyword value, you can use an observer to unobtrusively extend that value. This method doesn't involve extending a core class
Try this:
/app/code/local/YourCompany/YourModule/etc/config.xml
/app/code/local/YourCompany/YourModule/Model/Observer.php
Are you meaning product details page ? if yes means very simple
Goto your specific product page,there should be tab "Meta Information".here you can add
You have to rewrite the Mage_Catalog_Block_Product_View class, especially the __preparelayout() method.
Simply add the following code in the _prepareLayout method you will overwrite:
It's important that you set the metakeyword and metadescription the way it's described above, else it will be overwritten again by the parent class(es).
Regards, Kenny