Skip to content

Commit

Permalink
Merge pull request magento#1345 from giuseppemorelli/2.3-develop
Browse files Browse the repository at this point in the history
MSI-666: when duplicate a product set as disabled
  • Loading branch information
maghamed authored Jun 10, 2018
2 parents 235967f + 0a46c73 commit a3d75c4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Magento\InventoryCatalogAdminUi\Plugin\Catalog;

use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\Attribute\Source\Status;
use Magento\Catalog\Model\Product\Copier;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\Api\SearchCriteriaBuilderFactory;
Expand Down Expand Up @@ -63,6 +64,8 @@ public function afterCopy(
Product $product
) {
$this->copySourceItems($product->getSku(), $result->getSku());
$result->setStatus(Status::STATUS_DISABLED);

return $result;
}

Expand Down

0 comments on commit a3d75c4

Please sign in to comment.