This tutorial I am explaining how to create new category and assigned the existing products to that categories programmatically based on the attribute.
Using this program I am creating new category named ‘manufacturer‘ under the root category and two subcategories ‘manufacturer1‘ and ‘manufacturer2‘ as shown below and assigning the products to that category.
This tutorial explains how to create and update static blocks using the magento scripts.For that I have create a file in the magento root folder. Then I have created an array which contains the details of the static block as shown below.
If we are creating the CMS blocks using the script it is easy to move the blocks from the develop database to live database without redoing those changes in the magento backend.