Getting all options of a specific magento configurable product attribute is fairly easy: getAttribute(‘catalog_product’, ‘color’); foreach ($attribute->getSource()->getAllOptions(true) as $option) {…
2013 June
Below are the 2 different way to display the product count in the category in magento. <?php $catObj = Mage::getModel(‘catalog/category’)->load($_category->getID()); $prodObj =…
<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…
1. Take the backup of your current database 2. Run the below queries 3. I have not fully tested that…
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…
$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());
Display Top Level Categories Only <?php $_helper = Mage::helper(‘catalog/category’) ?><?php $_categories = $_helper->getStoreCategories() ?><?php if (count($_categories) > 0): ?><ul><?php foreach($_categories…
here is the process to enable the error printing in magento 1. go to magentoRoot/errors folder and make the copy…