Magento Programmatically create a cms static block

Posted by Damodar Bashyal on May 10, 2013

 

You can easily create a static block in magento programmatically. Useful when you need to upload a bunch of blocks from csv. Here I haven't created a parser but just a simple code to save a block.

My file path: /magento/static-block.php

More»

Magento get popular products by total number of views

Posted by Damodar Bashyal on May 10, 2013

 

Magento product report resource collection allows you to get most popular products based on different options for example total number of product views. The code below will show you how to load magento's most viewed products collection.

functions we will use: addViewsCount, setOrder

Let's load this resource collection first like this:

More»

Magento get popular products by total number of orders

Posted by Damodar Bashyal on May 10, 2013

 

Magento product report resource collection allows you to get most popular products based on different options for example total number of product orders.

functions we will use: addOrdersCount, setOrder

Let's load this resource collection first like this:

More»