-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from magento-api/merged-prs
Combined PRs
- Loading branch information
Showing
48 changed files
with
1,412 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
app/code/Magento/ConfigurableProduct/Block/Adminhtml/Order/Create/Sidebar.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\ConfigurableProduct\Block\Adminhtml\Order\Create; | ||
|
||
use Magento\ConfigurableProduct\Model\Product\Type\Configurable; | ||
|
||
class Sidebar | ||
{ | ||
/** | ||
* Get item qty | ||
* | ||
* @param \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar $subject | ||
* @param \Closure $proceed | ||
* @param \Magento\Framework\DataObject $item | ||
* @return string | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function aroundGetItemQty( | ||
\Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar $subject, | ||
\Closure $proceed, | ||
\Magento\Framework\DataObject $item | ||
) { | ||
if ($item->getProduct()->getTypeId() == Configurable::TYPE_CODE) { | ||
return ''; | ||
} | ||
return $proceed($item); | ||
} | ||
|
||
/** | ||
* Check whether product configuration is required before adding to order | ||
* | ||
* @param \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar $subject | ||
* @param \Closure $proceed | ||
* @param string $productType | ||
* @return bool | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function aroundIsConfigurationRequired( | ||
\Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar $subject, | ||
\Closure $proceed, | ||
$productType | ||
) { | ||
if ($productType == Configurable::TYPE_CODE) { | ||
return true; | ||
} | ||
return $proceed($productType); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.