Skip to content

Commit

Permalink
Merged in feature/35130_use_orderarticle_title (pull request #146)
Browse files Browse the repository at this point in the history
#35130 use orderarticle title as fallback it article of orderarticle was deleted

Approved-by: Bohdan Medvediev
  • Loading branch information
mbe1987 committed Nov 20, 2023
2 parents 2cda0d4 + 3bf3cb3 commit b0ed7a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/modules/mo/mo_dhl/Adapter/GKVShipmentBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,9 @@ protected function getArticleTitle(OrderArticle $orderArticle, array $receiverLa
break;
}
}

if (empty($title)) {
$title = $orderArticle->getArticle()->getFieldData('oxtitle');
}
$title = $title
?? $orderArticle->getArticle()->getFieldData('oxtitle')
?? $orderArticle->getFieldData('oxtitle');

return mb_substr($this->convertSpecialChars($title), 0, 50);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Api/GKV/GetManifestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public function testGetManifestForNextWeek()
$request = new GetManifestRequest($this->createVersion(), $manifestDate);
$response = $this->buildGKV()->getManifest($request);
$this->assertInstanceOf(GetManifestResponse::class, $response);
$this->assertEquals(2000, $response->getStatus()->getStatusCode());
$this->assertGreaterThan(0, $response->getStatus()->getStatusCode());
}
}

0 comments on commit b0ed7a6

Please sign in to comment.