Archive for December, 2011

How to solve Product Flat Data and Category Products (Indexed category/products association) reindex issue

Hello

Getting to this point ultimately lead to the resolution. Below is the process we used to solve the reindexing issue for Product Flat Data:

1) Export all catalog_product_flat _* tables with data and structure with “Disable foreign key checks” enabled.
2) Drop all catalog_product_flat _* tables.
3) Once check in Frontend , that products are categories are visible
4) Login to Magento backend
5) Go to: System -> Index Management
6) Click “Reindex Data” next to “Product Flat Data” index

Below is the process we used to solve the reindexing issue for Category Products (Indexed category/products association):

1) Log into phpMyAdmin
2) Go to `catalog_category_product_index`
3) Click “Export”.
4) Export only structure with “Disable foreign key checks” enabled.
5) Drop the table `catalog_category_product_index`
6) With the SQL that was exported, remove the constraints at the bottom of the export. Be sure to keep the “SET FOREIGN_KEY_CHECKS” statements.
7) Click “SQL”, paste in modified SQL and click “Go”
8) Login to Magento backend
9) Go to: System -> Index Management
10) Click “Reindex Data” next to “Category Products” index

Thanks

for more info visit mage-people

Advertisements

Magento: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘XX-XX’ for key “PRIMARY”

Just Run This code in SQL


<code><code>TRUNCATE `sales_flat_quote`;
 ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_address`;
 ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_address_item`;
 ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_item`;
 ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_item_option`;
 ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_payment`;
 ALTER TABLE `sales_flat_quote_shipping_rate` AUTO_INCREMENT=1;</code></code>

TRUNCATE `log_customer`;
 ALTER TABLE `log_customer` AUTO_INCREMENT=1;
 TRUNCATE `log_quote`;
 ALTER TABLE `log_quote` AUTO_INCREMENT=1;
 TRUNCATE `log_summary`;
<div></div>
ALTER TABLE `log_summary` AUTO_INCREMENT=1;
 TRUNCATE `log_summary_type`;
 ALTER TABLE `log_summary_type` AUTO_INCREMENT=1;
 TRUNCATE `log_url`;
 ALTER TABLE `log_url` AUTO_INCREMENT=1;
 TRUNCATE `log_url_info`;
 ALTER TABLE `log_url_info` AUTO_INCREMENT=1;
 TRUNCATE `log_visitor`;
 ALTER TABLE `log_visitor` AUTO_INCREMENT=1;
 TRUNCATE `log_visitor_info`;
 ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1;
 TRUNCATE `report_event`;
 ALTER TABLE `report_event` AUTO_INCREMENT=1;

for more info visit mage-people