Skip to content

Commit

Permalink
Fixed "order.id not available" when basket value is 0.00
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Jul 3, 2019
1 parent c849da7 commit 40fa28e
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions client/html/src/Client/Html/Checkout/Standard/Process/Standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,26 +279,20 @@ public function process()
return;
}

$total = $basket->getPrice()->getValue() + $basket->getPrice()->getCosts();
$services = $basket->getService( \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT );

if( $services === [] || $total <= 0 && $this->isSubscription( $basket->getProducts() ) === false )
{
$orderCntl->save( $orderItem->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED ) );
}
elseif( ( $form = $this->processPayment( $basket, $orderItem ) ) !== null )
if( ( $form = $this->processPayment( $basket, $orderItem ) ) !== null )
{
$view->standardUrlNext = $form->getUrl();
$view->standardMethod = $form->getMethod();
$view->standardProcessParams = $form->getValues();
$view->standardUrlExternal = $form->getExternal();
$view->standardHtml = $form->getHtml();

return;
}

$view->standardUrlNext = $this->getUrlConfirm( $view, [], [] );
$view->standardMethod = 'POST';
else // no payment service available
{
$orderCntl->save( $orderItem->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED ) );
$view->standardUrlNext = $this->getUrlConfirm( $view, [], [] );
$view->standardMethod = 'POST';
}
}
catch( \Aimeos\Client\Html\Exception $e )
{
Expand Down

0 comments on commit 40fa28e

Please sign in to comment.