-
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 #545 from magento-dragons/MAGETWO-59950
Fixed issues: - MAGETWO-59950: Configurable product option price is displayed incorrectly per website - for 2.0.x - MAGETWO-59415: [Backport] - As low as price for configurable product is shown for disabled simple options - for 2.0.11 - MAGETWO-60187: [Backport] Non consistent save Product Stock Item via Web API and repository directly - 2.0 - MAGETWO-57056: [Backport] [GitHub] Configurable product disabling lowest price associated product still shows its price #4419 - for 2.0
- Loading branch information
Showing
29 changed files
with
1,145 additions
and
116 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
25 changes: 25 additions & 0 deletions
25
app/code/Magento/Catalog/Model/ResourceModel/Product/BaseSelectProcessorInterface.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,25 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Catalog\Model\ResourceModel\Product; | ||
|
||
use Magento\Framework\DB\Select; | ||
|
||
/** | ||
* Interface BaseSelectProcessorInterface | ||
*/ | ||
interface BaseSelectProcessorInterface | ||
{ | ||
/** | ||
* Product table alias | ||
*/ | ||
const PRODUCT_RELATION_ALIAS = 'link'; | ||
|
||
/** | ||
* @param Select $select | ||
* @return Select | ||
*/ | ||
public function process(Select $select); | ||
} |
49 changes: 49 additions & 0 deletions
49
app/code/Magento/Catalog/Model/ResourceModel/Product/CompositeBaseSelectProcessor.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,49 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Catalog\Model\ResourceModel\Product; | ||
|
||
use Magento\Framework\DB\Select; | ||
use Magento\Framework\Exception\InputException; | ||
|
||
/** | ||
* Class CompositeBaseSelectProcessor | ||
*/ | ||
class CompositeBaseSelectProcessor implements BaseSelectProcessorInterface | ||
{ | ||
/** | ||
* @var BaseSelectProcessorInterface[] | ||
*/ | ||
private $baseSelectProcessors; | ||
|
||
/** | ||
* @param BaseSelectProcessorInterface[] $baseSelectProcessors | ||
* @throws InputException | ||
*/ | ||
public function __construct( | ||
array $baseSelectProcessors | ||
) { | ||
foreach ($baseSelectProcessors as $baseSelectProcessor) { | ||
if (!$baseSelectProcessor instanceof BaseSelectProcessorInterface) { | ||
throw new InputException( | ||
__('Processor %1 doesn\'t implement BaseSelectProcessorInterface', get_class($baseSelectProcessor)) | ||
); | ||
} | ||
} | ||
$this->baseSelectProcessors = $baseSelectProcessors; | ||
} | ||
|
||
/** | ||
* @param Select $select | ||
* @return Select | ||
*/ | ||
public function process(Select $select) | ||
{ | ||
foreach ($this->baseSelectProcessors as $baseSelectProcessor) { | ||
$select = $baseSelectProcessor->process($select); | ||
} | ||
return $select; | ||
} | ||
} |
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.