Magento Forum

   
Shipping Module Help
 
bobbrodie
Sr. Member
 
Avatar
Total Posts:  132
Joined:  2008-04-02
Philadelphia, PA
 

Hello,

I am modifying /app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php to meet my needs. After I finish the mods, I’ll move them to a new module.

I have commented out:

if ($request->getOrigPostcode()) {
$r->setOrigPostal($request->getOrigPostcode());
} else {
$r->setOrigPostal(Mage::getStoreConfig(’shipping/origin/postcode’, $this->getStore()));
}

And added (just to test):

if ($request->getDestPostcode() == 19057) {
$r->setOrigPostal(19114, $this->getStore());
} else {
$r->setOrigPostal(90210, $this->getStore());
}

And it works. What I aim to do is to change the first line to read the selected State from the dropdown but can’t quite figure it out. Your help is greatly appreciated.

Thank you,
Bob Brodie

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top