Archive

Category Archives for "Magento"

Change of Magento contacts page URL

Magento’s default contact us form page URL is a little bit awkward as its says http://yourdomain.om/contacts. We can change this easily by creating a small module. Step 1 Create a file in app/etc/modules/Namespace_Contacts.xml   Step 2 Create the config file in app/code/local/Namespace/Contacts/etc/config.xml That’s it upload the files and clear the cache. Yea the default Magento […]

Continue

Search by only product name in Mini Search In Magento

Magento has a good search functionality. By default when someone searches it search through all the description and short descriptions. So sometimes at first look this results appears to be strange. We need Search by only product name in Mini Search In Magento But the reason Magento pick this up because these keywords might be present […]

Continue

Get order total from order id in Magento

Getting order details from the order id, its an easy task in Magento. If you have an order id in hand, call the below function for the order object. Or you want to get the order details from the checkout session, you can use the below function. In above code lines  the first line is […]

Continue

Magento create category programmatically

  Everyone knows there are admin interface to create categories, but if you want to  create a category programmatically. Using Magento’s catalog/category model we can create a Magento category via a program. You have to set category title and Url key in order to show in the frontend. Magento creates category programmatically Here I’ve attached […]

Continue

Get the current website id in magento

To get the current running website id. All the Magento web developers may need to write this code while developing a Magento website in one way or another. //Will return as integer $website_id = Mage::app()->getWebsite()->getId();//Will return as integer $website_id = Mage::app()->getWebsite()->getId(); //Will return as us,en,ae $websitecode = Mage::app()->getWebsite()->getCode();   [gad01]//Will return as us,en,ae $websitecode = Mage::app()->getWebsite()->getCode(); […]

Continue