Magento : Product list page wrong sorting by price When we install webtex_customergroupprice it has a bug when it sorts…
Useful Tricks
Just you need to replace one line of code in your controllerwhere you want to change the layout of the…
Magento : Change options of configurable product to radio button Replace the configurable.phtml code with below code:<?php$_product = $this->getProduct();$_attributes =…
TRUNCATE TABLE `catalog_product_bundle_option`;TRUNCATE TABLE `catalog_product_bundle_option_value`;TRUNCATE TABLE `catalog_product_bundle_selection`;TRUNCATE TABLE `catalog_product_entity_datetime`;TRUNCATE TABLE `catalog_product_entity_decimal`;TRUNCATE TABLE `catalog_product_entity_gallery`;TRUNCATE TABLE `catalog_product_entity_int`;TRUNCATE TABLE `catalog_product_entity_media_gallery`;TRUNCATE TABLE `catalog_product_entity_media_gallery_value`;TRUNCATE TABLE…
<?php// input is $_product and result is iterating child products$childProducts = Mage::getModel(‘catalog/product_type_configurable’)->getUsedProducts(null, $product);?>
<?php// clear cacheMage::app()->removeCache(‘catalog_rules_dirty’);// reindex pricesMage::getModel(‘index/process’)->load(2)->reindexEverything();/*1 = Product Attributes2 = Product Attributes3 = Catalog URL Rewrites4 = Product Flat Data5 =…
Get Base Url :Mage::getBaseUrl();Get Store Url : Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);Get Skin Url :Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);$this->getSkinUrl(‘images/imagename.jpg’);Get Media Url :Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);Get Js Url : Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);Get Current UrlMage::helper(‘core/url’)->getCurrentUrl();Get Home UrlMage::helper(‘core/url’)->getHomeUrl();
<?php$_product->getThisattribute();$_product->getAttributeText(‘thisattribute’);$_product->getResource()->getAttribute(‘thisattribute’) ->getFrontend()->getValue($_product);$_product->getData(‘thisattribute’);// The following returns the option IDs for an //attribute that is a multiple-select field: $_product->getData(‘color’); // i.e. 456,499//…
Open up the /app/etc/local.xml file, locate the <frontName> tag, and change the ‘admin’ part it to something a lot more…
<?php if($_product->isSaleable()) { // do stuff } ?>