How to fix the issue: Product images missing in backend but not in the frontend

Introduction Recently I have to fix a strange issue for one of my clients. The issue was that product images were missing from ‘Images’ tab of product edit form (as depicted below), though they were displaying fine in the frontend. After going through the table relationship for catalog product images (as shown below), it was …

Read moreHow to fix the issue: Product images missing in backend but not in the frontend

Magento EAV structure & role of eav_attribute’s backend_type field

Introduction: Magento database is based on EAV(Entity Attribute Value) architecture. And it uses this architecture, especially for categories, products, customers & customer addresses. Before Magento version 1.4.x it used EAV structure for orders as well but thereafter order’s EAV structure has been converted to a flat structure. From the definition of EAV: Entity(E): Entity actually …

Read moreMagento EAV structure & role of eav_attribute’s backend_type field

Playing with Attribute Set in Magento

Introduction An attribute set is a collection of attributes which can be created/edited from Catalog -> Manage Attribute Sets in backend. Some useful snippets regarding Attribute Set. 1> Getting Attribute Set Details $attributeSetModel = Mage::getModel(‘eav/entity_attribute_set’); $attributeSetId = 9; // or $_product->getAttributeSetId(); if you are using product model $attributeSetModel->load($attributeSetId); print_r($attributeSetModel->getData()); 2> Getting Attribute Set Id by …

Read morePlaying with Attribute Set in Magento

Updating product prices in Magento in an easier & faster way

Introduction Product prices can be updated via default import profile though but this is very slow and requires lots of CSV fields(besides sku & price) for updating. Today I am going to talk about updating product prices just by using CSV with two fields: sku & price(new) which is very fast enough even for thousands …

Read moreUpdating product prices in Magento in an easier & faster way

List out all the product names in Magento via SQL code

You know we can easily fetch the product names using the Model object. But what if you want to list out all the product names via SQL code? Don’t worry here is the SQL code for you: SELECT `value` AS product_name FROM catalog_product_entity_varchar WHERE entity_type_id = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = ‘catalog_product’) AND …

Read moreList out all the product names in Magento via SQL code