Permalink
Browse files

Import Magento Release 1.2.1.1

  • Loading branch information...
1 parent 7496292 commit 7e3cf77d887f50bf4e4ec65d7730ae19c5851519 @LeeSaferite LeeSaferite committed Feb 25, 2009
Showing with 941 additions and 598 deletions.
  1. +1 −1 app/Mage.php
  2. +3 −0 app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php
  3. +36 −0 app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php
  4. +1 −0 app/code/core/Mage/Bundle/etc/config.xml
  5. +5 −1 app/code/core/Mage/Catalog/Model/Product.php
  6. +21 −0 app/code/core/Mage/Catalog/Model/Product/Type.php
  7. +14 −0 app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php
  8. +577 −564 app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php
  9. +4 −5 app/code/core/Mage/Catalog/etc/config.xml
  10. +17 −2 app/code/core/Mage/Checkout/Helper/Data.php
  11. +7 −1 app/code/core/Mage/Downloadable/Model/Product/Type.php
  12. +10 −0 app/code/core/Mage/Downloadable/etc/config.xml
  13. +1 −1 app/code/core/Mage/GoogleBase/Model/Attribute.php
  14. +34 −0 app/code/core/Mage/GoogleBase/Model/Config.php
  15. +11 −4 app/code/core/Mage/GoogleBase/Model/Service/Item.php
  16. +17 −1 app/code/core/Mage/GoogleBase/controllers/ItemsController.php
  17. +12 −3 app/code/core/Mage/GoogleBase/etc/config.xml
  18. +1 −1 app/code/core/Mage/GoogleCheckout/Block/Link.php
  19. +4 −4 app/code/core/Mage/GoogleCheckout/etc/config.xml
  20. +1 −1 app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-install-0.7.0.php
  21. +2 −2 app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.0-0.7.1.php
  22. +46 −0 app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.1-0.7.2.php
  23. +36 −0 app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.2-0.7.3.php
  24. +47 −0 app/code/core/Mage/Payment/Model/Source/Invoice.php
  25. +10 −1 app/code/core/Mage/Payment/etc/system.xml
  26. +2 −3 app/code/core/Mage/Reports/Model/Mysql4/Product/Collection.php
  27. +4 −1 app/code/core/Mage/Sales/Model/Order/Payment.php
  28. +16 −2 app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php
  29. +1 −0 app/design/adminhtml/default/default/layout/downloadable.xml
View
@@ -82,7 +82,7 @@
public static function getVersion()
{
- return '1.2.1';
+ return '1.2.1.1';
}
/**
@@ -573,6 +573,9 @@ public function addProduct($product, $qty=1)
$product->setSkipCheckRequiredOption(true);
$item = $this->getQuote()->addProduct($product, $qty);
$product->unsSkipCheckRequiredOption();
+ if (is_string($item)) {
+ Mage::throwException($item);
+ }
$item->checkData();
}
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category Mage
+ * @package Mage_Adminhtml
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ */
+
+/**
+ * Order Statuses source model
+ */
+class Mage_Adminhtml_Model_System_Config_Source_Order_Status_Newprocessing extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
+{
+ protected $_stateStatuses = array(
+ Mage_Sales_Model_Order::STATE_NEW,
+ Mage_Sales_Model_Order::STATE_PROCESSING
+ );
+}
@@ -82,6 +82,7 @@
<bundle translate="label" module="bundle">
<label>Bundle Product</label>
<model>bundle/product_type</model>
+ <composite>1</composite>
<allowed_selection_types>
<simple />
<virtual />
@@ -305,7 +305,11 @@ protected function _beforeSave()
$hasOptions = false;
$hasRequiredOptions = false;
- $this->canAffectOptions($this->_canAffectOptions || $this->getCanSaveCustomOptions());
+ /**
+ * $this->_canAffectOptions - set by type instance only
+ * $this->getCanSaveCustomOptions() - set either in controller when "Custom Options" ajax tab is loaded, or in type instance as well
+ */
+ $this->canAffectOptions($this->_canAffectOptions && $this->getCanSaveCustomOptions());
if ($this->getCanSaveCustomOptions()) {
$options = $this->getProductOptions();
if (is_array($options)) {
@@ -47,6 +47,7 @@ class Mage_Catalog_Model_Product_Type
const DEFAULT_PRICE_MODEL = 'catalog/product_type_price';
static protected $_types;
+ static protected $_compositeTypes;
static protected $_priceModels;
/**
@@ -67,6 +68,7 @@ public static function factory($product)
$typeModel = Mage::getModel($typeModelName);
$typeModel->setProduct($product);
+ $typeModel->setConfig($types[$product->getTypeId()]);
return $typeModel;
}
@@ -150,4 +152,23 @@ static public function getTypes()
return self::$_types;
}
+
+ /**
+ * Return composite product type Ids
+ *
+ * @return array
+ */
+ static public function getCompositeTypes()
+ {
+ if (is_null(self::$_compositeTypes)) {
+ self::$_compositeTypes = array();
+ $types = self::getTypes();
+ foreach ($types as $typeId=>$typeInfo) {
+ if (array_key_exists('composite', $typeInfo) && $typeInfo['composite']) {
+ self::$_compositeTypes[] = $typeId;
+ }
+ }
+ }
+ return self::$_compositeTypes;
+ }
}
@@ -452,6 +452,20 @@ public function isComposite()
}
/**
+ * Setting specified product type variables
+ *
+ * @param array $config
+ * @return Mage_Catalog_Model_Product_Type_Abstract
+ */
+ public function setConfig($config)
+ {
+ if (isset($config['composite'])) {
+ $this->_isComposite = (bool) $config['composite'];
+ }
+ return $this;
+ }
+
+ /**
* Default action to get sku of product
*
* @return string
Oops, something went wrong.

0 comments on commit 7e3cf77

Please sign in to comment.