You Are Here: Home » Posts tagged "Magento tutorials"

How to Optimize The Seven “Forgotten” Pages of Magento

With some creative customizations, your Magento Enterprise Edition store can be further optimized by updating these seven, “forgotten” pages. Have a look! POPULAR MAGENTO PAGES FOR SITES (based on aggregated data) Empty Shopping Cart Occasionally, customers find their way into a shopping cart that doesn’t have any products in it. This Empty Shopping Cart page is a great place to include a call to action or ...

Read more

Display Items Custom Option On Product Listing Page

Have you ever been struggled with showing custom options of products in Magento? Of course there are plenty of extensions on the market providing this function, but why spending time on researching and comparing when you could do it yourself with a little twist. This post actually is a short tutorial to guide you how to archive this task on the product listing page. Just simply copy and paste code below int ...

Read more

Magento delete empty categories and sub-categories

Remove all empty categories and sub-categories in Magento. When there are empty categories, the website shows empty page in those categories in frontend. Create a file in the magento root, I will name it rmvEmptyCats.php, with following code: require "app/Mage.php"; umask(0); Mage::app();   $categoryCollection = Mage::getModel('catalog/category')->getCollection()     ->addFieldToFilter('level', array( ...

Read more

Creating custom router in Magento

How to create custom router, as many of us use the standard router? You should know that Magento has four types of the routers: admin, standard, cms and default – they are loading in the order we’ve described. But, have you ever faced with such configuration? <routers>     <atwixtest>         <use>standard</use>         <args>             <module>Atwix_Test</module> ...

Read more

Sending Email in Magento

Anyone can send mail using php mail() function. But in magento, all the functionality you need to just send argument inside those functions. See the following code to send mail using magento function: <?php  $mail = Mage::getModel('core/email'); $mail->setToName('Your Name'); $mail->setToEmail('Youe Email'); $mail->setBody('Mail Text / Mail Content'); $mail->setSubject('Mail Subject'); $mail- ...

Read more

Magento Developers’ Guide – Part 11: Events and Observers in Magento

1. Theory Event:  We can consider an event as a kind of flag that rises when a specific situation happens for example when the user presses the « pay » button of your website, it is an event. Your order has been registered? Here it is an event too. You can read more about Events in Magento here. Observer:  An Observer is also called « Listener » he will listen to your program to detect events. When there is ...

Read more

Magento Developers’ Guide – Part 10: Rewrite to modify a Magento controller

How to make a rewrite of a controller ? Because your module will not know where to search for your extended class…you have to make a require in your controller. require_once "Mage/Checkout/controllers/CartController.php"; This gives you something like: require_once "Mage/Checkout/controllers/CartController.php"; class Pfay_Checkout_CartController extends Mage_Checkout_CartController {     # Rewrite of index ...

Read more
Scroll to top