public function discount($type = false) { if (!isset($this->amount->discount)) { $objDiscount = new Discount(false, $this->order->basket); $this->amount->discount = $objDiscount->amount(); $this->appliedDiscounts = $objDiscount->getApplied(); } return $type && isset($this->amount->discount[$type]) ? $this->amount->discount[$type] : $this->amount->discount; }
echo $item->qty; ?> </td> <td><?php echo format::dollar($item->total); ?> </td> </tr> <?php } ?> </table> <?php $discount = new Discount(false, $cart); $amount = $discount->amount(); ?> <table class="summary"> <tr> <td colspan="2"><strong>Subtotal:</strong></td> <td align="right"><?php echo format::dollar($cart->subtotal()); ?> </td> </tr> <tr> <td colspan="2"><strong>Discount:</strong></td> <td align="right"><?php echo format::dollar($amount['total']);