if (is_numeric($products_id)) {
             $subtotal = $subtotal + $value['qty'] * $value['final_price'];
         }
     }
     if ($subtotal) {
         $percentage = str_replace("%", '', $price);
         if ($percentage) {
             $price = $subtotal / 100 * $percentage;
         }
     }
 } else {
     if (!strstr($price, "%")) {
         if (strstr($price, ",")) {
             $steps = explode(",", $price);
             // calculate total costs
             $subtotal = mslib_fe::getOrderTotalPrice($this->get['orders_id'], 1);
             $count = 0;
             foreach ($steps as $step) {
                 // the   value 200:15 means below 200 euro the shipping costs are 15 euro, above and equal 200 euro the shipping costs are 0 euro
                 $split = explode(":", $step);
                 if (is_numeric($split[0])) {
                     if ($count == 0) {
                         $price = $split[1];
                     }
                     if ($subtotal > $split[0]) {
                         $price = $split[1];
                         next();
                     }
                 }
                 $count++;
             }
Exemple #2
0
                $tmp .= '<th class="cell_order_status">' . $this->pi_getLL('status') . '</th>';
                if ($this->ms['MODULES']['ENABLE_REORDER_FEATURE_IN_ACCOUNT_ORDER_HISTORY']) {
                    $tmp .= '<th class="cell_action">&nbsp;</th>';
                }
                $tmp .= '</tr></thead><tbody>';
                $tr_type = 'even';
                foreach ($tmporders as $order) {
                    if (!$tr_type or $tr_type == 'even') {
                        $tr_type = 'odd';
                    } else {
                        $tr_type = 'even';
                    }
                    $tmp .= '<tr class="' . $tr_type . '">';
                    $tmp .= '<td align="right" nowrap class="cell_orders_id">
					<a href="' . mslib_fe::typolink('', 'tx_multishop_pi1[page_section]=order_details&tx_multishop_pi1[orders_id]=' . $order['orders_id']) . '">' . $order['orders_id'] . '</a></td>';
                    $tmp .= '<td align="right" nowrap class="cell_amount">' . mslib_fe::amount2Cents(mslib_fe::getOrderTotalPrice($order['orders_id'])) . '</td>';
                    $tmp .= '<td align="center" nowrap class="cell_date">' . strftime("%x", $order['crdate']) . '</td>';
                    if ($this->ms['MODULES']['ADMIN_INVOICE_MODULE']) {
                        $tmp .= '<td align="center" nowrap class="cell_invoice">
						';
                        $invoice = mslib_fe::getInvoice($order['orders_id'], 'orders_id');
                        if ($invoice['id']) {
                            $tmp .= '<a href="' . $this->FULL_HTTP_URL . mslib_fe::typolink($this->shop_pid . ',2002', 'tx_multishop_pi1[page_section]=download_invoice&tx_multishop_pi1[hash]=' . $invoice['hash']) . '" target="_blank" class="msfront_download_invoice" title="download invoice">' . $this->pi_getLL('download') . '</a>';
                        }
                        $tmp .= '
						</td>';
                    }
                    //		$tmp.='<td align="left" nowrap>'.$order['shipping_method_label'].'</td>';
                    //		$tmp.='<td align="left" nowrap>'.$order['payment_method_label'].'</td>';
                    $tmp .= '<td align="left" nowrap class="cell_order_status">' . $order['orders_status'] . '</td>';
                    if ($this->ms['MODULES']['ENABLE_REORDER_FEATURE_IN_ACCOUNT_ORDER_HISTORY']) {