Example #1
0
 function getItemTax(&$items, $cust_info, $sid = 0)
 {
     $temp = array();
     foreach ($items as $i => $item) {
         if ($i < 0) {
             continue;
         }
         $temp[0] = $item;
         $tax = calc_price($temp, $cust_info, $sid);
         $items[$i]->partial_tax = $tax['value'];
     }
     return;
 }
Example #2
0
 function addFreeProduct($items, $customer_info, $sid)
 {
     global $database, $configs, $my;
     $tax = calc_price($items, $customer_info, $sid);
     $now = time();
     $non_taxed = $tax['total'];
     //$total;
     $total = $tax['taxed'];
     $currency = $tax['currency'];
     $licenses = $tax['licenses'];
     $taxa = $tax['value'];
     $shipping = $tax['shipping'];
     $orderid = $this->addOrder($items, $customer_info, $now, 'free', $sid);
     $this->addLicenses($items, $orderid, $now);
     $this->dispatchMail($orderid, $total, $licenses, $now, $items, $sid);
     emptyCart($sid);
     $_SESSION['in_trans'] = 1;
     $this->storeTransactionData($items, $orderid, $tax, $sid);
     $this->goToSuccessURL($sid);
     return;
 }