2 Improved explaination And Title And Add Tag
source | link

Magento : Setting Shipping Origin Dynamically

My website have multiple origin shipping address and iI want it to pick the origin address according to my customer address. I have the way to pick the origin shipping address according to customer address but my origin address is not working. I have found the code for setting config of store but its not working for me as my store is picking up the address and postal code provided in admin of magento...

$store = Mage::app()->getStore();
$configScope = array(
'street_line1' => $street1,
'street_line2' => $street2,
'city'         => $city,
'region_id'    => $region_id,
'postcode'     => $postcode,
'country_id'   => $country_id
);

foreach($configScope as $_scope=>$_val){
$store->setConfig('shipping/origin/' . $_scope, $_val);
}

Setting Shipping Origin Dynamically

My website have multiple origin shipping address and i want it to pick the origin address according to my customer address. I have the way to pick the origin shipping address according to customer address but my origin address is not working. I have found the code for setting config of store but its not working for me as my store is picking up the address and postal code provided in admin of magento...

$store = Mage::app()->getStore();
$configScope = array(
'street_line1' => $street1,
'street_line2' => $street2,
'city'         => $city,
'region_id'    => $region_id,
'postcode'     => $postcode,
'country_id'   => $country_id
);

foreach($configScope as $_scope=>$_val){
$store->setConfig('shipping/origin/' . $_scope, $_val);
}

Magento : Setting Shipping Origin Dynamically

My website have multiple origin shipping address and I want it to pick origin address according to my customer address. I have way to pick origin shipping address according to customer address but my origin address is not working. I have found code for setting config of store but its not working for me as my store is picking up address and postal code provided in admin of magento...

$store = Mage::app()->getStore();
$configScope = array(
'street_line1' => $street1,
'street_line2' => $street2,
'city'         => $city,
'region_id'    => $region_id,
'postcode'     => $postcode,
'country_id'   => $country_id
);

foreach($configScope as $_scope=>$_val){
$store->setConfig('shipping/origin/' . $_scope, $_val);
}
1
source | link

Setting Shipping Origin Dynamically

My website have multiple origin shipping address and i want it to pick the origin address according to my customer address. I have the way to pick the origin shipping address according to customer address but my origin address is not working. I have found the code for setting config of store but its not working for me as my store is picking up the address and postal code provided in admin of magento...

$store = Mage::app()->getStore();
$configScope = array(
'street_line1' => $street1,
'street_line2' => $street2,
'city'         => $city,
'region_id'    => $region_id,
'postcode'     => $postcode,
'country_id'   => $country_id
);

foreach($configScope as $_scope=>$_val){
$store->setConfig('shipping/origin/' . $_scope, $_val);
}