Advertisement
Guest User

Fix categories after usage Magmi utility

a guest
Aug 11th, 2014
1,168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.70 KB | None | 0 0
  1. /* Fix categories after usage of Magmi utility "Clear Catalog, Categories and Reviews v1.0.1" */
  2. /* For Magento 1.7.0.2, make the same from clean install of Magento for any another version */
  3. SET FOREIGN_KEY_CHECKS=0;
  4.  
  5. TRUNCATE `catalog_category_entity`;
  6. INSERT INTO `catalog_category_entity` (`entity_id`, `entity_type_id`, `attribute_set_id`, `parent_id`, `created_at`, `updated_at`, `path`, `position`, `level`, `children_count`) VALUES
  7. (1, 3, 0, 0, '2014-02-26 16:08:26', '2014-02-26 16:08:26', '1', 0, 0, 1),
  8. (2, 3, 3, 1, '2014-02-26 16:08:26', '2014-02-26 16:08:26', '1/2', 1, 1, 0);
  9.  
  10. TRUNCATE `catalog_category_entity_datetime`;
  11. TRUNCATE `catalog_category_entity_decimal`;
  12. TRUNCATE `catalog_category_entity_int`;
  13.  
  14. INSERT INTO `catalog_category_entity_int` (`value_id`, `entity_type_id`, `attribute_id`, `store_id`, `entity_id`, `value`) VALUES
  15. (1, 3, 67, 0, 1, 1),
  16. (2, 3, 67, 1, 1, 1),
  17. (3, 3, 42, 0, 2, 1),
  18. (4, 3, 67, 0, 2, 1),
  19. (5, 3, 42, 1, 2, 1),
  20. (6, 3, 67, 1, 2, 1);
  21.  
  22. TRUNCATE `catalog_category_entity_text`;
  23.  
  24. INSERT INTO `catalog_category_entity_text` (`value_id`, `entity_type_id`, `attribute_id`, `store_id`, `entity_id`, `value`) VALUES
  25. (1, 3, 65, 0, 1, NULL),
  26. (2, 3, 65, 1, 1, NULL),
  27. (3, 3, 65, 0, 2, NULL),
  28. (4, 3, 65, 1, 2, NULL);
  29.  
  30. TRUNCATE `catalog_category_entity_varchar`;
  31.  
  32. INSERT INTO `catalog_category_entity_varchar` (`value_id`, `entity_type_id`, `attribute_id`, `store_id`, `entity_id`, `value`) VALUES
  33. (1, 3, 41, 0, 1, 'Root Catalog'),
  34. (2, 3, 41, 1, 1, 'Root Catalog'),
  35. (3, 3, 43, 1, 1, 'root-catalog'),
  36. (4, 3, 41, 0, 2, 'Default Category'),
  37. (5, 3, 41, 1, 2, 'Default Category'),
  38. (6, 3, 49, 1, 2, 'PRODUCTS'),
  39. (7, 3, 43, 1, 2, 'default-category');
  40.  
  41. SET FOREIGN_KEY_CHECKS=1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement