0

Category META Tags(Titles, Descriptions, Keywords) Import not possible at the back end, how can I import into DB using MySQL Query?

1

You can execute below query.

Assumption - Category already created. Also one more thing, you have to replace replace_this_with_category_id with entity_id that will reference to catalog_category_entity table.

Adding values for 46 (see eav_attribute) - META title, 47 (see eav_attribute) for META keywords, 48 (see eav_attribute) for META DESCRIPTION

INSERT INTO `catalog_category_entity_varchar`
(`value_id`, `entity_type_id`, `attribute_id`, `store_id`, `entity_id`, `value`) 
VALUES 
('',3,46,0,'replace_this_with_category_id','META TITLE') ON DUPLICATE KEY UPDATE `entity_id` = 'replace_this_with_category_id',`value` = 'META TITLE',
('',3,46,0,'replace_this_with_category_id','META TITLE 1') ON DUPLICATE KEY UPDATE `entity_id` = 'replace_this_with_category_id',`value` = 'META TITLE 1',
('',3,46,0,'replace_this_with_category_id','META TITLE 2') ON DUPLICATE KEY UPDATE `entity_id` = 'replace_this_with_category_id',`value` = 'META TITLE 2';


INSERT INTO `catalog_category_entity_text`
(`value_id`, `entity_type_id`, `attribute_id`, `store_id`, `entity_id`, `value`) 
VALUES 
('',3,47,0,'replace_this_with_category_id',`META KEYWORDS`) ON DUPLICATE KEY UPDATE `entity_id` = 'replace_this_with_category_id',`value` = 'META KEYWORDS',
('',3,47,0,'replace_this_with_category_id',`META KEYWORDS2`)  ON DUPLICATE KEY UPDATE `entity_id` = 'replace_this_with_category_id',`value` = 'META KEYWORDS2',
('',3,48,0,'replace_this_with_category_id',`META DESCR`)  ON DUPLICATE KEY UPDATE `entity_id` = 'replace_this_with_category_id',`value` = 'META DESCR',
('',3,48,0,'replace_this_with_category_id',`META DESCR2`)  ON DUPLICATE KEY UPDATE `entity_id` = 'replace_this_with_category_id',`value` = 'META DESCR2';

Just replace replace_this_with_category_id with category_id.

But make sure you take backup of your db first.

  • Is possible can I import bulk or keep writing query line by line for every category,,,, because in my site consists 100 's of category. – user51361 Jun 25 '17 at 4:31
  • then you can use this - MageWorks Extension magentoworks.net/import_categories.zip – sandip Jun 25 '17 at 4:34
  • after importing the file into the root folder, how can I use it, any formate? – user51361 Jun 26 '17 at 6:04
  • in Backend, it will be under MageWorks menu, it will have two options export and import profiles – sandip Jun 26 '17 at 7:17
  • when i export i get error like : Fatal error: Unsupported operand types in C:\wamp\www\abcd\app\code\core\Mage\ImportExport\Model\Export\Entity\Product.php on line 875 – user51361 Jun 26 '17 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy