Skip to content

Commit

Permalink
Merge pull request #48 from Matt75/fix/issue-28882
Browse files Browse the repository at this point in the history
Check if order is paid with module on displayOrderConfirmation
  • Loading branch information
kpodemski authored Jul 1, 2022
2 parents eae8d15 + 6e648eb commit 1695f17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ps_cashondelivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ public function hookPaymentOptions(array $params)
*/
public function hookDisplayOrderConfirmation(array $params)
{
if (empty($params['order'])) {
return '';
}

/** @var Order $order */
$order = (isset($params['objOrder'])) ? $params['objOrder'] : $params['order'];

if (!Validate::isLoadedObject($order) || $order->module !== $this->name) {
return '';
}

$this->context->smarty->assign([
'shop_name' => $this->context->shop->name,
'total' => $this->context->getCurrentLocale()->formatPrice($params['order']->getOrdersTotalPaid(), (new Currency($params['order']->id_currency))->iso_code),
Expand Down

0 comments on commit 1695f17

Please sign in to comment.