From a3e286632418e288f2e424cf422ff75c6892cb07 Mon Sep 17 00:00:00 2001 From: Alexander Veselov Date: Tue, 24 Dec 2024 12:22:57 +0200 Subject: [PATCH] ACP-4316 Use abstract product as identifier for external reviews. (#11210) ACP-4316 Use abstract product as identifier for external reviews. --- src/Spryker/Shared/Oms/Transfer/oms.transfer.xml | 2 ++ .../OrderStatusChanged/OrderStatusChangedMessageSender.php | 1 + tests/SprykerTest/Zed/Oms/Business/OmsFacadeTest.php | 1 + 3 files changed, 4 insertions(+) diff --git a/src/Spryker/Shared/Oms/Transfer/oms.transfer.xml b/src/Spryker/Shared/Oms/Transfer/oms.transfer.xml index c51aa46d..958cec7c 100644 --- a/src/Spryker/Shared/Oms/Transfer/oms.transfer.xml +++ b/src/Spryker/Shared/Oms/Transfer/oms.transfer.xml @@ -106,6 +106,7 @@ + @@ -229,6 +230,7 @@ + diff --git a/src/Spryker/Zed/Oms/Business/OrderStatusChanged/OrderStatusChangedMessageSender.php b/src/Spryker/Zed/Oms/Business/OrderStatusChanged/OrderStatusChangedMessageSender.php index f289abc8..2112b432 100644 --- a/src/Spryker/Zed/Oms/Business/OrderStatusChanged/OrderStatusChangedMessageSender.php +++ b/src/Spryker/Zed/Oms/Business/OrderStatusChanged/OrderStatusChangedMessageSender.php @@ -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()); diff --git a/tests/SprykerTest/Zed/Oms/Business/OmsFacadeTest.php b/tests/SprykerTest/Zed/Oms/Business/OmsFacadeTest.php index 4eb2bf4e..a35b6d13 100644 --- a/tests/SprykerTest/Zed/Oms/Business/OmsFacadeTest.php +++ b/tests/SprykerTest/Zed/Oms/Business/OmsFacadeTest.php @@ -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());