I need to fetch whole customer data from mysql by query. I need to get data by entity_id. Please help ——————————– Answer: Here is what you can do. Activate the sql query log. Edit /lib/Varien/Db/Adapter/Pdo/Mysql.php and set the values for $_debug and $_logAllQueriesto true. then create a custom script that just calls $customerId = Full Article…
Can’t re-index new products – Product Attributes
If you re-index your data and you see this error: Product Attributes index process unknown error: exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`your_database_name`.`catalog_product_index_eav`, CONSTRAINT `FK_CAT_PRD_IDX_EAV_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE)’ in . ..\lib\Zend\Db\Statement\Pdo.php:228 It causes by some products Full Article…
Change Magento default increment ID for orders & invoices
Sometimes you will be required to change the default increment ID’s of orders, invoices, credit memos & shipments. To do this is surprisingly simple, yet cannot be done via the backend Admin area without an extension. Today I’ll show you how simple it is to change these numbers with some simple SQL queries to run Full Article…
Fix Product Flat Data index process unknown error in Magento
A client mentioned that he kept having to reindex the Product Flat Data but the notification in the admin section never went away. While trying to reindex from command line I was greeted with the following error: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Full Article…
CANNOT INITIALIZE THE INDEXER PROCESS IN MAGENTO
This phrase gave me nightmares for days as I was building the new website. We installed a ton of extensions to automate the website, and somewhere along the line some database tables got corrupted, so I had to start a what seemed like an endless game of cat and mouse chasing down what was really wrong Full Article…
Magento – Delete All Test Data
1. CUSTOMERS SET FOREIGN_KEY_CHECKS=0; — Customers TRUNCATE `customer_address_entity`; TRUNCATE `customer_address_entity_datetime`; TRUNCATE `customer_address_entity_decimal`; TRUNCATE `customer_address_entity_int`; TRUNCATE `customer_address_entity_text`; TRUNCATE `customer_address_entity_varchar`; TRUNCATE `customer_entity`; TRUNCATE `customer_entity_datetime`; TRUNCATE `customer_entity_decimal`; TRUNCATE `customer_entity_int`; TRUNCATE `customer_entity_text`; TRUNCATE `customer_entity_varchar`; ALTER TABLE `customer_address_entity` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_datetime` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_decimal` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_int` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_text` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_varchar` AUTO_INCREMENT=1; ALTER Full Article…
How to fix magento reindexing with PDOException error?
I got an error when I reindex data. I have been working for about 3 days with this problem still can't find the solution. here is the log error I have received: Default Values (MANAdev) index process unknown error: exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: Full Article…
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘e.visibility’ in ‘where clause’
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘e.visibility’ in ‘where clause’ Sounds quite a catastrophic error in Magento, but it seems to be quite common in “responsive magento themes”. Quick fix for this is to ensure the following are set – Use Flat Catalog Category = NO Use Flat Catalog Product = NO You find Full Article…
Magento – Removing all products and log tables
You can use the following commands to remove all products and logs. SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE `catalog_product_bundle_price_index`; TRUNCATE TABLE `catalog_product_bundle_selection`; TRUNCATE TABLE `catalog_product_bundle_selection_price`; TRUNCATE TABLE `catalog_product_bundle_option_value`; TRUNCATE TABLE `catalog_product_bundle_option`; TRUNCATE TABLE `catalog_product_entity_datetime`; TRUNCATE TABLE `catalog_product_entity_decimal`; TRUNCATE TABLE `catalog_product_entity_gallery`; TRUNCATE TABLE `catalog_product_entity_group_price`; TRUNCATE TABLE `catalog_product_entity_int`; TRUNCATE TABLE `catalog_product_entity`; TRUNCATE TABLE `catalog_product_entity_media_gallery`; TRUNCATE TABLE Full Article…
Removing products and categories from the database
Below queries will definitely delete products from database but still few tables have entries for e.g. catalog_product_flat_1, catalog_product_flat_2,etc. So its not wise to delete using below queries. Removing products and categories from the database These instructions have been copied from: http://www.magentocommerce.com/boards/viewreply/106786/ Truncate products This should remove all the products and their related records. TRUNCATE TABLE Full Article…