Try the Demo

Magento Forum

   
Add Category Meta Tags using SQL
 
IanRyan
Sr. Member
 
Total Posts:  141
Joined:  2011-01-21
 

Can anyone tell me how I add category-level Meta Tags (i.e. Meta Title, Meta Description and Meta Keywords) using SQL.

My product catalogue comprises a very large number of categories and I do not particularly want to individually add the category Meta Tags one category at a time in the magento admin.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
IanRyan
Sr. Member
 
Total Posts:  141
Joined:  2011-01-21
 

I think I may have figured this out. I am running a multi-store setup on magento CE v1.7.0.2 and using a Flat Catalog. From what I gather the required SQL to update the category meta tags for a single store in my multi-store setup is as follows:-

UPDATE `catalog_category_flat_store_12SET `meta_description`=[my_desired_description],`meta_title`=[my_desired_title], `meta_keywords`=[my_desired_keywords]  WHERE `level` > 1

In this case `catalog_category_flat_store_12` is the flat category table for the store I am targeting i.e. store id 12.

I hope this is correct and that it may help someone else.

 
Magento Community Magento Community
Magento Community
Magento Community
 
IanRyan
Sr. Member
 
Total Posts:  141
Joined:  2011-01-21
 

I have tried:-

UPDATE `catalog_category_flat_store_12SET `meta_description`=[my_desired_description],`meta_title`=[my_desired_title], `meta_keywords`=[my_desired_keywords]  WHERE `level` > 1

but while the catalog_category_flat_store_12 table is updated correctly the meta tags do not appear under the categories in the magento admin.

It would seem that the updates instead need to be applied to the catalog_category_entity_varchar. Any help with the required SQL would be much appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top