Skip to content

Commit

Permalink
Remove shipping cost if shipping is free
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Pieters committed May 2, 2017
1 parent c16fb4a commit c70f4e5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Model/Paymentmethod/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,15 @@ protected function doStartTransaction(Order $order, UrlInterface $url)
$shippingTax = $order->getShippingTaxAmount();
$shippingDescription = $order->getShippingDescription();

$arrProducts[] = array(
'id' => 'shipping',
'name' => $shippingDescription,
'price' => $shippingCost,
'qty' => 1,
'tax' => $shippingTax
);
if($shippingCost != 0) {
$arrProducts[] = array(
'id' => 'shipping',
'name' => $shippingDescription,
'price' => $shippingCost,
'qty' => 1,
'tax' => $shippingTax
);
}

// kortingen
$discount = $order->getDiscountAmount();
Expand Down

0 comments on commit c70f4e5

Please sign in to comment.