Skip to content

Commit

Permalink
Alteração Cupom de descontos
Browse files Browse the repository at this point in the history
  • Loading branch information
luizwbr authored Dec 4, 2017
1 parent f5d8869 commit 60d321a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pagseguro_virtuemartbrasil.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,13 @@ function retornaHtmlPagamento( $order, $method, $redir ) {
$html .= '<input type="hidden" name="itemShippingCost1" value="0">';
}

// Cupom de Desconto
$desconto_pedido = $order["details"]['BT']->coupon_discount;

// desconto do produto
$html .= '<input type="hidden" name="extraAmount" value="'.number_format(round($desconto_pedido, 2),2,".","").'" />';
// Cupom de Desconto
if (!empty($order["details"]["BT"]->coupon_discount)) {
$desconto_pedido = $order["details"]['BT']->coupon_discount;
$html .= '<input type="hidden" name="extraAmount" value="'.number_format(round($desconto_pedido, 2),2,".","").'" />';
} else {
$html .= '<input type="hidden" name="extraAmount" value="" />';
}

$order_subtotal = $order['details']['BT']->order_subtotal;
if(!class_exists('VirtueMartModelCustomfields'))require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'customfields.php');
Expand Down

0 comments on commit 60d321a

Please sign in to comment.