Skip to main content

Posts

Magento - Dataflow - Profiles : How to check failed products in import all product

I have created CSV file and run profile. Some products failed due to image not found issue. I wanted to find out which products have failed in the process. I googled but not found a solution. Finally I used firebug and found failed row number as follows

Magento - Tier Prices on Cart page

Add following after $_item = $this->getItem() ; in checkout/cart/item/default.phtml $_tierPricing = $this->getLayout()->createBlock('catalog/product_view', 'product.tierprices', array( 'product_id' => $_item->getProductId())); $_tierPricing->setTemplate('catalog/product/view/tierprices.phtml'); To print price info: <?php echo $_tierPricing->getTierPriceHtml();?> OR If you want retrieve tier prices for any other purposes, just for show discounts etc. Use followings. $custom = Mage::getModel('catalog/product')->load($_item->getProductId());  var_dump($custom->getTierPrice());

How to get Multiple counts based on different criteria in MySQL

I wanted to retrieve multiple counts in same table on different criteria. The sum of 1's works same as count where our expression is true. :-) SELECT sum(approved = 1) as visible_prop_count, sum(approved = 2) as private_prop_count, sum(approved = 3) as pending_app_prop_count, sum(featured_property=1) as featured_prop_count, sum(approved = 0) as draft FROM `jos_mypod_property` WHERE 1 visible_prop_count private_prop_count pending_app_prop_count featured_prop_count draft 4 0 0 4 1

Install MySQL as a service

Install the server as a service using this command: C:\> "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --install Install the server as a service using this command: C:\> "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --remove Start Mysql from command prompt using net command: NET START MySQL Stop Mysql from command prompt using net command: NET STOP MySQL -- Thanks & Regards, Chamath Gunasekara