<div id=”leftnav”><?php $helper = $this->helper(‘catalog/category’) ?><?php $categories = $this->getStoreCategories() ?><?php if (count($categories) > 0): ?><ul id=”leftnav-tree” class=”level0″><?php foreach($categories as $category):…
2013 August
# Mass UnexcludeUPDATE`catalog_product_entity_media_gallery_value` SET `disabled` = ‘0’ WHERE `disabled` = ‘1’;# Mass ExcludeUPDATE`catalog_product_entity_media_gallery_value` SET `disabled` = ‘1’ WHERE `disabled` =…
<?php$rootCategoryId = Mage::app()->getStore()->getRootCategoryId();$_category = Mage::getModel(‘catalog/category’) ->load($rootCategoryId);// You can then get all of the top level categories using:$_subcategories = $_category->getChildrenCategories();?>
<?php $logged_in = Mage::getSingleton(‘customer/session’) ->isLoggedIn(); // (boolean) ?>
<?phpset_time_limit(0);ini_set(‘memory_limit’,’1024M’);require_once ‘../../app/Mage.php’;Mage::app(); //read data from csv file$row = 1; $cat_arr = array();if (($handle = fopen(“category.csv”, “r”)) !== FALSE){ while (($data…
<?php// input is $_product and result is iterating child products$conf = Mage::getModel(‘catalog/product_type_configurable’) ->setProduct($_product);$col = $conf->getUsedProductCollection()->addAttributeToSelect(‘*’)->addFilterByRequiredOptions();foreach($col as $simple_product){ var_dump($simple_product->getId());}?>
<?php$_product_1 = Mage::getModel(‘catalog/product’)->load(12);$_product_2 = Mage::getModel(‘catalog/product’)->loadByAttribute(‘sku’,’cordoba-classic-6-String-guitar’);?>
<?php$_category = Mage::getModel(‘catalog/category’)->load(89);$_category_url = $_category->getUrl();?>
<?php$_category = Mage::getModel(‘catalog/category’)->load(47);$_productCollection = $_category->getProductCollection();if($_productCollection->count()) { foreach( $_productCollection as $_product ): echo $_product->getProductUrl(); echo $this->getPriceHtml($_product, true); echo $this->htmlEscape($_product->getName()); endforeach;}?>