本文整理匯總了PHP中mslib_fe::getShippingMethod方法的典型用法代碼示例。如果您正苦於以下問題:PHP mslib_fe::getShippingMethod方法的具體用法?PHP mslib_fe::getShippingMethod怎麽用?PHP mslib_fe::getShippingMethod使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mslib_fe
的用法示例。
在下文中一共展示了mslib_fe::getShippingMethod方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unserialize
$tmpcontent .= '<td> </td>';
$tmpcontent .= '<td> </td>';
$tmpcontent .= '<td> </td>';
$tmpcontent .= '</tr>';
if (!isset($this->get['edit_product'])) {
$tmpcontent .= '<tr><td colspan="' . $colspan . '" style="text-align:left;"><a href="#" id="button_manual_new_product" class="btn btn-success">' . $this->pi_getLL('add_manual_product', 'ADD ITEM') . '</a></td></tr>';
}
} else {
$colspan = 7;
}
// $tmpcontent.='<tr><td colspan="'.$colspan.'"><hr class="hr"></td></tr>';
$orders_tax_data = unserialize($orders['orders_tax_data']);
$tmpcontent .= '<tr><td align="right" colspan="' . $colspan . '" class="">';
if ($this->ms['MODULES']['ORDER_EDIT'] and !$orders['is_locked']) {
$payment_method = mslib_fe::getPaymentMethod($orders['payment_method'], 'p.code');
$shipping_method = mslib_fe::getShippingMethod($orders['shipping_method'], 's.code');
if ($this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) {
$shipping_costs = mslib_fe::currency() . ' <input type="text" id="display_shipping_method_cost" value="' . round($orders['shipping_method_costs'] + $orders_tax_data['shipping_tax'], 4) . '" class="align_right" style="width:60px">
<input name="tx_multishop_pi1[shipping_method_costs]" type="hidden" value="' . $orders['shipping_method_costs'] . '">
<input type="hidden" id="shipping_method_tax_id" value="' . $shipping_method['tax_id'] . '" class="align_right" style="width:60px">';
$payment_costs = mslib_fe::currency() . ' <input type="text" id="display_payment_method_cost" value="' . round($orders['payment_method_costs'] + $orders_tax_data['payment_tax'], 4) . '" class="align_right" style="width:60px">
<input name="tx_multishop_pi1[payment_method_costs]" type="hidden" value="' . $orders['payment_method_costs'] . '">
<input type="hidden" id="payment_method_tax_id" value="' . $payment_method['tax_id'] . '" class="align_right" style="width:60px">
';
} else {
$shipping_costs = '<input name="tx_multishop_pi1[shipping_method_costs]" type="text" value="' . round($orders['shipping_method_costs'], 4) . '" class="align_right" style="width:60px">';
$payment_costs = '<input name="tx_multishop_pi1[payment_method_costs]" type="text" value="' . round($orders['payment_method_costs'], 4) . '" class="align_right" style="width:60px">';
}
} else {
if ($this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) {
$shipping_costs = mslib_fe::amount2Cents($orders['shipping_method_costs'] + $orders_tax_data['shipping_tax'], 0);
示例2: array
}
if (count($mapped_shipping_methods)) {
$available_sid = array();
foreach ($mapped_shipping_methods as $shipping_method_name => $mapped_shipping_method) {
$available_sid[] = $mapped_shipping_method['id'];
}
}
//
if (count($available_sid) > 0) {
//if (!$this->ms['MODULES']['PRODUCT_EDIT_METHOD_FILTER']) {
if (!$this->post['tx_multishop_pi1']['sid'] or !in_array($this->post['tx_multishop_pi1']['sid'], $available_sid)) {
// if the posted shipping id is not in the available shipping method array then select the first valid shipping method
$this->post['tx_multishop_pi1']['sid'] = $available_sid[0];
}
//}
$shipping_method = mslib_fe::getShippingMethod($this->post['tx_multishop_pi1']['sid'], 's.id', $countries_id, true);
$shipping_method_code = $shipping_method['code'];
if (strlen($shipping_method['name']) > 1) {
$char = substr($shipping_method['name'], 1, 1);
if ($char == mslib_befe::strtolower($char)) {
$shipping_method['name'] = $shipping_method['name'];
}
} else {
$shipping_method['name'] = $shipping_method['name'];
}
$shipping_method_label = $shipping_method['name'];
// shipping
$price = '';
$priceArray = mslib_fe::getShippingCosts($countries_id, $this->post['tx_multishop_pi1']['sid']);
if ($this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) {
$data['shipping_cost'] = '';
示例3: setShippingMethod
function setShippingMethod($shipping_method)
{
if (!$shipping_method) {
return 0;
}
if (isset($this->cart['user']['delivery_countries_id']) && !empty($this->cart['user']['delivery_countries_id'])) {
$priceArray = mslib_fe::getShippingCosts($this->cart['user']['delivery_countries_id'], $shipping_method);
} else {
$priceArray = mslib_fe::getShippingCosts($this->cart['user']['countries_id'], $shipping_method);
}
$price = $priceArray['shipping_costs'];
if ($price) {
$this->cart['user']['shipping_method_costs'] = $price;
} else {
$this->cart['user']['shipping_method_costs'] = 0;
}
if (isset($this->cart['user']['delivery_countries_id']) && !empty($this->cart['user']['delivery_countries_id'])) {
$shipping_method = mslib_fe::getShippingMethod($shipping_method, 's.id', $this->cart['user']['delivery_countries_id']);
} else {
$shipping_method = mslib_fe::getShippingMethod($shipping_method, 's.id', $this->cart['user']['countries_id']);
}
if ($shipping_method['tax_id'] && $this->cart['user']['shipping_method_costs']) {
$this->cart['user']['shipping_total_tax_rate'] = $shipping_method['tax_rate'];
if ($shipping_method['country_tax_rate']) {
$this->cart['user']['shipping_country_tax_rate'] = $shipping_method['country_tax_rate'];
$this->cart['user']['shipping_country_tax'] = mslib_fe::taxDecimalCrop($this->cart['user']['shipping_method_costs'] * $shipping_method['country_tax_rate']);
} else {
$this->cart['user']['shipping_country_tax_rate'] = 0;
$this->cart['user']['shipping_country_tax'] = 0;
}
if ($shipping_method['region_tax_rate']) {
$this->cart['user']['shipping_region_tax_rate'] = $shipping_method['region_tax_rate'];
$this->cart['user']['shipping_region_tax'] = mslib_fe::taxDecimalCrop($this->cart['user']['shipping_method_costs'] * $shipping_method['region_tax_rate']);
} else {
$this->cart['user']['shipping_region_tax_rate'] = 0;
$this->cart['user']['shipping_region_tax'] = 0;
}
if ($this->cart['user']['shipping_region_tax'] && $this->cart['user']['shipping_country_tax']) {
$this->cart['user']['shipping_tax'] = $this->cart['user']['shipping_country_tax'] + $this->cart['user']['shipping_region_tax'];
} else {
$this->cart['user']['shipping_tax'] = mslib_fe::taxDecimalCrop($this->cart['user']['shipping_method_costs'] * $shipping_method['tax_rate']);
}
} else {
$this->cart['user']['shipping_tax'] = 0;
$this->cart['user']['shipping_country_tax'] = 0;
$this->cart['user']['shipping_region_tax'] = 0;
$this->cart['user']['shipping_total_tax_rate'] = 0;
$this->cart['user']['shipping_country_tax_rate'] = 0;
$this->cart['user']['shipping_region_tax_rate'] = 0;
}
$this->cart['user']['shipping_method'] = $shipping_method['code'];
$this->cart['user']['shipping_method_label'] = $shipping_method['name'];
// hook to rewrite the whole methods
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.tx_mslib_cart.php']['setShippingMethodPreSaveHook'])) {
$params = array('cart_user' => &$this->cart['user']);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.tx_mslib_cart.php']['setShippingMethodPreSaveHook'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
tx_mslib_cart::storeCart($this->cart);
}
示例4: foreach
';
}
if (count($shipping_methods)) {
$content .= '
<div id="multishopShippingMethodWrapper">
<div class="main-heading"><h2>' . $this->pi_getLL('choose_shipping_method') . '</h2></div>
<ul id="multishopShippingMethod" class="row">';
$count = 0;
$delivery_country = $cart['user']['country'];
if (isset($cart['user']['different_delivery_address']) && !empty($cart['user']['different_delivery_address']) && isset($cart['user']['delivery_country']) && !empty($cart['user']['delivery_country'])) {
$delivery_country = $cart['user']['delivery_country'];
}
$tmp_countries = mslib_fe::getCountryByName($delivery_country);
$countries_id = $tmp_countries['cn_iso_nr'];
foreach ($shipping_methods as $code => $item) {
$shipping_method = mslib_fe::getShippingMethod($item['id'], 's.id', $countries_id);
// custom hook that can be controlled by third-party plugin
$shipping_method_description = '';
if (!empty($item['description'])) {
$shipping_method_description = '<div class="description">' . $item['description'] . '</div>';
}
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/front_pages/includes/checkout/multistep/checkout_shipping_payment_method']['checkoutMultistepShippingMethodSelectionHook'])) {
$params = array('shipping_method' => &$shipping_method, 'item' => &$item, 'shipping_method_description' => &$shipping_method_description);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/front_pages/includes/checkout/multistep/checkout_shipping_payment_method']['checkoutMultistepShippingMethodSelectionHook'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
$count++;
// costs
$price_wrap = '';
$priceArray = mslib_fe::getShippingCosts($countries_id, $item['id']);
示例5: productFeedGeneratorGetShippingCosts
public function productFeedGeneratorGetShippingCosts($products, $countries_id, $shipping_method_id)
{
if (!is_array($products) && count($products)) {
return false;
}
if (!is_numeric($countries_id)) {
return false;
}
if (!is_numeric($shipping_method_id)) {
return false;
}
$str3 = $GLOBALS['TYPO3_DB']->SELECTquery('sm.shipping_costs_type, sm.handling_costs, c.price, c.override_shippingcosts, c.zone_id', 'tx_multishop_shipping_methods sm, tx_multishop_shipping_methods_costs c, tx_multishop_countries_to_zones c2z', 'sm.id=c.shipping_method_id and c.zone_id=c2z.zone_id and c.shipping_method_id=\'' . $shipping_method_id . '\' and (sm.page_uid=0 or sm.page_uid=\'' . $this->shop_pid . '\') and c2z.cn_iso_nr=\'' . $countries_id . '\'', '', '', '');
$qry3 = $GLOBALS['TYPO3_DB']->sql_query($str3);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry3)) {
$row3 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry3);
$shipping_method = mslib_fe::getShippingMethod($shipping_method_id, 's.id', $countries_id);
//hook to let other plugins further manipulate the settings
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['productFeedGeneratorGetShippingCosts'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['productFeedGeneratorGetShippingCosts'] as $funcRef) {
$params['row3'] =& $row3;
$params['shipping_method'] =& $shipping_method;
$params['countries_id'] =& $countries_id;
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
if ($row3['shipping_costs_type'] == 'weight') {
$total_weight = $products['products_weight'];
$steps = explode(",", $row3['price']);
$current_price = '';
foreach ($steps as $step) {
$cols = explode(":", $step);
if (isset($cols[1])) {
$current_price = $cols[1];
}
if ($total_weight <= $cols[0]) {
$current_price = $cols[1];
break;
}
}
$shipping_cost = $current_price;
$shipping_cost_method_box = $current_price;
} elseif ($row3['shipping_costs_type'] == 'quantity') {
$total_quantity = 1;
$steps = explode(",", $row3['price']);
$current_price = '';
foreach ($steps as $step) {
$cols = explode(":", $step);
if (isset($cols[1])) {
$current_price = $cols[1];
}
if ($total_quantity <= $cols[0]) {
$current_price = $cols[1];
break;
}
}
$shipping_cost = $current_price;
$shipping_cost_method_box = $current_price;
} else {
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['productFeedGeneratorGetShippingCostsCustomType'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['productFeedGeneratorGetShippingCostsCustomType'] as $funcRef) {
$params['products'] =& $products;
$params['row3'] =& $row3;
$params['countries_id'] =& $countries_id;
$params['shipping_method'] =& $shipping_method;
$params['shipping_method_id'] =& $shipping_method_id;
$params['shipping_cost'] =& $shipping_cost;
$params['shipping_cost_method_box'] =& $shipping_cost_method_box;
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
} else {
$shipping_cost = $row3['price'];
$shipping_cost_method_box = $row3['price'];
}
}
//
// calculate total costs
$subtotal = $products['final_price'];
if (strstr($subtotal, ",")) {
$subtotal = str_replace(',', '.', $subtotal);
}
//
if (!empty($row3['override_shippingcosts'])) {
$old_shipping_costs = $shipping_cost;
$shipping_cost = $row3['override_shippingcosts'];
// custom code to change the shipping costs based on cart amount
if (strstr($shipping_cost, ",") || strstr($shipping_cost, ":")) {
$steps = explode(",", $shipping_cost);
$count = 0;
if (is_array($steps) && count($steps)) {
foreach ($steps as $step) {
// example: 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
// example setting: 0:6.95,50:0
$split = explode(":", $step);
if (is_numeric($split[0])) {
if ($subtotal > $split[0] and isset($split[1])) {
$shipping_cost = $split[1];
$shipping_cost_method_box = $split[1];
continue;
} else {
$shipping_cost = $old_shipping_costs;
//.........這裏部分代碼省略.........
示例6: repairOrder
function repairOrder($orders_id)
{
if (is_numeric($orders_id)) {
$this->conf['order_id'] = (int) $orders_id;
$tax_separation = array();
$sql = "select orders_id, orders_tax_data, payment_method_costs, shipping_method_costs, discount, shipping_method, payment_method, billing_region, billing_country, billing_vat_id from tx_multishop_orders where orders_id='" . $orders_id . "' order by orders_id asc";
$qry = $GLOBALS['TYPO3_DB']->sql_query($sql);
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) {
$sub_total_tax = 0;
$sub_total = 0;
$sub_total_excluding_vat = 0;
$shipping_tax = 0;
$payment_tax = 0;
$grand_total = 0;
$order_tax_data['shipping_tax'] = '0';
$order_tax_data['shipping_country_tax'] = '0';
$order_tax_data['shipping_region_tax'] = '0';
$order_tax_data['shipping_total_tax_rate'] = '0';
$order_tax_data['shipping_country_tax_rate'] = '0';
$order_tax_data['shipping_region_tax_rate'] = '0';
$order_tax_data['payment_tax'] = '0';
$order_tax_data['payment_country_tax'] = '0';
$order_tax_data['payment_region_tax'] = '0';
$order_tax_data['payment_total_tax_rate'] = '0';
$order_tax_data['payment_country_tax_rate'] = '0';
$order_tax_data['payment_region_tax_rate'] = '0';
$order_tax_data['grand_total'] = '0';
$order_tax_data['total_orders_tax'] = '0';
// get shipping method by code
$this->tta_user_info['default']['country'] = $row['billing_country'];
$iso_customer = mslib_fe::getCountryByName($this->tta_user_info['default']['country']);
$iso_customer['country'] = $iso_customer['cn_short_en'];
// if store country is different from customer country and user provided valid VAT id, change VAT rate to zero
//$this->ms['MODULES']['DISABLE_VAT_RATE']=0;
if (!$this->ms['MODULES']['DISABLE_VAT_RATE'] && $this->ms['MODULES']['DISABLE_VAT_FOR_FOREIGN_CUSTOMERS_WITH_COMPANY_VAT_ID'] and $row['billing_vat_id']) {
if (strtolower($row['billing_country']) != strtolower($this->tta_shop_info['country'])) {
$this->ms['MODULES']['DISABLE_VAT_RATE'] = 1;
}
}
// get shipping tax rate
$shipping_method = mslib_fe::getShippingMethod($row['shipping_method'], 's.code', $iso_customer['cn_iso_nr']);
$tax_rate = mslib_fe::taxRuleSet($shipping_method['tax_id'], 0, $iso_customer['cn_iso_nr'], 0);
if (!$tax_rate['total_tax_rate']) {
$tax_rate['total_tax_rate'] = $this->ms['MODULES']['INCLUDE_VAT_OVER_METHOD_COSTS'];
}
if ($this->ms['MODULES']['DISABLE_VAT_RATE']) {
$tax_rate['total_tax_rate'] = 0;
}
$shipping_tax_rate = $tax_rate['total_tax_rate'] / 100;
// get payment tax rate
$payment_method = mslib_fe::getPaymentMethod($row['payment_method'], 'p.code', $iso_customer['cn_iso_nr']);
$tax_rate = mslib_fe::taxRuleSet($payment_method['tax_id'], 0, $iso_customer['cn_iso_nr'], 0);
if (!$tax_rate['total_tax_rate']) {
$tax_rate['total_tax_rate'] = $this->ms['MODULES']['INCLUDE_VAT_OVER_METHOD_COSTS'];
}
if ($this->ms['MODULES']['DISABLE_VAT_RATE']) {
$tax_rate['total_tax_rate'] = 0;
}
$payment_tax_rate = $tax_rate['total_tax_rate'] / 100;
if ($shipping_tax_rate > 0 or $payment_tax_rate > 0) {
// disable rounding to prevent cents short issue
$shipping_tax = $row['shipping_method_costs'] * $shipping_tax_rate;
$payment_tax = $row['payment_method_costs'] * $payment_tax_rate;
/*if (!$this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT'] || $this->ms['MODULES']['FORCE_CHECKOUT_SHOW_PRICES_INCLUDING_VAT']) {
$shipping_tax=round($row['shipping_method_costs']*$shipping_tax_rate, 2);
$payment_tax=round($row['payment_method_costs']*$payment_tax_rate, 2);
} else {
$shipping_tax=$row['shipping_method_costs']*$shipping_tax_rate;
$payment_tax=$row['payment_method_costs']*$payment_tax_rate;
}*/
$order_tax_data['shipping_total_tax_rate'] = (string) number_format($shipping_tax_rate, 2, '.', ',');
$order_tax_data['payment_total_tax_rate'] = (string) number_format($payment_tax_rate, 2, '.', ',');
$order_tax_data['shipping_tax'] = (string) $shipping_tax;
$order_tax_data['payment_tax'] = (string) $payment_tax;
//$total_tax+=$shipping_tax+$payment_tax;
//$grand_total+=(($row['shipping_method_costs']+$row['payment_method_costs'])+($shipping_tax+$payment_tax));
} else {
//$grand_total+=($row['shipping_method_costs']+$row['payment_method_costs']);
}
$tax_separation[$shipping_tax_rate * 100]['shipping_tax'] += $shipping_tax;
$tax_separation[$payment_tax_rate * 100]['payment_tax'] += $payment_tax;
$tax_separation[$shipping_tax_rate * 100]['shipping_costs'] = $row['shipping_method_costs'];
$tax_separation[$payment_tax_rate * 100]['payment_costs'] = $row['payment_method_costs'];
//
$product_tax_data['country_tax_rate'] = '0';
$product_tax_data['region_tax_rate'] = '0';
$product_tax_data['total_tax_rate'] = '0';
$product_tax_data['country_tax'] = '0';
$product_tax_data['region_tax'] = '0';
$product_tax_data['total_tax'] = '0';
$product_tax_data['total_attributes_tax'] = '0';
$sql_prod = "select * from tx_multishop_orders_products where orders_id = " . $row['orders_id'];
$qry_prod = $GLOBALS['TYPO3_DB']->sql_query($sql_prod);
while ($row_prod = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_prod)) {
$tax_rate = $row_prod['products_tax'] / 100;
$product_tax = unserialize($row_prod['products_tax_data']);
// attributes tax
$sql_attr = "select * from tx_multishop_orders_products_attributes where orders_products_id = " . $row_prod['orders_products_id'] . " and orders_id = " . $row_prod['orders_id'];
$qry_attr = $GLOBALS['TYPO3_DB']->sql_query($sql_attr);
$attributes_tax = 0;
//.........這裏部分代碼省略.........
示例7: htmlspecialchars
<div class="radio radio-success radio-inline input_label_wrapper"><input type="radio" name="enable_on_default" value="0" id="enable_on_default_no" /><label for="enable_on_default_no">' . $this->pi_getLL('no') . '</label></div>
</div>
</div>
<div class="form-group">
<div class="col-md-10 col-md-offset-2">
<input name="shipping_method_code" type="hidden" value="' . htmlspecialchars($this->get['shipping_method_code']) . '" />
<input name="sub" type="hidden" value="add_shipping_method" />
<button name="Submit" class="btn btn-success" type="submit" value=""><i class="fa fa-save"></i> ' . $this->pi_getLL('save') . '</button>
</div>
</div>
</form>';
$content .= mslib_fe::returnBoxedHTML($shipping_method['name'], $tmpcontent);
$tmpcontent = '';
}
} elseif ($this->get['edit']) {
$row = mslib_fe::getShippingMethod($this->get['shipping_method_id'], 's.id');
$str = "SELECT * from tx_multishop_shipping_methods_description where id='" . $row['id'] . "'";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
$lngproduct = array();
while (($tmprow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) != false) {
$lngproduct[$tmprow['language_id']] = $tmprow;
}
$psp = $shipping_methods[$row['provider']];
$inner_content = mslib_fe::parseShippingMethodEditForm($psp, unserialize($row['vars']), 1);
$tmpcontent .= '
<div class="panel panel-default">
<div class="panel-body">
<form id="add_payment_form" class="form-horizontal" action="' . mslib_fe::typolink($this->shop_pid . ',2003', '&tx_multishop_pi1[page_section]=' . $this->ms['page']) . '" method="post">
<input name="sub" type="hidden" value="update_shipping_method" />
<input name="shipping_method_id" type="hidden" value="' . $row['id'] . '" />';
foreach ($this->languages as $key => $language) {
示例8: array
$insertArray['status'] = 1;
$insertArray['provider'] = 'cod';
$insertArray = mslib_befe::rmNullValuedKeys($insertArray);
$query = $GLOBALS['TYPO3_DB']->INSERTquery('tx_multishop_shipping_methods', $insertArray);
$res = $GLOBALS['TYPO3_DB']->sql_query($query);
$id = $GLOBALS['TYPO3_DB']->sql_insert_id();
if ($id) {
$updateArray = array();
$updateArray['name'] = $record['shipping_method'];
$updateArray['description'] = '';
$updateArray['id'] = $id;
$updateArray['language_id'] = 0;
$updateArray = mslib_befe::rmNullValuedKeys($updateArray);
$query = $GLOBALS['TYPO3_DB']->INSERTquery('tx_multishop_shipping_methods_description', $updateArray);
$res = $GLOBALS['TYPO3_DB']->sql_query($query);
$shipping_method = mslib_fe::getShippingMethod($record['shipping_method'], 'd.name');
}
}
$row['shipping_method'] = $shipping_method['code'];
$row['shipping_method_label'] = $shipping_method['name'];
}
// $row['billing_name']=$record['last_modified'];
$row['crdate'] = strtotime($record['date_purchased']);
if ($record['shipping_cost']) {
// calculate price excluding vat
$record['shipping_cost'] = $record['shipping_cost'] / (100 + $this->ms['MODULES']['INCLUDE_VAT_OVER_METHOD_COSTS']) * 100;
$row['shipping_method_costs'] = $record['shipping_cost'];
}
if ($record['payment_cost']) {
// calculate price excluding vat
$record['payment_cost'] = $record['payment_cost'] / (100 + $this->ms['MODULES']['INCLUDE_VAT_OVER_METHOD_COSTS']) * 100;
示例9: unserialize
$tmpcontent .= '</tbody>';
}
}
}
//echo '<pre>';
//print_r($order_products_table);
//die();
// $tmpcontent.='<tr><td colspan="'.$colspan.'"><hr class="hr"></td></tr>';
$orders_tax_data = unserialize($orders['orders_tax_data']);
$tmpcontent .= '<tfoot><tr><td colspan="' . $colspan . '" class="order_total_data text-right">';
if ($this->ms['MODULES']['ORDER_EDIT'] and $settings['enable_edit_orders_details']) {
$iso_customer = mslib_fe::getCountryByName($orders['billing_country']);
$iso_customer['country'] = $iso_customer['cn_short_en'];
//
$payment_method = mslib_fe::getPaymentMethod($orders['payment_method'], 'p.code', $iso_customer['cn_iso_nr']);
$shipping_method = mslib_fe::getShippingMethod($orders['shipping_method'], 's.code', $iso_customer['cn_iso_nr']);
//
if ($iso_customer['cn_iso_nr'] > 0) {
$payment_tax_ruleset = mslib_fe::taxRuleSet($payment_method['tax_id'], 0, $iso_customer['cn_iso_nr'], 0);
$shipping_tax_ruleset = mslib_fe::taxRuleSet($shipping_method['tax_id'], 0, $iso_customer['cn_iso_nr'], 0);
if (!$payment_tax_ruleset) {
$payment_method['tax_id'] = 0;
}
if (!$shipping_tax_ruleset) {
$shipping_method['tax_id'] = 0;
}
}
if ($this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) {
$shipping_costs = '<div class="input-group pull-right" style="width:140px;">
<span class="input-group-addon">' . mslib_fe::currency() . '</span>
<input name="tx_multishop_pi1[shipping_method_costs]" id="shipping_method_costs" type="text" class="form-control text-right priceInputDisplay" value="' . number_format($orders['shipping_method_costs'] + $orders_tax_data['shipping_tax'], 4, $this->ms['MODULES']['CUSTOMER_CURRENCY_ARRAY']['cu_decimal_point'], '') . '" class="align_right" />