Skip to content

Commit

Permalink
Merge pull request #66 from logeecom/dev
Browse files Browse the repository at this point in the history
Release version 3.3.3
  • Loading branch information
mpramon authored Aug 27, 2021
2 parents 2f86301 + 15906c7 commit a636048
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [3.3.3](https://github.com/packlink-dev/ecommerce_module_core/compare/v3.3.2...v3.3.3) - 2021-08-26
**BREAKING CHANGES**
### Changed
- Updated order service to set order number as a shipment custom reference instead of order ID when creating a draft. Integrations need to set an order number in the `ShopOrderService::getOrderAndShippingData`.

## [3.3.2](https://github.com/packlink-dev/ecommerce_module_core/compare/v3.3.1...v3.3.2) - 2021-08-24
### Changed
- Reverted Shopware code review changes.
Expand Down
2 changes: 1 addition & 1 deletion src/BusinessLogic/Order/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private function convertOrderToDraftDto(Order $order)
$draft->contentValue = $order->getTotalPrice();
$draft->priority = $order->isHighPriority();
$draft->source = $this->configuration->getDraftSource();
$draft->shipmentCustomReference = $order->getId();
$draft->shipmentCustomReference = $order->getOrderNumber();
$this->addPackages($order, $draft);

$methodId = $order->getShippingMethodId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public function getOrder($orderId, $shippingMethodId = 0, $destinationCountry =
if (!isset(static::$orders[$orderId])) {
$order = new Order();
$order->setId($orderId);
$order->setOrderNumber('testOrderNumber');
$order->setShipment(new Shipment());
$order->setShippingMethodId($shippingMethodId);
$order->setShippingAddress(new Address());
Expand Down
2 changes: 1 addition & 1 deletion tests/BusinessLogic/Order/OrderServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function testPrepareDraftWrongDestinationCountry()
public function testPrepareDraftShippingReference()
{
$draft = $this->orderService->prepareDraft('test');
self::assertEquals($draft->shipmentCustomReference, 'test');
self::assertEquals($draft->shipmentCustomReference, 'testOrderNumber');
}

/**
Expand Down

0 comments on commit a636048

Please sign in to comment.