Magento: Create CMS Page & Static Block programmatically

You can manually create CMS Pages in Magento from CMS -> Pages. Similarly, you can create Static Blocks from CMS -> Static Blocks. This article will show how to create CMS pages and Static blocks programmatically from code. Create CMS Page Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $cmsPage = array( 'title' => 'Test Page', 'identifier' => 'test-page', 'content' => 'Sample … Read more

Magento: Get Best Selling products by category and date time

This article will show you how to get best selling products. You will see how to get overall best selling products as well as best selling products by category and by date time range. Here is the code:- Get overall Bestselling products public function getBestsellingProducts() { // number of products to display $productCount = 5; … Read more

Magento: How to disable / remove Secret Key from Admin URL?

A new secret key is created every time you login to Magento Admin. So, there will be a unique key (32 chars long) for each session of your Magento admin login. This key is appended to the admin URL as http://your-admin-url/key/743c37b1…adf6588/ This is basically added for security reason. In their release note, Magento say that … Read more

Magento: How to change Admin URL Path?

Here is a quick guide on how to change admin url path in Magento. This need to be done for security reason to be safe from hacking/cracking issue. Basically, this is done not to let any general user to access the admin page. Generally, we do have ‘admin‘ as the administrator path for Magento. So, … Read more

Magento: Create Shopping Cart Price Rule Programmatically

This article will show you how to create shopping cart price rule in Magento through code. Shopping Cart Price Rules are applied when the customer reaches the shopping cart. To create a Shopping Cart Price Rule from Admin Panel, we go to Promotions -> Shopping Cart Price Rules and select Add New Rule. Basically, there … Read more

Magento: Create Catalog Price Rule Programmatically

Here, you will see how to create Catalog Price Rule in Magento through code. Catalog Rules are applied on products before they are added to the cart. To create a Catalog Price Rule from Admin Panel, we go to Promotions -> Catalog Price Rules and select Add New Rule. Basically, there are three main parts … Read more

Magento: How to delete / remove extension from MagentoConnect?

Suppose, you have added a new extension to MagentoConnect. You may have situation to delete that extension later on. However, there is no delete option in Manage Extension section in MagentoCommerce (My Account -> Extensions and Languages -> Manage Extensions). You can Edit your extensions yourself but you cannot delete them. To delete you extension, … Read more