Thursday, December 8, 2011

IE9 Issue with Magento Checkout-Disabled Credit Card Fields-Fix

In some builds of Magento (Community and Enterprise), there is an issue with IE9 and all of the credit card fields being disabled. This is on step 4 of the one page checkout, and users will not be able to enter any information, or even use the dropdown select box to choose which type of credit card they are going to be using.

The fix:
Browse to your /skin/frontend/..template folder (if you’ve got one, if not, browse to the /skin/frontend/default/default/js/ folder). Open up the opcheckout.js file Around lines 641 AND 647, (inside the switchMethod function), replace :
var elements ='input', 'select', 'textarea');
var elements ='input').concat('select'),'textarea'));
These 2 lines should fix your IE9 issues, as well as be compatible and work with Chrome/Firefox, earlier builds of IE, and others.

For other to solve the IE9 issue use the metatag in head of page

<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />

Tuesday, December 6, 2011

Extarct Fedex Shipping Response

 $xmltxt = $client->__getLastResponse(); 
       $xmltxt = preg_replace('#(</?)ns[\d]:#','$1',$xmltxt);     
     //remove all the namespaces that appear in the soap response.
        $xmltxt = preg_replace('#(</?)v[\d]:#','$1',$xmltxt);
         $xmltxt = preg_replace('#(</?)soapenv:#','$1',$xmltxt);
         echo $xmltxt;  
     //debuggig to make sure the SOAP is proper XML and 
         namespaces removed
        $doc = new DOMDocument();  
       $trackingNumber = $doc->getElementsByTagName("TrackingNumber");
        print_r($trackingNumber); //debugging to make sure this exists.
        if($trackingNumber = $trackingNumber->item(0)) { 
       //retrieve the first trackingnumber in the elements list.  
                $trackingNumber = $trackingNumber->nodeValue; 
        echo "Tracking Number :::::: ".$trackingNumber;