Magento Redirect Functions

Posted by Damodar Bashyal on May 13, 2013

 

Magento core provides some built-in redirect functions to redirect url to new urls. Let's check few of them below:

From any of your Magento controller you can redirect user to any url as defined below. If you want to use redirect function in your magento observer model check this Technooze_T404 extension which I created to handle 404 issue in multi-store magento installation as defined here - stackoverflow question.

More»

Magento get url with or without parameters

Posted by Damodar Bashyal on May 13, 2013

 

Magento lets you get url with or without parameters as below:

// get base url
Mage::getUrl()
// http://dltr.org/

More»

Magento Programmatically create a cms page

Posted by Damodar Bashyal on May 10, 2013

 

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

My file path: /magento/cms-page.php

More»