Index: app/Mage.php =================================================================== --- app/Mage.php (revision 32237) +++ app/Mage.php (revision 32464) @@ -82,7 +82,7 @@ public static function getVersion() { - return '1.2.0.2'; + return '1.2.0.3'; } /** Index: app/code/core/Mage/GoogleCheckout/Model/Api.php =================================================================== --- app/code/core/Mage/GoogleCheckout/Model/Api.php (revision 32237) +++ app/code/core/Mage/GoogleCheckout/Model/Api.php (revision 32464) @@ -28,7 +28,7 @@ { protected function _getApi($area) { - $api = Mage::getModel('googlecheckout/api_xml_'.$area); + $api = Mage::getModel('googlecheckout/api_xml_'.$area)->setStoreId($this->getStoreId()); $api->setApi($this); return $api; } Index: app/code/core/Mage/GoogleCheckout/Model/Payment.php =================================================================== --- app/code/core/Mage/GoogleCheckout/Model/Payment.php (revision 32237) +++ app/code/core/Mage/GoogleCheckout/Model/Payment.php (revision 32464) @@ -84,7 +84,7 @@ */ public function authorize(Varien_Object $payment, $amount) { - $api = Mage::getModel('googlecheckout/api'); + $api = Mage::getModel('googlecheckout/api')->setStoreId($payment->getOrder()->getStoreId()); $api->authorize($payment->getOrder()->getExtOrderId()); return $this; @@ -114,7 +114,7 @@ } } - $api = Mage::getModel('googlecheckout/api'); + $api = Mage::getModel('googlecheckout/api')->setStoreId($payment->getOrder()->getStoreId()); $api->charge($payment->getOrder()->getExtOrderId(), $amount); $payment->setForcedState(Mage_Sales_Model_Order_Invoice::STATE_OPEN); @@ -140,7 +140,7 @@ $reason = $this->getReason() ? $this->getReason() : $hlp->__('No Reason'); $comment = $this->getComment() ? $this->getComment() : $hlp->__('No Comment'); - $api = Mage::getModel('googlecheckout/api'); + $api = Mage::getModel('googlecheckout/api')->setStoreId($payment->getOrder()->getStoreId()); $api->refund($payment->getOrder()->getExtOrderId(), $amount, $reason, $comment); return $this; @@ -166,7 +166,7 @@ $reason = $this->getReason() ? $this->getReason() : $hlp->__('Unknown Reason'); $comment = $this->getComment() ? $this->getComment() : $hlp->__('No Comment'); - $api = Mage::getModel('googlecheckout/api'); + $api = Mage::getModel('googlecheckout/api')->setStoreId($payment->getOrder()->getStoreId()); $api->cancel($payment->getOrder()->getExtOrderId(), $reason, $comment); } Index: app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Order.php =================================================================== --- app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Order.php (revision 32237) +++ app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Order.php (revision 32464) @@ -29,7 +29,7 @@ protected function _getApiUrl() { $url = $this->_getBaseApiUrl(); - $url .= 'request/Merchant/'.Mage::getStoreConfig('google/checkout/merchant_id'); + $url .= 'request/Merchant/'.Mage::getStoreConfig('google/checkout/merchant_id', $this->getStoreId()); return $url; } Index: app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php =================================================================== --- app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php (revision 32237) +++ app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php (revision 32464) @@ -154,7 +154,7 @@ if ($gRequestMethods = $this->getData('root/calculate/shipping/method')) { $carriers = array(); $errors = array(); - foreach (Mage::getStoreConfig('carriers') as $carrierCode=>$carrierConfig) { + foreach (Mage::getStoreConfig('carriers', $this->getStoreId()) as $carrierCode=>$carrierConfig) { if (!isset($carrierConfig['title'])) { continue; } Index: app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php =================================================================== --- app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php (revision 32237) +++ app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php (revision 32464) @@ -50,7 +50,7 @@ public function getMerchantId() { if (!$this->hasData('merchant_id')) { - $this->setData('merchant_id', Mage::getStoreConfig('google/checkout/merchant_id')); + $this->setData('merchant_id', Mage::getStoreConfig('google/checkout/merchant_id', $this->getStoreId())); } return $this->getData('merchant_id'); } @@ -58,7 +58,7 @@ public function getMerchantKey() { if (!$this->hasData('merchant_key')) { - $this->setData('merchant_key', Mage::getStoreConfig('google/checkout/merchant_key')); + $this->setData('merchant_key', Mage::getStoreConfig('google/checkout/merchant_key', $this->getStoreId())); } return $this->getData('merchant_key'); } @@ -66,7 +66,7 @@ public function getServerType() { if (!$this->hasData('server_type')) { - $this->setData('server_type', Mage::getStoreConfig('google/checkout/sandbox') ? "sandbox" : ""); + $this->setData('server_type', Mage::getStoreConfig('google/checkout/sandbox', $this->getStoreId()) ? "sandbox" : ""); } return $this->getData('server_type'); } @@ -74,7 +74,7 @@ public function getLocale() { if (!$this->hasData('locale')) { - $this->setData('locale', Mage::getStoreConfig('google/checkout/locale')); + $this->setData('locale', Mage::getStoreConfig('google/checkout/locale', $this->getStoreId())); } return $this->getData('locale'); } @@ -165,7 +165,7 @@ $xml = ''."\r\n".$xml; - if (Mage::getStoreConfig('google/checkout/debug')) { + if (Mage::getStoreConfig('google/checkout/debug', $this->getStoreId())) { $debug = Mage::getModel('googlecheckout/api_debug'); $debug->setDir('out')->setUrl($url)->setRequestBody($xml)->save(); } @@ -198,6 +198,6 @@ protected function _getCallbackUrl() { - return Mage::getUrl('googlecheckout/api', array('_forced_secure'=>Mage::getStoreConfig('google/checkout/use_secure_callback_url'))); + return Mage::getUrl('googlecheckout/api', array('_forced_secure'=>Mage::getStoreConfig('google/checkout/use_secure_callback_url', $this->getStoreId()))); } } Index: app/code/core/Mage/GoogleCheckout/Model/Observer.php =================================================================== --- app/code/core/Mage/GoogleCheckout/Model/Observer.php (revision 32237) +++ app/code/core/Mage/GoogleCheckout/Model/Observer.php (revision 32464) @@ -43,9 +43,9 @@ return; } - $api = Mage::getModel('googlecheckout/api'); - - $api->deliver($order->getExtOrderId(), $track->getCarrierCode(), $track->getNumber()); + Mage::getModel('googlecheckout/api') + ->setStoreId($order->getStoreId()) + ->deliver($order->getExtOrderId(), $track->getCarrierCode(), $track->getNumber()); } public function salesOrderShipmentSaveAfter(Varien_Event_Observer $observer) @@ -66,7 +66,9 @@ } if ($items) { - Mage::getModel('googlecheckout/api')->shipItems($order->getExtOrderId(), $items); + Mage::getModel('googlecheckout/api') + ->setStoreId($order->getStoreId()) + ->shipItems($order->getExtOrderId(), $items); } } } Index: app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php =================================================================== --- app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php (revision 32237) +++ app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php (revision 32464) @@ -82,8 +82,18 @@ protected function getShippingMethods() { if (!$this->hasData('shipping_methods')) { + $website = $this->getRequest()->getParam('website'); + $store = $this->getRequest()->getParam('store'); + + $storeId = null; + if (!is_null($website)) { + $storeId = Mage::getModel('core/website')->load($website, 'code')->getDefaultGroup()->getDefaultStoreId(); + } elseif (!is_null($store)) { + $storeId = Mage::getModel('core/store')->load($store, 'code')->getId(); + } + $methods = array(); - $carriers = Mage::getSingleton('shipping/config')->getActiveCarriers(); + $carriers = Mage::getSingleton('shipping/config')->getActiveCarriers($storeId); foreach ($carriers as $carrierCode=>$carrierModel) { if (!$carrierModel->isActive()) { continue; @@ -92,7 +102,7 @@ if (!$carrierMethods) { continue; } - $carrierTitle = Mage::getStoreConfig('carriers/'.$carrierCode.'/title'); + $carrierTitle = Mage::getStoreConfig('carriers/'.$carrierCode.'/title', $storeId); $methods[$carrierCode] = array( 'title' => $carrierTitle, 'methods' => array(), Index: app/code/core/Mage/GoogleOptimizer/Helper/Data.php =================================================================== --- app/code/core/Mage/GoogleOptimizer/Helper/Data.php (revision 32237) +++ app/code/core/Mage/GoogleOptimizer/Helper/Data.php (revision 32464) @@ -105,7 +105,7 @@ return $attributeHtml; } - $newAttributeName = 'product_'.$attributeName.'_'.$category->getId(); + $newAttributeName = 'category_'.$attributeName.'_'.$category->getId(); if (strlen($newAttributeName) > self::MAX_ATTRIBUTE_LENGTH_LIMIT) { $newAttributeName = 'category_'; $newAttributeName .= substr($attributeName, 0, (self::MAX_ATTRIBUTE_LENGTH_LIMIT - strlen('category__'.$category->getId()))); Index: app/code/core/Mage/GoogleOptimizer/Model/Code.php =================================================================== --- app/code/core/Mage/GoogleOptimizer/Model/Code.php (revision 32237) +++ app/code/core/Mage/GoogleOptimizer/Model/Code.php (revision 32464) @@ -139,12 +139,19 @@ if (!$this->getEntity()->getGoogleOptimizerScripts()) { return $this; } + $script = $this->getEntity()->getGoogleOptimizerScripts(); - $this->setData($this->getEntity()->getGoogleOptimizerScripts()->getData()) + $this->setData($script->getData()) ->setEntityId($this->getEntity()->getId()) - ->setEntityType($this->getEntityType()) - ->setStoreId($storeId); + ->setEntityType($this->getEntityType()); + /** + * We can't modify store id if existing stcript + */ + if (!$script->getId()) { + $this->setStoreId($storeId); + } + if (false === $this->_validate()) { throw new Exception(Mage::helper('googleoptimizer')->__('All fields of script types have to be filled.')); } Index: app/code/core/Mage/GoogleOptimizer/etc/config.xml =================================================================== --- app/code/core/Mage/GoogleOptimizer/etc/config.xml (revision 32237) +++ app/code/core/Mage/GoogleOptimizer/etc/config.xml (revision 32464) @@ -75,6 +75,17 @@ Mage_GoogleOptimizer_Block + + + + + singleton + googleoptimizer/observer + appendToPageGoogleOptimizerScripts + + + + @@ -111,15 +122,6 @@ - - - - singleton - googleoptimizer/observer - appendToPageGoogleOptimizerScripts - - - Index: lib/Zend/Currency.php =================================================================== --- lib/Zend/Currency.php (revision 32237) +++ lib/Zend/Currency.php (revision 32464) @@ -176,7 +176,7 @@ $value = Zend_Locale_Format::convertNumerals($value, 'Latn', $options['script']); } - $this->_processSymbolChoice($options); + $this->_processSymbolChoice($options, $value); // Get the sign to be placed next to the number if (is_numeric($options['display']) === false) { @@ -228,9 +228,10 @@ * Select currency symbol if multiple symbols were specified * * @param array $options + * @param integer|float $value Currency value * @return array */ - protected function _processSymbolChoice($options) + protected function _processSymbolChoice($options, $value) { if (isset($options['symbol_choice']) && $options['symbol_choice']) { $symbols = explode('|', $options['symbol']); Property changes on: . ___________________________________________________________________ Name: svnmerge-integrated - /branches/1.2-trunk:1-31596 + /branches/1.2-trunk:1-32406