Monday, March 26, 2012

USING SPECIAL CHARACTERS IN MAGENTO EMAIL TEMAPLATES

It took me quite a few hours to figure out that email templates does not support special characters ,
So i replaced special characters in all phtml file with the corresponding character code.

You can find all character code in the below mentioned site.

http://www.utexas.edu/learn/html/spchar.html

Saturday, March 24, 2012

Magento cron jobs and cron scripts



http://fishpig.co.uk/magento-tutorials/magento-cron-jobs 


http://inchoo.net/ecommerce/magento/creating-cron-script-in-magento/ 

Magento Add to Cart via Ajax

magento:set custom theme for a particular page

We can set custom theme for a particular page in magento by adding following code in the corresponding controller:

In the example below i have applied  custom theme for subscribe action, You can apply to your action e.g. indexAction,checkoutAction..etc.

 public function subscribeAction()  
   {
          ..
          ..
 
              Mage::getDesign()->setTheme('fYour theme name');   /* Now you know the secret */               
               $this->loadLayout();                        
               $this->renderLayout();

       }

magento get store email address and name code




$frm_name = Mage::getStoreConfig('trans_email/ident_general/name'); //fetch sender name in Admin
$frm_email = Mage::getStoreConfig('trans_email/ident_general/email'); //fetch sender email Admin

Wednesday, March 21, 2012

REMOVING FACEBOOK COMMENT PLUGIN WARNING


My problem solved by adding a forward slash "/" in href attribute value.


<fb:comments href="http:www.mywebsiteurl.com/xyz/prodcuct.phtml/"  width="670" ></fb:comments>

Sunday, March 18, 2012

REMOVING ERROR: llegal scheme supplied, only alphanumeric characters are permitted

HI, this error occured when i was installing magento 1.6 on the server. But the solution in the following post worked for me like charm.
All you have to do is
step1: clean your  cache i.e. var/cache folder

step2: clean browser cookies

step3: download the attachment in the following post and upload the folder to your server.That's all.

http://www.danneh.org/2011/11/bug-magento-1-6-1-0-affecting-development-sites-base_url/ 

Friday, March 16, 2012

CREATING NEW TAB IN MAGENTO ADMIN

MAGENTO set default zoom level in unirgy store locator

This will work in case of unirgy store locator, if you have already  configured store locator and the map is successfully displaying store location.

You have to make small change in map.phtml

Here are the steps:



1.Go to frontend/default/default/template/unirgy/storelocator

2.In function searchLocationsNear() you will see  map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));

3.just change  map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds)); 
                          To  
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds)-5);  //I used 5 here , you can user any no. u want acording to the zoom level.