Archive for June 2019

Magento update order billing or shipping address

$shippingAddress = Mage::getModel(’sales/order_address’)->load($order->getShippingAddress()->getId());   $shippingAddress ->setFirstname("value") ->setMiddlename("value") ->setLastname("value") ->setSuffix("value") ->setCompany("value") ->setStreet("value")) ->setCity("value") ->setCountry_id("value") ->setRegion("value") ->setRegion_id("value") ->setPostcode("value") ->setTelephone("value") ->setFax("value")->save();

Magento add Js Script

Method 1. Adding to layout file <reference name="head"> <action method="addJs"><script>skin/frontend/base/default/js/yourextension/index/scriptname.js</script></action> </reference> Method 2. Adding to phtml file <?php echo $this->helper(’core/js’)->includeSkinScript(’js/yourextension/index/scriptname.js’) ?>