Search This Blog

Tuesday, 4 September 2012

Get all customer groups in Magento

$customer_group = new Mage_Customer_Model_Group();
$allGroups  = $customer_group->getCollection()->toOptionHash();
foreach($allGroups as $key=>$allGroup){
   $customerGroup[$key]=array('value'=>$allGroup,'label'=>$allGroup);
}
return $customerGroup;

Get all websites and stores in Magento

foreach (Mage::app()->getWebsites() as $website) {
    foreach ($website->getGroups() as $group) {
        $stores = $group->getStores();
        foreach ($stores as $store) {
            //$store is a store object
        }
    }
}

Add Custom Field in the Billing and Shipping Address of Onepage Checkout in Magento

How to Add Custom Field in the Billing and Shipping Address of Onepage Checkout in Magento

http://indiestechtips.wordpress.com/2011/07/30/how-to-add-custom-field-in-the-billing-and-shipping-address-of-onepage-checkout-in-magento/

Magento: Admin Grid Column types

There are many types of column types in the admin grid.









Following are the list of available types in Magento:



  1. date
  2. datetime
  3. number
  4. currency
  5. price
  6. country
  7. concat
  8. action
  9. options
  10. checkbox
  11. massaction
  12. radio
  13. input
  14. select
  15. text
  16. store
  17. wrapline
  18. theme

Wednesday, 22 August 2012

Change Rupee Currency Symbol In Magento

Open /lib/Zend/Locale/Data/root.xml file and look for

<symbol>Rs</symbol>

Replace with

<symbol><![CDATA[New Symbol For Rupee Goes Here]]></symbol>

Override the file.

Remove the Magento cache and refresh the product page.

You are done !!!!!!!!!!!!!!!!

Implementing Google ReCaptcha Using PHP