Skip to content

Commit 9f21d21

Browse files
committed
Merge pull request #33 from magento-firedrakes/MAGETWO-31593
[Firedrakes] Sales Quote as Standalone Magento Module
2 parents 3de5edb + 6ca8249 commit 9f21d21

File tree

594 files changed

+6857
-5301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

594 files changed

+6857
-5301
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* Grid widget massaction block
1212
*
13-
* @method \Magento\Sales\Model\Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors
13+
* @method \Magento\Quote\Model\Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors
1414
* @method boolean getHideFormElement()
1515
* @author Magento Core Team <core@magentocommerce.com>
1616
*/

app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Grid widget massaction block
1010
*
11-
* @method \Magento\Sales\Model\Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors
11+
* @method \Magento\Quote\Model\Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors
1212
* @method boolean getHideFormElement()
1313
* @author Magento Core Team <core@magentocommerce.com>
1414
* @deprecated support Magento 1.x grid massaction implementation

app/code/Magento/Backend/Model/Session/Quote.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Quote extends \Magento\Framework\Session\SessionManager
2828
/**
2929
* Quote model object
3030
*
31-
* @var \Magento\Sales\Model\Quote
31+
* @var \Magento\Quote\Model\Quote
3232
*/
3333
protected $_quote;
3434

@@ -59,7 +59,7 @@ class Quote extends \Magento\Framework\Session\SessionManager
5959
/**
6060
* Sales quote repository
6161
*
62-
* @var \Magento\Sales\Model\QuoteRepository
62+
* @var \Magento\Quote\Model\QuoteRepository
6363
*/
6464
protected $quoteRepository;
6565

@@ -83,7 +83,7 @@ class Quote extends \Magento\Framework\Session\SessionManager
8383
* @param \Magento\Framework\Stdlib\CookieManagerInterface $cookieManager
8484
* @param \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory
8585
* @param CustomerRepositoryInterface $customerRepository
86-
* @param \Magento\Sales\Model\QuoteRepository $quoteRepository
86+
* @param \Magento\Quote\Model\QuoteRepository $quoteRepository
8787
* @param \Magento\Sales\Model\OrderFactory $orderFactory
8888
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
8989
* @param GroupManagementInterface $groupManagement
@@ -98,7 +98,7 @@ public function __construct(
9898
\Magento\Framework\Stdlib\CookieManagerInterface $cookieManager,
9999
\Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory,
100100
CustomerRepositoryInterface $customerRepository,
101-
\Magento\Sales\Model\QuoteRepository $quoteRepository,
101+
\Magento\Quote\Model\QuoteRepository $quoteRepository,
102102
\Magento\Sales\Model\OrderFactory $orderFactory,
103103
\Magento\Store\Model\StoreManagerInterface $storeManager,
104104
GroupManagementInterface $groupManagement
@@ -127,7 +127,7 @@ public function __construct(
127127
/**
128128
* Retrieve quote model object
129129
*
130-
* @return \Magento\Sales\Model\Quote
130+
* @return \Magento\Quote\Model\Quote
131131
*/
132132
public function getQuote()
133133
{

app/code/Magento/Backend/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"magento/module-theme": "0.42.0-beta3",
1212
"magento/module-reports": "0.42.0-beta3",
1313
"magento/module-sales": "0.42.0-beta3",
14+
"magento/module-quote": "0.42.0-beta3",
1415
"magento/module-catalog": "0.42.0-beta3",
1516
"magento/module-user": "0.42.0-beta3",
1617
"magento/module-backup": "0.42.0-beta3",

app/code/Magento/Bundle/Model/Plugin/QuoteItem.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ class QuoteItem
1212
/**
1313
* Add bundle attributes to order data
1414
*
15-
* @param \Magento\Sales\Model\Convert\Quote $subject
16-
* @param Closure $proceed
17-
* @param \Magento\Sales\Model\Quote\Item\AbstractItem $item
15+
* @param \Magento\Quote\Model\Quote\Item\ToOrderItem $subject
16+
* @param callable $proceed
17+
* @param \Magento\Quote\Model\Quote\Item\AbstractItem $item
18+
* @param array $additional
1819
* @return \Magento\Sales\Model\Order\Item
1920
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2021
*/
21-
public function aroundItemToOrderItem(
22-
\Magento\Sales\Model\Convert\Quote $subject,
22+
public function aroundConvert(
23+
\Magento\Quote\Model\Quote\Item\ToOrderItem $subject,
2324
Closure $proceed,
24-
\Magento\Sales\Model\Quote\Item\AbstractItem $item
25+
\Magento\Quote\Model\Quote\Item\AbstractItem $item,
26+
$additional
2527
) {
2628
/** @var $orderItem \Magento\Sales\Model\Order\Item */
27-
$orderItem = $proceed($item);
29+
$orderItem = $proceed($item, $additional);
2830

2931
if ($attributes = $item->getProduct()->getCustomOption('bundle_selection_attributes')) {
3032
$productOptions = $orderItem->getProductOptions();

app/code/Magento/Bundle/Model/Resource/Bundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function dropAllQuoteChildItems($productId)
8585
{
8686
$quoteItemIds = $this->_getReadAdapter()->fetchCol(
8787
$this->_getReadAdapter()->select()->from(
88-
$this->getTable('sales_quote_item'),
88+
$this->getTable('quote_item'),
8989
['item_id']
9090
)->where(
9191
'product_id = :product_id'
@@ -95,7 +95,7 @@ public function dropAllQuoteChildItems($productId)
9595

9696
if ($quoteItemIds) {
9797
$this->_getWriteAdapter()->delete(
98-
$this->getTable('sales_quote_item'),
98+
$this->getTable('quote_item'),
9999
['parent_item_id IN(?)' => $quoteItemIds]
100100
);
101101
}

app/code/Magento/Bundle/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"magento/module-gift-message": "0.42.0-beta3",
1818
"magento/framework": "0.42.0-beta3",
1919
"magento/module-webapi": "0.42.0-beta3",
20+
"magento/module-quote": "0.42.0-beta3",
2021
"magento/magento-composer-installer": "*"
2122
},
2223
"type": "magento2-module",

app/code/Magento/Bundle/etc/adminhtml/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
9-
<type name="Magento\Sales\Model\Convert\Quote">
9+
<type name="Magento\Quote\Model\Quote\Item\ToOrderItem">
1010
<plugin name="append_bundle_data_to_order" type="Magento\Bundle\Model\Plugin\QuoteItem"/>
1111
</type>
1212
<type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper">

app/code/Magento/Bundle/etc/catalog_attributes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<attribute name="price_view"/>
1111
<attribute name="price_type"/>
1212
</group>
13-
<group name="sales_quote_item">
13+
<group name="quote_item">
1414
<attribute name="price_view"/>
1515
<attribute name="price_type"/>
1616
<attribute name="shipment_type"/>

app/code/Magento/Bundle/etc/frontend/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
9-
<type name="Magento\Sales\Model\Convert\Quote">
9+
<type name="Magento\Quote\Model\Quote\Item\ToOrderItem">
1010
<plugin name="append_bundle_data_to_order" type="Magento\Bundle\Model\Plugin\QuoteItem"/>
1111
</type>
1212
</config>

0 commit comments

Comments
 (0)