예제 #1
0
 public function setTaxes()
 {
     $tax = CI::Tax()->getTaxes();
     //remove any existing tax charges
     $this->removeItemsOfType('tax');
     if ($tax > 0) {
         $item = (object) ['product_id' => 0, 'shippable' => 0, 'taxable' => 0, 'track_stock' => 0, 'fixed_quantity' => 1, 'type' => 'tax', 'name' => lang('taxes'), 'total_price' => $tax];
         $this->insertItem(['product' => $item]);
     }
 }