Index: app/Mage.php =================================================================== --- app/Mage.php (revision 28963) +++ app/Mage.php (revision 28978) @@ -82,7 +82,7 @@ public static function getVersion() { - return '1.1.7'; + return '1.1.8'; } /** Index: app/design/frontend/default/iphone/template/tag/customer/edit.phtml =================================================================== --- app/design/frontend/default/iphone/template/tag/customer/edit.phtml (revision 28963) +++ app/design/frontend/default/iphone/template/tag/customer/edit.phtml (revision 28978) @@ -34,7 +34,7 @@ Index: app/design/frontend/default/default/template/tag/customer/edit.phtml =================================================================== --- app/design/frontend/default/default/template/tag/customer/edit.phtml (revision 28963) +++ app/design/frontend/default/default/template/tag/customer/edit.phtml (revision 28978) @@ -34,7 +34,7 @@ Index: app/design/frontend/default/modern/template/tag/customer/edit.phtml =================================================================== --- app/design/frontend/default/modern/template/tag/customer/edit.phtml (revision 28963) +++ app/design/frontend/default/modern/template/tag/customer/edit.phtml (revision 28978) @@ -34,7 +34,7 @@ Index: app/design/frontend/default/blank/template/tag/customer/edit.phtml =================================================================== --- app/design/frontend/default/blank/template/tag/customer/edit.phtml (revision 28963) +++ app/design/frontend/default/blank/template/tag/customer/edit.phtml (revision 28978) @@ -31,7 +31,7 @@

__('Tag Information') ?>

-

+

« __('Back to view Tag') ?> Index: app/design/frontend/default/blank/template/tag/list.phtml =================================================================== --- app/design/frontend/default/blank/template/tag/list.phtml (revision 28963) +++ app/design/frontend/default/blank/template/tag/list.phtml (revision 28978) @@ -39,7 +39,7 @@
- +

__("Use spaces to separate tags. Use single quotes (') for phrases.") ?>

Index: app/design/adminhtml/default/default/template/catalog/product/edit/options/type/select.phtml =================================================================== --- app/design/adminhtml/default/default/template/catalog/product/edit/options/type/select.phtml (revision 28963) +++ app/design/adminhtml/default/default/template/catalog/product/edit/options/type/select.phtml (revision 28978) @@ -48,10 +48,11 @@ ''+ ''; -OptionTemplateSelectRow = ''+ +OptionTemplateSelectRow = ''+ + ''+ + ''+ ''+ - ''+ - '{{checkboxScopeTitle}}'+ + '{{checkboxScopeTitle}}'+ ''+ 'getPriceTypeSelectHtml() ?>{{checkboxScopePrice}}'+ ''+ @@ -82,7 +83,7 @@ data.id = optionId; - Element.insert($(this.div+'_'+data.id), {'bottom':this.template.evaluate(data)}); + Element.insert($(this.div+'_'+data.id), {'bottom':this.template.evaluate(data)}); if (data.checkboxScopeTitle) { //set disabled Index: app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml =================================================================== --- app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml (revision 28963) +++ app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml (revision 28978) @@ -46,7 +46,7 @@ __('Set root category for this store in the configuration', $this->getStoreConfigurationUrl()) ?>
- +
Index: app/code/core/Mage/Log/etc/system.xml =================================================================== --- app/code/core/Mage/Log/etc/system.xml (revision 28963) +++ app/code/core/Mage/Log/etc/system.xml (revision 28978) @@ -26,27 +26,27 @@ */ --> - - - - - - text + + + + + + text 200 - 1 - 0 + 1 + 0 0 - - - + + + text - 1 + 1 1 0 0 - - - + + + select adminhtml/system_config_source_yesno 2 @@ -54,7 +54,7 @@ 0 0 - - - - - + + + + + \ No newline at end of file Index: app/code/core/Mage/Log/etc/config.xml =================================================================== --- app/code/core/Mage/Log/etc/config.xml (revision 28963) +++ app/code/core/Mage/Log/etc/config.xml (revision 28978) @@ -178,7 +178,7 @@ - 1 + 180 0 D Index: app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php =================================================================== --- app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php (revision 28963) +++ app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php (revision 28978) @@ -120,6 +120,7 @@ return $row; } + public function uploadAndImport(Varien_Object $object) { $csvFile = $_FILES["groups"]["tmp_name"]["tablerate"]["fields"]["import"]["value"]; @@ -174,16 +175,22 @@ $data = array(); $countryCodesToIds = array(); $regionCodesToIds = array(); + $countryCodesIso2 = array(); $countryCollection = Mage::getResourceModel('directory/country_collection')->addCountryCodeFilter($countryCodes)->load(); foreach ($countryCollection->getItems() as $country) { $countryCodesToIds[$country->getData('iso3_code')] = $country->getData('country_id'); $countryCodesToIds[$country->getData('iso2_code')] = $country->getData('country_id'); + $countryCodesIso2[] = $country->getData('iso2_code'); } - $regionCollection = Mage::getResourceModel('directory/region_collection')->addRegionCodeFilter($regionCodes)->load(); + $regionCollection = Mage::getResourceModel('directory/region_collection') + ->addRegionCodeFilter($regionCodes) + ->addCountryFilter($countryCodesIso2) + ->load(); + foreach ($regionCollection->getItems() as $region) { - $regionCodesToIds[$region->getData('code')] = $region->getData('region_id'); + $regionCodesToIds[$countryCodesToIds[$region->getData('country_id')]][$region->getData('code')] = $region->getData('region_id'); } foreach ($csvLines as $k=>$csvLine) { @@ -198,13 +205,14 @@ $countryId = $countryCodesToIds[$csvLine[0]]; } - if (empty($regionCodesToIds) || !array_key_exists($csvLine[1], $regionCodesToIds)) { + if (empty($regionCodesToIds[$countryCodesToIds[$csvLine[0]]]) + || !array_key_exists($csvLine[1], $regionCodesToIds[$countryCodesToIds[$csvLine[0]]])) { $regionId = '0'; if ($csvLine[1] != '*' && $csvLine[1] != '') { $exceptions[] = Mage::helper('shipping')->__('Invalid Region/State "%s" in the Row #%s', $csvLine[1], ($k+1)); } } else { - $regionId = $regionCodesToIds[$csvLine[1]]; + $regionId = $regionCodesToIds[$countryCodesToIds[$csvLine[0]]][$csvLine[1]]; } if ($csvLine[2] == '*' || $csvLine[2] == '') { @@ -246,6 +254,7 @@ } } } + if (!empty($exceptions)) { throw new Exception( "\n" . implode("\n", $exceptions) ); } @@ -253,7 +262,7 @@ } } - private function _getCsvValues($string, $separator=",") + protected function _getCsvValues($string, $separator=",") { $elements = explode($separator, trim($string)); for ($i = 0; $i < count($elements); $i++) { @@ -279,7 +288,7 @@ return $elements; } - private function _isPositiveDecimalNumber($n) + protected function _isPositiveDecimalNumber($n) { return preg_match ("/^[0-9]+(\.[0-9]*)?$/", $n); } Index: app/code/core/Mage/Shipping/etc/config.xml =================================================================== --- app/code/core/Mage/Shipping/etc/config.xml (revision 28963) +++ app/code/core/Mage/Shipping/etc/config.xml (revision 28978) @@ -111,7 +111,7 @@ - Shipping Section + Shipping Settings Section 0 Index: app/code/core/Mage/PaypalUk/etc/config.xml =================================================================== --- app/code/core/Mage/PaypalUk/etc/config.xml (revision 28963) +++ app/code/core/Mage/PaypalUk/etc/config.xml (revision 28978) @@ -125,25 +125,6 @@ - - - - - - - - - - PayPal Uk Section - - - - - - - - - Index: app/code/core/Mage/Tax/etc/config.xml =================================================================== --- app/code/core/Mage/Tax/etc/config.xml (revision 28963) +++ app/code/core/Mage/Tax/etc/config.xml (revision 28978) @@ -167,7 +167,7 @@ 20 - Manage Tax Rates + Manage Tax Zones & Rates 30 Index: app/code/core/Mage/Review/Block/Customer/View.php =================================================================== --- app/code/core/Mage/Review/Block/Customer/View.php (revision 28963) +++ app/code/core/Mage/Review/Block/Customer/View.php (revision 28978) @@ -45,7 +45,10 @@ public function getProductData() { if( $this->getReviewId() && !$this->getProductCacheData() ) { - $this->setProductCacheData(Mage::getModel('catalog/product')->load($this->getReviewData()->getEntityPkValue())); + $product = Mage::getModel('catalog/product') + ->setStoreId(Mage::app()->getStore()->getId()) + ->load($this->getReviewData()->getEntityPkValue()); + $this->setProductCacheData($product); } return $this->getProductCacheData(); } Index: app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php =================================================================== --- app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php (revision 0) +++ app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php (revision 28978) @@ -0,0 +1,65 @@ +_appendJs($element); + return $html; + } + + protected function _appendJs($element) + { + $elId = $element->getHtmlId(); + $childId = str_replace('sallowspecific', 'specificcountry', $elId); + $html = ""; + return $html; + } +} Index: app/code/core/Mage/GoogleCheckout/etc/system.xml =================================================================== --- app/code/core/Mage/GoogleCheckout/etc/system.xml (revision 28963) +++ app/code/core/Mage/GoogleCheckout/etc/system.xml (revision 28978) @@ -332,8 +332,8 @@ select 24 - shipping-applicable-country adminhtml/system_config_source_shipping_allspecificcountries + googlecheckout/adminhtml_shipping_applicable_countries 1 1 0 @@ -370,8 +370,8 @@ select 34 - shipping-applicable-country-2 adminhtml/system_config_source_shipping_allspecificcountries + googlecheckout/adminhtml_shipping_applicable_countries 1 1 0 @@ -407,8 +407,8 @@ select 44 - shipping-applicable-country-3 adminhtml/system_config_source_shipping_allspecificcountries + googlecheckout/adminhtml_shipping_applicable_countries 1 1 0 Index: app/code/core/Mage/Catalog/Model/Product/Url.php =================================================================== --- app/code/core/Mage/Catalog/Model/Product/Url.php (revision 28963) +++ app/code/core/Mage/Catalog/Model/Product/Url.php (revision 28978) @@ -84,6 +84,9 @@ $url = $product->getData($cacheUrlKey); if (is_null($url)) { + if ($product->getStoreId()) { + $this->getUrlInstance()->setStore($product->getStoreId()); + } if ($product->hasData('request_path') && $product->getRequestPath() != '') { $this->setData($cacheUrlKey, $this->getUrlInstance()->getDirectUrl($product->getRequestPath())); return $this->getData($cacheUrlKey); @@ -102,7 +105,7 @@ } $rewrite->loadByIdPath($idPath); - +//echo $this->getUrlInstance()->getBaseUrl(); if ($rewrite->getId()) { $this->setData($cacheUrlKey, $this->getUrlInstance()->getDirectUrl($rewrite->getRequestPath())); Varien_Profiler::stop('REWRITE: '.__METHOD__); Index: app/code/core/Mage/Page/Block/Html/Footer.php =================================================================== --- app/code/core/Mage/Page/Block/Html/Footer.php (revision 28963) +++ app/code/core/Mage/Page/Block/Html/Footer.php (revision 28978) @@ -46,7 +46,7 @@ public function getCacheKey() { - return 'PAGE_FOOTER_'.Mage::app()->getStore()->getId(); + return 'PAGE_FOOTER_' . Mage::app()->getStore()->getId() . '_' . (int)Mage::app()->getStore()->isCurrentlySecure(); } public function setCopyright($copyright) Index: app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php =================================================================== --- app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php (revision 28963) +++ app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php (revision 28978) @@ -104,7 +104,8 @@ ->_addContent($this->getLayout()->createBlock('adminhtml/cms_page_edit')->setData('action', $this->getUrl('*/cms_page/save'))) ->_addLeft($this->getLayout()->createBlock('adminhtml/cms_page_edit_tabs')); - if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true)) { + if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true) + && Mage::helper('googleoptimizer')->isOptimizerActive()) { $this->_addJs($this->getLayout()->createBlock('googleoptimizer/js')->setTemplate('googleoptimizer/js.phtml')); } Index: app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php =================================================================== --- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php (revision 28963) +++ app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php (revision 28978) @@ -45,7 +45,8 @@ protected function _prepareLayout() { - if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true)) { + if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true) + && Mage::helper('googleoptimizer')->isOptimizerActive()) { $this->setChild('googleoptimizer_js', $this->getLayout()->createBlock('googleoptimizer/js')->setTemplate('googleoptimizer/js.phtml') ); Index: app/code/core/Mage/Adminhtml/etc/config.xml =================================================================== --- app/code/core/Mage/Adminhtml/etc/config.xml (revision 28963) +++ app/code/core/Mage/Adminhtml/etc/config.xml (revision 28978) @@ -269,7 +269,7 @@ - Stores + Manage Stores Design @@ -339,10 +339,6 @@ Currency Setup Section 120 - - Allowed Settings - 130 - Rss Feeds Section 135 @@ -358,7 +354,7 @@ - Manage Currency + Manage Currency Rates 30 @@ -382,26 +378,10 @@ Import/Export - GUI Profiles - - - Create/Edit/Delete profiles - - - Run profiles - - + Profiles Advanced Profiles - - - Create/Edit/Delete profiles - - - Run profiles - - @@ -413,16 +393,12 @@ Magento Connect Manager + 0 - - Available Remote - Package Extensions + 5 - - PEAR Configuration - Index: app/code/core/Mage/GoogleOptimizer/Block/Js.php =================================================================== --- app/code/core/Mage/GoogleOptimizer/Block/Js.php (revision 28963) +++ app/code/core/Mage/GoogleOptimizer/Block/Js.php (revision 28978) @@ -45,7 +45,7 @@ public function getExportUrl() { - return Mage::getUrl('googleoptimizer/index/codes'); + return $this->getUrl('googleoptimizer/index/codes'); } public function getControlFieldKey () Index: app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php =================================================================== --- app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php (revision 28963) +++ app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php (revision 28978) @@ -78,7 +78,7 @@ */ public function addCatalogInventoryToProductCollection($productCollection) { - $isStockManagedInConfig = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK); + $isStockManagedInConfig = (int) Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK); $productCollection->joinTable('cataloginventory/stock_item', 'product_id=entity_id', array( @@ -86,7 +86,6 @@ 'inventory_in_stock' => 'is_in_stock' ), null, 'left'); - return $this; } } \ No newline at end of file Index: app/code/core/Mage/Core/Model/Abstract.php =================================================================== --- app/code/core/Mage/Core/Model/Abstract.php (revision 28963) +++ app/code/core/Mage/Core/Model/Abstract.php (revision 28978) @@ -81,6 +81,15 @@ protected $_cacheTag = false; /** + * Flag which can stop data saving after before save + * Can be used for next sequence: we check data in _beforeSave, if data are + * not valid - we can set this flag to false value and save process will be stopped + * + * @var bool + */ + protected $_dataSaveAllowed = true; + + /** * Standard model initialization * * @param string $resourceModel @@ -238,9 +247,10 @@ $this->_getResource()->beginTransaction(); try { $this->_beforeSave(); - $this->_getResource()->save($this); - $this->_afterSave(); - + if ($this->_dataSaveAllowed) { + $this->_getResource()->save($this); + $this->_afterSave(); + } $this->_getResource()->commit(); } catch (Exception $e){ Index: app/code/core/Mage/Core/etc/config.xml =================================================================== --- app/code/core/Mage/Core/etc/config.xml (revision 28963) +++ app/code/core/Mage/Core/etc/config.xml (revision 28978) @@ -76,6 +76,7 @@ Shockwave Flash + Adobe Flash Player 9 Adobe Flash Player 10 Index: app/code/core/Mage/Newsletter/Model/Template.php =================================================================== --- app/code/core/Mage/Newsletter/Model/Template.php (revision 28963) +++ app/code/core/Mage/Newsletter/Model/Template.php (revision 28978) @@ -142,7 +142,7 @@ public function getProcessedTemplate(array $variables = array(), $usePreprocess=false) { - $processor = new Varien_Filter_Template(); + $processor = Mage::getModel('core/email_template_filter'); if(!$this->_preprocessFlag) { $variables['this'] = $this; Index: app/code/core/Mage/AdminNotification/etc/config.xml =================================================================== --- app/code/core/Mage/AdminNotification/etc/config.xml (revision 28963) +++ app/code/core/Mage/AdminNotification/etc/config.xml (revision 28978) @@ -87,7 +87,7 @@ - Notification + Notifications 10 Index: app/code/core/Mage/Checkout/Model/Type/Onepage.php =================================================================== --- app/code/core/Mage/Checkout/Model/Type/Onepage.php (revision 28963) +++ app/code/core/Mage/Checkout/Model/Type/Onepage.php (revision 28978) @@ -225,7 +225,7 @@ } // invoke customer model, if it is registering - if ($address->getCustomerPassword()) { + if ('register' == $this->getQuote()->getCheckoutMethod()) { // set customer password hash for further usage $customer = Mage::getModel('customer/customer'); $this->getQuote()->setPasswordHash($customer->encryptPassword($address->getCustomerPassword())); @@ -251,6 +251,14 @@ 'message' => implode(', ', $validationResult) ); } + } elseif('guest' == $this->getQuote()->getCheckoutMethod()) { + $email = $address->getData('email'); + if (!Zend_Validate::is($email, 'EmailAddress')) { + return array( + 'error' => -1, + 'message' => Mage::helper('checkout')->__('Invalid email address "%s"', $email) + ); + } } return true; Index: app/code/core/Mage/GoogleBase/Model/Service/Item.php =================================================================== --- app/code/core/Mage/GoogleBase/Model/Service/Item.php (revision 28963) +++ app/code/core/Mage/GoogleBase/Model/Service/Item.php (revision 28978) @@ -95,6 +95,19 @@ } /** + * Return Store level Service Instance + * + * @return Zend_Gdata_Gbase + */ + public function getService($storeId = null) + { + if ($storeId === null) { + $storeId = $this->getStoreId(); + } + return parent::getService($storeId); + } + + /** * Insert Item into Google Base * * @return Zend_Gdata_Gbase_ItemEntry @@ -262,10 +275,15 @@ $quantity = $object->getQuantity() ? max(1, (int)$object->getQuantity()) : 1; $this->_setAttribute('quantity', $quantity, 'int'); } + if ($object->getImageUrl()) { $this->_setAttribute('image_link', $object->getImageUrl(), 'url'); } + if ($country = Mage::getStoreConfig('google/googlebase/target_country', $this->getStoreId())) { + $this->_setAttribute('target_country', $country, 'text'); + } + return $this; } Index: app/code/core/Mage/GoogleBase/Model/Service/Feed.php =================================================================== --- app/code/core/Mage/GoogleBase/Model/Service/Feed.php (revision 28963) +++ app/code/core/Mage/GoogleBase/Model/Service/Feed.php (revision 28978) @@ -42,10 +42,10 @@ * @param string $location * @return Zend_Gdata_Feed */ - public function getFeed($location = null) + public function getFeed($location = null, $storeId = null) { $query = new Zend_Gdata_Query($location); - return $this->getService()->getFeed($query); + return $this->getService($storeId)->getFeed($query); } /** @@ -53,9 +53,9 @@ * * @return array */ - public function getItemsStatsArray() + public function getItemsStatsArray($storeId = null) { - $feed = $this->getFeed(self::ITEMS_LOCATION); + $feed = $this->getFeed(self::ITEMS_LOCATION, $storeId); $result = array(); foreach ($feed as $entry) { $draft = 'no'; @@ -88,13 +88,13 @@ * * @return array */ - public function getItemTypes() + public function getItemTypes($storeId = null) { if (is_array($this->_itemTypes)) { return $this->_itemTypes; } $location = self::ITEM_TYPES_LOCATION . '/' . Mage::app()->getLocale()->getLocale(); - $feed = $this->getFeed($location); + $feed = $this->getFeed($location, $storeId); $itemTypes = array(); foreach ($feed->entries as $entry) { @@ -132,9 +132,9 @@ * @param string $type Google Base Item Type * @return array */ - public function getAttributes($type) + public function getAttributes($type, $storeId = null) { - $itemTypes = $this->getItemTypes(); + $itemTypes = $this->getItemTypes($storeId); if (isset($itemTypes[$type]) && $itemTypes[$type] instanceof Varien_Object) { return $itemTypes[$type]->getAttributes(); } Index: app/code/core/Mage/GoogleBase/Model/Source/Country.php =================================================================== --- app/code/core/Mage/GoogleBase/Model/Source/Country.php (revision 0) +++ app/code/core/Mage/GoogleBase/Model/Source/Country.php (revision 28978) @@ -0,0 +1,44 @@ + + */ +class Mage_GoogleBase_Model_Source_Country +{ + public function toOptionArray() + { + return array( + array('value' => 'US', 'label' => Mage::helper('googlebase')->__('United States')), + array('value' => 'GB', 'label' => Mage::helper('googlebase')->__('United Kingdom')), + array('value' => 'DE', 'label' => Mage::helper('googlebase')->__('Germany')), + ); + } +} \ No newline at end of file Index: app/code/core/Mage/GoogleBase/Model/Item.php =================================================================== --- app/code/core/Mage/GoogleBase/Model/Item.php (revision 28963) +++ app/code/core/Mage/GoogleBase/Model/Item.php (revision 28978) @@ -49,7 +49,7 @@ */ public function getServiceItem() { - return Mage::getModel('googlebase/service_item'); + return Mage::getModel('googlebase/service_item')->setStoreId($this->getStoreId()); } /** @@ -185,7 +185,7 @@ protected function _prepareProductObject() { $product = clone $this->getProduct(); - + /* @var $product Mage_Catalog_Model_Product */ $url = $product->getProductUrl(); if (!Mage::getStoreConfigFlag('web/url/use_store')) { $urlInfo = parse_url($url); Index: app/code/core/Mage/GoogleBase/Model/Service.php =================================================================== --- app/code/core/Mage/GoogleBase/Model/Service.php (revision 28963) +++ app/code/core/Mage/GoogleBase/Model/Service.php (revision 28978) @@ -38,10 +38,10 @@ * * @return Zend_Http_Client */ - public function getClient() + public function getClient($storeId = null) { - $user = Mage::getStoreConfig('google/googlebase/login'); - $pass = Mage::getStoreConfig('google/googlebase/password'); + $user = Mage::getStoreConfig('google/googlebase/login', $storeId); + $pass = Mage::getStoreConfig('google/googlebase/password', $storeId); // Create an authenticated HTTP client $errorMsg = Mage::helper('googlebase')->__('Unable to connect to Google Base. Please, check Account settings in configuration.'); @@ -63,10 +63,10 @@ * * @return Zend_Gdata_Gbase */ - public function getService() + public function getService($storeId = null) { if (!$this->_service) { - $service = $this->_connect(); + $service = $this->_connect($storeId); $this->_service = $service; } return $this->_service; @@ -77,9 +77,9 @@ * * @return Zend_Gdata_Gbase */ - protected function _connect() + protected function _connect($storeId = null) { - $client = $this->getClient(); + $client = $this->getClient($storeId); $service = new Zend_Gdata_Gbase($client); return $service; } Index: app/code/core/Mage/GoogleBase/Model/Observer.php =================================================================== --- app/code/core/Mage/GoogleBase/Model/Observer.php (revision 28963) +++ app/code/core/Mage/GoogleBase/Model/Observer.php (revision 28978) @@ -41,9 +41,8 @@ */ public function saveProductItem($observer) { - if (Mage::getStoreConfigFlag('google/googlebase/observed')) { - $product = $observer->getEvent()->getProduct(); - + $product = $observer->getEvent()->getProduct(); + if (Mage::getStoreConfigFlag('google/googlebase/observed', $product->getStoreId())) { $collection = Mage::getResourceModel('googlebase/item_collection') ->addProductFilterId($product->getId()) ->load(); @@ -65,9 +64,8 @@ */ public function deleteProductItem($observer) { - if (Mage::getStoreConfigFlag('google/googlebase/observed')) { - $product = $observer->getEvent()->getProduct(); - + $product = $observer->getEvent()->getProduct(); + if (Mage::getStoreConfigFlag('google/googlebase/observed', $product->getStoreId())) { $collection = Mage::getResourceModel('googlebase/item_collection') ->addProductFilterId($product->getId()) ->load(); Index: app/code/core/Mage/GoogleBase/controllers/ItemsController.php =================================================================== --- app/code/core/Mage/GoogleBase/controllers/ItemsController.php (revision 28963) +++ app/code/core/Mage/GoogleBase/controllers/ItemsController.php (revision 28978) @@ -207,7 +207,7 @@ ); } - $stats = Mage::getModel('googlebase/service_feed')->getItemsStatsArray(); + $stats = Mage::getModel('googlebase/service_feed')->getItemsStatsArray($storeId); foreach ($existing as $entryId => $itemInfo) { @@ -248,4 +248,9 @@ } return Mage::app()->getStore($storeId); } + + protected function _isAllowed() + { + return Mage::getSingleton('admin/session')->isAllowed('catalog/googlebase/items'); + } } \ No newline at end of file Index: app/code/core/Mage/GoogleBase/controllers/TypesController.php =================================================================== --- app/code/core/Mage/GoogleBase/controllers/TypesController.php (revision 28963) +++ app/code/core/Mage/GoogleBase/controllers/TypesController.php (revision 28978) @@ -188,4 +188,9 @@ $this->_getSession()->addError($e->getMessage()); } } + + protected function _isAllowed() + { + return Mage::getSingleton('admin/session')->isAllowed('catalog/googlebase/types'); + } } \ No newline at end of file Index: app/code/core/Mage/GoogleBase/etc/system.xml =================================================================== --- app/code/core/Mage/GoogleBase/etc/system.xml (revision 28963) +++ app/code/core/Mage/GoogleBase/etc/system.xml (revision 28978) @@ -34,33 +34,42 @@ text 20 1 - 0 - 0 + 1 + 1 - + text 1 1 - 0 - 0 + 1 + 1 password 2 1 - 0 - 0 + 1 + 1 + + + select + googlebase/source_country + 3 + 1 + 1 + 1 + select adminhtml/system_config_source_yesno 100 1 - 0 - 0 + 1 + 1 Index: app/code/core/Mage/GoogleBase/etc/config.xml =================================================================== --- app/code/core/Mage/GoogleBase/etc/config.xml (revision 28963) +++ app/code/core/Mage/GoogleBase/etc/config.xml (revision 28978) @@ -81,16 +81,18 @@ Mage_GoogleBase_Block - + - standard + admin Mage_GoogleBase googlebase + + @@ -146,6 +148,32 @@ + + + + + + + + Google Base + 500 + + + Manage Attributes + 0 + + + Manage Items + 5 + + + + + + + + + @@ -163,6 +191,9 @@ 0 + + US + Index: app/code/core/Mage/Sales/Model/Quote/Address.php =================================================================== --- app/code/core/Mage/Sales/Model/Quote/Address.php (revision 28963) +++ app/code/core/Mage/Sales/Model/Quote/Address.php (revision 28978) @@ -62,7 +62,13 @@ { parent::_beforeSave(); if ($this->getQuote()) { - $this->setQuoteId($this->getQuote()->getId()); + $quoteId = $this->getQuote()->getId(); + if ($quoteId) { + $this->setQuoteId($quoteId); + } + else { + $this->_dataSaveAllowed = false; + } } return $this; } Index: app/code/core/Mage/Tag/controllers/CustomerController.php =================================================================== --- app/code/core/Mage/Tag/controllers/CustomerController.php (revision 28963) +++ app/code/core/Mage/Tag/controllers/CustomerController.php (revision 28978) @@ -148,7 +148,7 @@ $tagId = (int) $this->getRequest()->getParam('tagId'); $customerId = Mage::getSingleton('customer/session')->getCustomerId(); - $tagName = (string) $this->getRequest()->getPost('tagName'); + $tagName = (string) $this->getRequest()->getPost('productTagName'); if (strlen($tagName) === 0) { Mage::getSingleton('tag/session')->addError(Mage::helper('tag')->__('Tag can\'t be empty.')); Property changes on: . ___________________________________________________________________ Name: svnmerge-integrated - /branches/1.1-trunk:1-28610 + /branches/1.1-trunk:1-28975