-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CC-33281 Introduced merchant commission item collector rules (#10984)
CC-33281 Commissions condition rules (category, product, price, merchant)
- Loading branch information
1 parent
28745ee
commit a398be4
Showing
11 changed files
with
470 additions
and
26 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
35 changes: 35 additions & 0 deletions
35
src/Spryker/Zed/Product/Persistence/Mapper/ProductAttributeKeyMapper.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,35 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace Spryker\Zed\Product\Persistence\Mapper; | ||
|
||
use Generated\Shared\Transfer\ProductAttributeKeyCollectionTransfer; | ||
use Generated\Shared\Transfer\ProductAttributeKeyTransfer; | ||
use Propel\Runtime\Collection\Collection; | ||
|
||
class ProductAttributeKeyMapper | ||
{ | ||
/** | ||
* @param \Propel\Runtime\Collection\Collection<\Orm\Zed\Product\Persistence\SpyProductAttributeKey> $productAttributeKeyEntities | ||
* @param \Generated\Shared\Transfer\ProductAttributeKeyCollectionTransfer $productAttributeKeyCollectionTransfer | ||
* | ||
* @return \Generated\Shared\Transfer\ProductAttributeKeyCollectionTransfer | ||
*/ | ||
public function mapProductAttributeKeyEntitiesToProductAttributeKeyCollection( | ||
Collection $productAttributeKeyEntities, | ||
ProductAttributeKeyCollectionTransfer $productAttributeKeyCollectionTransfer | ||
): ProductAttributeKeyCollectionTransfer { | ||
foreach ($productAttributeKeyEntities as $productAttributeKeyEntity) { | ||
$productAttributeKeyTransfer = (new ProductAttributeKeyTransfer()) | ||
->fromArray($productAttributeKeyEntity->toArray(), true); | ||
|
||
$productAttributeKeyCollectionTransfer->addProductAttributeKey($productAttributeKeyTransfer); | ||
} | ||
|
||
return $productAttributeKeyCollectionTransfer; | ||
} | ||
} |
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.