Skip to content

Commit

Permalink
ACP-4316 Use abstract product as identifier for external reviews. (#1…
Browse files Browse the repository at this point in the history
…1210)

ACP-4316 Use abstract product as identifier for external reviews.
  • Loading branch information
vol4onok authored Dec 24, 2024
1 parent 1e4ab83 commit a3e2866
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Spryker/Shared/Oms/Transfer/oms.transfer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<transfer name="Item">
<property name="name" type="string"/>
<property name="sku" type="string"/>
<property name="abstractSku" type="string"/>
<property name="quantity" type="int"/>
<property name="unitPrice" type="int"/>
<property name="idSalesOrderItem" type="int"/>
Expand Down Expand Up @@ -229,6 +230,7 @@

<transfer name="OrderItem">
<property name="productId" type="string"/>
<property name="abstractSku" type="string"/>
<property name="name" type="string"/>
<property name="imageUrl" type="string"/>
<property name="price" type="int"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ protected function createOrderStatusChangedTransfer(int $idSalesOrder): OrderSta
}
$orderItemTransfer = new OrderItemTransfer();
$orderItemTransfer->setProductId($orderItem->getSku());
$orderItemTransfer->setAbstractSku($orderItem->getAbstractSku());
$orderItemTransfer->setName($orderItem->getName());
$orderItemTransfer->setImageUrl($orderItem->getMetadata()->getImage());
$orderItemTransfer->setPrice($orderItem->getUnitPrice());
Expand Down
1 change: 1 addition & 0 deletions tests/SprykerTest/Zed/Oms/Business/OmsFacadeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ function (array $envelopes) use ($items): void {

foreach ($message->getOrderItems() as $k => $orderItem) {
$this->assertEquals($orderItem->getProductId(), $items[$k]->getSku());
$this->assertEquals($orderItem->getAbstractSku(), $items[$k]->getAbstractSku());
$this->assertEquals($orderItem->getName(), $items[$k]->getName());
$this->assertEquals($orderItem->getImageUrl(), $items[$k]->getMetaData()->getImage());
$this->assertEquals($orderItem->getPrice(), $items[$k]->getUnitPrice());
Expand Down

0 comments on commit a3e2866

Please sign in to comment.