How to show product’s rating any where in Magento

Reviews are another one of numerous excellent features in Magento. Usage of reviews can increase visitors’ trust in your brand, which, in return boosts your sales by a significant amount. Sometimes there is a need for showing star ratings outside the products’ review page. That’s what I’ll be addressing with this article.

The following code snippet works just about anywhere you have a product loaded (or if you know it’s ID) – cart being one of the examples.

How to add custom tabs into Magento Product Page

How to add custom tabs into Magento Product Page The product page is one of the most important parts of your store. That’s why so much attention is paid to make this page look perfect. Tabs is a good way to display a lot of data inside a compact block. It helps to avoid huge scroll bars and also looks much nicer on portable devices. You can find tons of Magento templates with tabs on the product view page and we are going to tell you the easiest way to add them there. All examples are applicable to the default Magento theme, but with practice you can use following methods to customize your own theme. First, go to your store theme folder and find there the following file app/design/frontend/default/yourtheme/layout/catalog.xml. If the file does not exist, you can always copy it from app/design/frontend/base/default/layout/. Note that your own theme can be located within a different path. In the file catalog.xml, find the section:

 

    
       
            product.tierprices
            
            product.info.addtocart
            product.info.addto
         
		

How to add new tab on product view page

After Magento 1.9 has been released people started asking how to handle the product page tabs since the previous method caused different troubles. The reason is in the modern RWD theme, which goes out of the box with Magento 1.9. It uses slightly different method for adding tabs than in the previous versions. So, let's review how you can easily add own tabs on the product page for RWD-based themes in Magento CE 1.9. First of all, let's make our implementations as clean as possible. To avoid copying of unnecessary pieces of code we will make our changes in the layout file that is being used for custom theme's modifications. You can find this file here: app/design/frontend/[theme_package]/[theme]/layout/local.xml There [theme_package] - it's your package's name and [theme] - it's your theme's name. If there's no such file – just create a clean one. Then, paste the following content in the newly created file:
<?xml version="1.0"?> version="1.0"?>

    
        
            
                detailed_info
                The New Tab
            
        
    

In case if this file already exists – just add the content between (including them) inside of node. As you can see, we have added a block with the class 'core/template' (Mage_Core_Block_Template) inside of the group called 'detailed_info'. That group is a built-in templates group for the product page tabs. You can use any name for your tab, just ensure that it's unique ('the_new_tab' in our example). Then, we have assigned the template file for our tab where the tab's content is placed – 'atwix/newtab.phtml'. Finally, we have set the name for our tab using the standard method 'setTitle()', so the name is 'The New Tab'. On the last step, we need to check if our product view template contains the tabs output logic. Open the following file: app/design/frontend/[theme_package]/[theme]/template/catalog/product/view.phtml

Login as a customer from Magento admin

Often there are situations where customer has some issues while placing orders or making operations from the “My Account” section. At that point, an ability for admin to login as a customer and see what is wrong becomes very useful. Sure, you can make a universal password logic, but that method has heavy security risks. Not so long ago, we’ve noticed that Magento has ability to load and use customer’s sessions different way. We will tell you how to create a simple extension for logging in as a customer from Magento admin. Step 1 For example, let’s call our module Arun_Ulogin. As always we must start by creating a module descriptor in app/etc/modules folder. So put the Arun_Ulogin.xml file into this directory. The file will be with the following content:
<&#63xml version="1.0"?>

    
         
            true
            community
          
    

Overriding Magento observers

As you may know, we need to override the Magento observers when we deal with the extension’s conflicts or want to disable (or modify) a part of some extension’s functionality. Usually, there is no difference between the observer’s overriding and overriding of any other regular model. But sometimes we can face with the issues working with the simple override. How should we act then to keep it conventionally? Let’s check the following step by step instruction for Magento observers overriding. First of all, we should pay attention to the naming. Let’s assume that we have some 3rd party extension. It is named Some_Extension, and this extension has the following observer:
<&#63php
/**
 * file path:
 * magento_root/app/code/local/Some/Extension/Model/Observer.php
 */
 
class Some_Extension_Model_Observer
{
   public function someMethod( $observer )
   {
      /** 
       *Do some stuff here 
       */
         
      return $observer;
   }
}
&#63>