Getting all options of a specific magento configurable product attribute is fairly easy: getAttribute(‘catalog_product’, ‘color’); foreach ($attribute->getSource()->getAllOptions(true) as $option) {…
Magento
1. Take the backup of your current database 2. Run the below queries 3. I have not fully tested that…
<select name=”” style=”width:220px;” onchange=”location.href=this.value”> <?php $children = Mage::getModel(‘catalog/category’)->getCategories(YOUR_CAT_ID); ?> <?php foreach ($children as $category) { $i++; $cat = Mage::getModel(‘catalog/category’)->load($category->getID()); ?> <option…
Here is the code to fetch the attribute (that should be configurable in magento database) from the CRE Loaded database…
Here, I will show you, how you can change your order status programmatically (with PHP coding). First, you need to…
Transferring one opensource database to other is a common headache.Recently i faced this problem when i need to move the…
Display Top Level Categories Only <?php $_helper = Mage::helper(‘catalog/category’) ?><?php $_categories = $_helper->getStoreCategories() ?><?php if (count($_categories) > 0): ?><ul><?php foreach($_categories…
$productId = ‘SOME_PRODUCT_ID’; $product = Mage::getModel(‘catalog/product’)->load($productId); $productMediaConfig = Mage::getModel(‘catalog/product_media_config’); $baseImageUrl = $productMediaConfig->getMediaUrl($product->getImage()); $smallImageUrl = $productMediaConfig->getMediaUrl($product->getSmallImage()); $thumbnailUrl = $productMediaConfig->getMediaUrl($product->getThumbnail());
$entityTypeId = Mage::getModel(‘eav/entity’)->setType(‘catalog_product’)->getTypeId();$attributeSetName = ‘Default’; //Edit with your required Attribute Set Name$attributeSetId = Mage::getModel(‘eav/entity_attribute_set’)->getCollection()->setEntityTypeFilter($entityTypeId)->addFieldToFilter(‘attribute_set_name’, $attributeSetName)->getFirstItem()->getAttributeSetId();$attributesInfo = Mage::getResourceModel(‘eav/entity_attribute_collection’)->setEntityTypeFilter($attributeSetId) //4 = product…
here is the process to enable the error printing in magento 1. go to magentoRoot/errors folder and make the copy…