本文整理汇总了PHP中AgileSellerManager::get_order_id_from_maildata方法的典型用法代码示例。如果您正苦于以下问题:PHP AgileSellerManager::get_order_id_from_maildata方法的具体用法?PHP AgileSellerManager::get_order_id_from_maildata怎么用?PHP AgileSellerManager::get_order_id_from_maildata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AgileSellerManager
的用法示例。
在下文中一共展示了AgileSellerManager::get_order_id_from_maildata方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: adjust_shipping_cost_carriers
public static function adjust_shipping_cost_carriers($templateVars)
{
${"GLOBALS"}["rsvgrfy"] = "id_order";
${"GLOBALS"}["uqmveikd"] = "id_carrier";
$tgbfve = "order";
$gwgugvtfd = "id_order";
$dxengxru = "id_order";
${"GLOBALS"}["dzkhdg"] = "order_total_wt";
if (_PS_VERSION_ < "1.5") {
return;
}
if (!Module::isInstalled("agilesellershipping")) {
return;
}
${"GLOBALS"}["dneigggkp"] = "product_index";
${$gwgugvtfd} = AgileSellerManager::get_order_id_from_maildata(${${"GLOBALS"}["mmzbulzurq"]});
${"GLOBALS"}["ydxwvb"] = "order";
$wlepsmg = "id_seller";
$tcutsk = "id_zone";
if (!intval(${${"GLOBALS"}["rsvgrfy"]})) {
return;
}
$suvwlcyd = "carrier_amounts";
${"GLOBALS"}["fyjbspswuj"] = "order_total_wt";
include_once _PS_ROOT_DIR_ . "/modules/agilesellershipping/agilesellershipping.php";
${${"GLOBALS"}["ydxwvb"]} = new Order(${$dxengxru});
if (!Validate::isLoadedObject(${$tgbfve})) {
return;
}
Db::getInstance()->Execute("DELETE FROM " . _DB_PREFIX_ . "order_carrier WHERE id_order=" . ${${"GLOBALS"}["obhowuo"]});
${"GLOBALS"}["pzrkxrjqyhxn"] = "order_total_wt";
${"GLOBALS"}["gcvlgjuvtseg"] = "id_seller";
$nbkresgqyb = "shipping_total_wt";
${${"GLOBALS"}["wcclsd"]} = new Cart($order->id_cart);
${$tcutsk} = SellerShipping::getZoneID($theCart->id_address_delivery, $theCart->id_customer);
${${"GLOBALS"}["jthbfhfsfrjl"]} = $theCart->getProducts();
${"GLOBALS"}["mvdzjcztfm"] = "sql";
${${"GLOBALS"}["djvdqshlk"]} = array();
foreach (${${"GLOBALS"}["jthbfhfsfrjl"]} as ${${"GLOBALS"}["eadhxox"]}) {
${"GLOBALS"}["lugbbmr"] = "p";
$zcrxlfn = "p";
${${"GLOBALS"}["djvdqshlk"]}[${$zcrxlfn}["id_product"]] = ${${"GLOBALS"}["lugbbmr"]};
}
${"GLOBALS"}["aglfuxpi"] = "shipping_total_nt";
${${"GLOBALS"}["tpubctvvlkrd"]} = AgileSellerManager::getObjectOwnerID("order", $order->id);
$wzfqls = "shipping_total_wt";
if (${${"GLOBALS"}["tpubctvvlkrd"]} <= 0) {
${$wlepsmg} = 0;
}
${${"GLOBALS"}["emgjxyhduf"]} = SellerShipping::get_carrier_products($order->id_cart, ${${"GLOBALS"}["gcvlgjuvtseg"]});
${$suvwlcyd} = $theCart->get_carrier_product_amount(${${"GLOBALS"}["emgjxyhduf"]}, ${${"GLOBALS"}["jthbfhfsfrjl"]}, ${${"GLOBALS"}["dneigggkp"]});
foreach (${${"GLOBALS"}["mldgbwp"]} as ${${"GLOBALS"}["uqmveikd"]} => ${${"GLOBALS"}["hfpmgjto"]}) {
$flrgophjh = "product_index";
$ljiloflygxch = "id_carrier";
$dypipsm = "carrier_cost_nt";
${${"GLOBALS"}["bgswfcfhve"]} = new Carrier(${${"GLOBALS"}["dnlppobwfek"]});
${${"GLOBALS"}["vpnfqbpwjyd"]} = $theCart->getTotalWeightOfCarrier(${$ljiloflygxch}, ${${"GLOBALS"}["tpubctvvlkrd"]});
if ($theCart->is_all_virtual(${${"GLOBALS"}["dnlppobwfek"]}, ${${"GLOBALS"}["emgjxyhduf"]}, ${$flrgophjh})) {
${"GLOBALS"}["qgfxjxfxipkt"] = "carrier_cost_wt";
${${"GLOBALS"}["qgfxjxfxipkt"]} = 0;
${${"GLOBALS"}["irabovrt"]} = 0;
} else {
$ydkanqko = "carrier_cost_wt";
${"GLOBALS"}["ecuqubtwgrc"] = "id_zone";
${"GLOBALS"}["oykcycyb"] = "carrier_weight";
${"GLOBALS"}["hkmexho"] = "id_seller";
${"GLOBALS"}["cvmlvwxwjvgj"] = "id_carrier";
${$ydkanqko} = $theCart->getOrderShippingCostPerSellerCarrier(${${"GLOBALS"}["tpubctvvlkrd"]}, true, ${${"GLOBALS"}["ecuqubtwgrc"]}, ${${"GLOBALS"}["dnlppobwfek"]}, ${${"GLOBALS"}["hfpmgjto"]}, ${${"GLOBALS"}["oykcycyb"]});
${${"GLOBALS"}["irabovrt"]} = $theCart->getOrderShippingCostPerSellerCarrier(${${"GLOBALS"}["hkmexho"]}, true, ${${"GLOBALS"}["qsslqvz"]}, ${${"GLOBALS"}["cvmlvwxwjvgj"]}, ${${"GLOBALS"}["hfpmgjto"]}, ${${"GLOBALS"}["vpnfqbpwjyd"]});
}
${${"GLOBALS"}["iikyewhoyyrc"]} = "INSERT INTO " . _DB_PREFIX_ . "order_carrier (id_order,id_carrier,id_order_invoice,weight,shipping_cost_tax_excl,shipping_cost_tax_incl,tracking_number,date_add) VALUES\n\t\t\t\t(" . $order->id . "," . ${${"GLOBALS"}["dnlppobwfek"]} . "," . $order->invoice_number . "," . ${${"GLOBALS"}["vpnfqbpwjyd"]} . "," . ${$dypipsm} . "," . ${${"GLOBALS"}["ewgtnsmmqyj"]} . ",'','" . date("Y-m-d H:i:s") . "')\n\t\t\t";
Db::getInstance()->Execute(${${"GLOBALS"}["iikyewhoyyrc"]});
${${"GLOBALS"}["iikyewhoyyrc"]} = "UPDATE " . _DB_PREFIX_ . "orders SET id_carrier=" . (int) ${${"GLOBALS"}["dnlppobwfek"]} . " WHERE id_order=" . (int) ${${"GLOBALS"}["obhowuo"]};
Db::getInstance()->Execute(${${"GLOBALS"}["iikyewhoyyrc"]});
}
${${"GLOBALS"}["pzrkxrjqyhxn"]} = $theCart->getOrderTotal(true);
$ufgilbnukk = "shipping_total_wt";
${${"GLOBALS"}["lnhtgkmbcg"]} = $theCart->getOrderTotal(false);
${$ufgilbnukk} = $theCart->getOrderTotal(true, Cart::ONLY_SHIPPING);
${${"GLOBALS"}["aglfuxpi"]} = $theCart->getOrderTotal(false, Cart::ONLY_SHIPPING);
${${"GLOBALS"}["mvdzjcztfm"]} = "UPDATE " . _DB_PREFIX_ . "orders SET total_shipping=" . ${$nbkresgqyb} . ",total_shipping_tax_incl=" . ${$wzfqls} . ",total_shipping_tax_excl=" . ${${"GLOBALS"}["cfkhmpyziwr"]} . ",total_paid=" . ${${"GLOBALS"}["fyjbspswuj"]} . ",total_paid_tax_excl=" . ${${"GLOBALS"}["lnhtgkmbcg"]} . ", total_paid_tax_incl=" . ${${"GLOBALS"}["dzkhdg"]} . " WHERE id_order=" . ${${"GLOBALS"}["obhowuo"]};
Db::getInstance()->Execute(${${"GLOBALS"}["iikyewhoyyrc"]});
if (version_compare(_PS_VERSION_, "1.5", ">=")) {
$grmjqiqutks = "order_total_wt";
${${"GLOBALS"}["iikyewhoyyrc"]} = "UPDATE " . _DB_PREFIX_ . "order_invoice SET total_shipping_tax_incl=" . ${${"GLOBALS"}["ruawqwvhgo"]} . ",total_shipping_tax_excl=" . ${${"GLOBALS"}["cfkhmpyziwr"]} . ",total_paid_tax_excl=" . ${${"GLOBALS"}["lnhtgkmbcg"]} . ", total_paid_tax_incl=" . ${$grmjqiqutks} . " WHERE id_order=" . ${${"GLOBALS"}["obhowuo"]};
Db::getInstance()->Execute(${${"GLOBALS"}["iikyewhoyyrc"]});
}
}
示例2: sendNewOrderMail
public static function sendNewOrderMail($id_lang, $templateVars, $from, $fromName, $fileAttachment, $modeSMTP, $die, $id_shop, $bcc)
{
$byxvdtvuuvy = "configuration";
$qwhvetibmws = "id_order";
$lmrtltqvk = "iso";
${"GLOBALS"}["jzrtozsx"] = "id_order";
${"GLOBALS"}["lzhdsgzbm"] = "message";
${$byxvdtvuuvy} = Configuration::getMultiple(array("PS_SHOP_EMAIL", "PS_MAIL_METHOD", "PS_MAIL_SERVER", "PS_MAIL_USER", "PS_MAIL_PASSWD", "PS_SHOP_NAME"));
${$qwhvetibmws} = AgileSellerManager::get_order_id_from_maildata(${${"GLOBALS"}["tkxwrio"]});
${"GLOBALS"}["yvoigw"] = "templateVars";
${${"GLOBALS"}["qcrytsf"]} = AgileSellerManager::getObjectOwnerID("order", ${${"GLOBALS"}["vjiosfsuqb"]});
${"GLOBALS"}["fvqincrdtqy"] = "message";
$nrrjitw = "order";
${$nrrjitw} = new Order(${${"GLOBALS"}["jzrtozsx"]});
${${"GLOBALS"}["lzhdsgzbm"]} = $order->getFirstMessage();
if (!${${"GLOBALS"}["fvqincrdtqy"]} or empty(${${"GLOBALS"}["wghoseimj"]})) {
${"GLOBALS"}["tdvrckvqupkd"] = "message";
${${"GLOBALS"}["tdvrckvqupkd"]} = "";
}
${"GLOBALS"}["uwjlzelym"] = "id_lang";
${${"GLOBALS"}["zwjjeoz"]} = new Employee(${${"GLOBALS"}["qcrytsf"]});
${${"GLOBALS"}["tkxwrio"]} = array_merge(${${"GLOBALS"}["yvoigw"]}, array("{message}" => ${${"GLOBALS"}["wghoseimj"]}, "{seller-firstname}" => $seller->firstname, "{seller-lastname}" => $seller->lastname));
${${"GLOBALS"}["gkzsuno"]} = Language::getIsoById((int) ${${"GLOBALS"}["uwjlzelym"]});
if (file_exists(dirname(__FILE__) . "/mails/" . ${${"GLOBALS"}["gkzsuno"]} . "/new_order.txt") and file_exists(dirname(__FILE__) . "/mails/" . ${$lmrtltqvk} . "/new_order.html") and $seller->email) {
${"GLOBALS"}["lhvjbxdd"] = "id_lang";
${"GLOBALS"}["ycoynke"] = "bcc";
$wxcuyvc = "fileAttachment";
AgileMultipleSellerMailer::SendTranslateSubject(${${"GLOBALS"}["lhvjbxdd"]}, "new_order", ${${"GLOBALS"}["tkxwrio"]}, $seller->email, NULL, ${${"GLOBALS"}["hhrxtypttw"]}["PS_SHOP_EMAIL"], ${${"GLOBALS"}["hhrxtypttw"]}["PS_SHOP_NAME"], ${$wxcuyvc}, ${${"GLOBALS"}["oetnhgcwvc"]}, dirname(__FILE__) . "/mails/", ${${"GLOBALS"}["ugctepdpps"]}, ${${"GLOBALS"}["jjwltjsjv"]}, ${${"GLOBALS"}["ycoynke"]});
}
}
示例3: adjust_shipping_cost_carriers
public static function adjust_shipping_cost_carriers($templateVars)
{
$ivrxmwfnct = "order";
${"GLOBALS"}["spfxhjrkluz"] = "order_total_wt";
if (_PS_VERSION_ < "1.5") {
return;
}
$cfrqwgh = "id_order";
${"GLOBALS"}["bjhkjimsufxi"] = "products";
${"GLOBALS"}["uhmklgxgv"] = "order_total_wt";
$rhwyrsfcsx = "id_seller";
if (!Module::isInstalled("agilesellershipping")) {
return;
}
${${"GLOBALS"}["fcndxqdqabb"]} = AgileSellerManager::get_order_id_from_maildata(${${"GLOBALS"}["fqdwpgrnipa"]});
${"GLOBALS"}["nyrsjef"] = "order";
${"GLOBALS"}["vrczknnpt"] = "product_index";
$keeungc = "order_total_nt";
if (!intval(${${"GLOBALS"}["fcndxqdqabb"]})) {
return;
}
${"GLOBALS"}["efpofjnxhijp"] = "id_carrier";
include_once _PS_ROOT_DIR_ . "/modules/agilesellershipping/agilesellershipping.php";
$llkxyrek = "carrier_amounts";
$vkjohzkmxbf = "id_order";
${"GLOBALS"}["ddnccqakh"] = "id_zone";
${$ivrxmwfnct} = new Order(${${"GLOBALS"}["fcndxqdqabb"]});
if (!Validate::isLoadedObject(${${"GLOBALS"}["nyrsjef"]})) {
return;
}
${"GLOBALS"}["gqivke"] = "carrier_amounts";
$yknyuqjl = "carrier_products";
Db::getInstance()->Execute("DELETE FROM " . _DB_PREFIX_ . "order_carrier WHERE id_order=" . ${$cfrqwgh});
${"GLOBALS"}["vbsnsarjuto"] = "sql";
${"GLOBALS"}["bovvszku"] = "shipping_total_nt";
${"GLOBALS"}["opsfgfnunmdf"] = "products";
$wiljeowgz = "carrier_products";
${"GLOBALS"}["bxfiysg"] = "shipping_total_wt";
${${"GLOBALS"}["ccfxvpgoc"]} = new Cart($order->id_cart);
${${"GLOBALS"}["ddnccqakh"]} = SellerShipping::getZoneID($theCart->id_address_delivery, $theCart->id_customer);
${"GLOBALS"}["kgtufbdcpbn"] = "id_seller";
${"GLOBALS"}["dwnnnisf"] = "order_total_nt";
${${"GLOBALS"}["jrxrnmbebk"]} = $theCart->getProducts();
${${"GLOBALS"}["vrczknnpt"]} = array();
foreach (${${"GLOBALS"}["bjhkjimsufxi"]} as ${${"GLOBALS"}["ochlmxf"]}) {
$vkbxml = "product_index";
${"GLOBALS"}["mfnusbmszwde"] = "p";
${$vkbxml}[${${"GLOBALS"}["mfnusbmszwde"]}["id_product"]] = ${${"GLOBALS"}["ochlmxf"]};
}
${${"GLOBALS"}["kgtufbdcpbn"]} = AgileSellerManager::getObjectOwnerID("order", $order->id);
${"GLOBALS"}["ombwxqexym"] = "sql";
if (${${"GLOBALS"}["ghjbfbenq"]} <= 0) {
${$rhwyrsfcsx} = 0;
}
${$yknyuqjl} = SellerShipping::get_carrier_products($order->id_cart, ${${"GLOBALS"}["ghjbfbenq"]});
${$llkxyrek} = $theCart->get_carrier_product_amount(${$wiljeowgz}, ${${"GLOBALS"}["opsfgfnunmdf"]}, ${${"GLOBALS"}["eovprfdrx"]});
foreach (${${"GLOBALS"}["gqivke"]} as ${${"GLOBALS"}["efpofjnxhijp"]} => ${${"GLOBALS"}["eoqeliqv"]}) {
${"GLOBALS"}["cbuzddlfkz"] = "id_carrier";
${"GLOBALS"}["tucrngyuq"] = "sql";
${"GLOBALS"}["ntcgjisnc"] = "carrier_products";
${"GLOBALS"}["wktebbt"] = "carrier_cost_nt";
$gbppuyfugu = "carrier_weight";
$evupbbr = "id_seller";
${${"GLOBALS"}["nfrzezd"]} = new Carrier(${${"GLOBALS"}["rccgbayqfcis"]});
${$gbppuyfugu} = $theCart->getTotalWeightOfCarrier(${${"GLOBALS"}["cbuzddlfkz"]}, ${$evupbbr});
if ($theCart->is_all_virtual(${${"GLOBALS"}["rccgbayqfcis"]}, ${${"GLOBALS"}["ntcgjisnc"]}, ${${"GLOBALS"}["eovprfdrx"]})) {
$fnosuykqgir = "carrier_cost_wt";
${$fnosuykqgir} = 0;
${${"GLOBALS"}["sxldom"]} = 0;
} else {
${"GLOBALS"}["dpmllqvbvj"] = "id_carrier";
${"GLOBALS"}["rgxlmokm"] = "id_zone";
$bmjobpyggh = "carrier_weight";
$mqpxeljiiv = "carrier_cost_wt";
${"GLOBALS"}["fqqcnq"] = "carrier_weight";
${$mqpxeljiiv} = $theCart->getOrderShippingCostPerSellerCarrier(${${"GLOBALS"}["ghjbfbenq"]}, true, ${${"GLOBALS"}["xjumrhquvlpc"]}, ${${"GLOBALS"}["dpmllqvbvj"]}, ${${"GLOBALS"}["eoqeliqv"]}, ${$bmjobpyggh});
${"GLOBALS"}["irhifja"] = "id_carrier";
${"GLOBALS"}["odmcwep"] = "id_seller";
${"GLOBALS"}["htfelshxb"] = "carrier_cost_nt";
${${"GLOBALS"}["htfelshxb"]} = $theCart->getOrderShippingCostPerSellerCarrier(${${"GLOBALS"}["odmcwep"]}, true, ${${"GLOBALS"}["rgxlmokm"]}, ${${"GLOBALS"}["irhifja"]}, ${${"GLOBALS"}["eoqeliqv"]}, ${${"GLOBALS"}["fqqcnq"]});
}
${${"GLOBALS"}["tucrngyuq"]} = "INSERT INTO " . _DB_PREFIX_ . "order_carrier (id_order,id_carrier,id_order_invoice,weight,shipping_cost_tax_excl,shipping_cost_tax_incl,tracking_number,date_add) VALUES\n\t\t\t\t(" . $order->id . "," . ${${"GLOBALS"}["rccgbayqfcis"]} . "," . $order->invoice_number . "," . ${${"GLOBALS"}["grbrrlpluvi"]} . "," . ${${"GLOBALS"}["wktebbt"]} . "," . ${${"GLOBALS"}["pkgbprtpp"]} . ",'','" . date("Y-m-d H:i:s") . "')\n\t\t\t";
Db::getInstance()->Execute(${${"GLOBALS"}["qgysnkscmqt"]});
}
${${"GLOBALS"}["uhmklgxgv"]} = $theCart->getOrderTotal(true);
${${"GLOBALS"}["dwnnnisf"]} = $theCart->getOrderTotal(false);
${${"GLOBALS"}["tpngiidyk"]} = $theCart->getOrderTotal(true, Cart::ONLY_SHIPPING);
${${"GLOBALS"}["bovvszku"]} = $theCart->getOrderTotal(false, Cart::ONLY_SHIPPING);
${${"GLOBALS"}["vbsnsarjuto"]} = "UPDATE " . _DB_PREFIX_ . "orders SET total_shipping=" . ${${"GLOBALS"}["bxfiysg"]} . ",total_shipping_tax_incl=" . ${${"GLOBALS"}["tpngiidyk"]} . ",total_shipping_tax_excl=" . ${${"GLOBALS"}["fgfnbuwd"]} . ",total_paid=" . ${${"GLOBALS"}["spfxhjrkluz"]} . ",total_paid_tax_excl=" . ${$keeungc} . ", total_paid_tax_incl=" . ${${"GLOBALS"}["bkudhvrfzmx"]} . ", id_carrier=" . intval(Configuration::get("AGILE_SS_CARRIER_ID")) . " WHERE id_order=" . ${$vkjohzkmxbf};
Db::getInstance()->Execute(${${"GLOBALS"}["ombwxqexym"]});
if (version_compare(_PS_VERSION_, "1.5", ">=")) {
$tmllakmjw = "order_total_nt";
${${"GLOBALS"}["qgysnkscmqt"]} = "UPDATE " . _DB_PREFIX_ . "order_invoice SET total_shipping_tax_incl=" . ${${"GLOBALS"}["tpngiidyk"]} . ",total_shipping_tax_excl=" . ${${"GLOBALS"}["fgfnbuwd"]} . ",total_paid_tax_excl=" . ${$tmllakmjw} . ", total_paid_tax_incl=" . ${${"GLOBALS"}["bkudhvrfzmx"]} . " WHERE id_order=" . ${${"GLOBALS"}["fcndxqdqabb"]};
Db::getInstance()->Execute(${${"GLOBALS"}["qgysnkscmqt"]});
}
}
示例4: adjust_shipping_cost_carriers
public static function adjust_shipping_cost_carriers($templateVars)
{
${"GLOBALS"}["lhexhpn"] = "carrier_products";
$lwxfsigbwcct = "templateVars";
$rjpknhsbr = "id_order";
$pzrdwfvp = "product_index";
if (_PS_VERSION_ < "1.5") {
return;
}
$dooqwlpgjj = "id_order";
${"GLOBALS"}["wkjrmqs"] = "shipping_total_wt";
if (!Module::isInstalled("agilesellershipping")) {
return;
}
$wlyqlyiwfok = "p";
$kvfyncexe = "order_total_wt";
${"GLOBALS"}["ymcflpeyf"] = "id_zone";
${${"GLOBALS"}["onrihdtohmy"]} = AgileSellerManager::get_order_id_from_maildata(${$lwxfsigbwcct});
${"GLOBALS"}["nkxibflqmkb"] = "order_total_nt";
$ovnmgas = "id_order";
$igpfgl = "id_seller";
if (!intval(${$dooqwlpgjj})) {
return;
}
${"GLOBALS"}["kuhnlzetgvuv"] = "carrier_products";
$fmeqickjsq = "id_seller";
include_once _PS_ROOT_DIR_ . "/modules/agilesellershipping/agilesellershipping.php";
$upvrqiuqqzn = "shipping_total_nt";
${"GLOBALS"}["fubzirwiptyg"] = "id_order";
$tbjorrypbg = "carrier_amount";
$nwkelb = "id_seller";
${${"GLOBALS"}["nqfnstq"]} = new Order(${${"GLOBALS"}["fubzirwiptyg"]});
if (!Validate::isLoadedObject(${${"GLOBALS"}["nqfnstq"]})) {
return;
}
Db::getInstance()->Execute("DELETE FROM " . _DB_PREFIX_ . "order_carrier WHERE id_order=" . ${$rjpknhsbr});
${"GLOBALS"}["xatlvob"] = "id_seller";
${"GLOBALS"}["bacolq"] = "product_index";
${${"GLOBALS"}["ngtdqmicwms"]} = new Cart($order->id_cart);
${${"GLOBALS"}["ymcflpeyf"]} = SellerShipping::getZoneID($theCart->id_address_delivery, $theCart->id_customer);
${${"GLOBALS"}["lxauxtunuqb"]} = $theCart->getProducts();
${${"GLOBALS"}["bacolq"]} = array();
${"GLOBALS"}["dgzhnfghdyhw"] = "carrier_amounts";
$kdfqjqfqsjx = "products";
$kfcpcbdwvhyu = "shipping_total_wt";
foreach (${${"GLOBALS"}["lxauxtunuqb"]} as ${$wlyqlyiwfok}) {
$kdeqeeddcm = "p";
${${"GLOBALS"}["oeffcxou"]}[${${"GLOBALS"}["euzlsrc"]}["id_product"]] = ${$kdeqeeddcm};
}
${$nwkelb} = AgileSellerManager::getObjectOwnerID("order", $order->id);
if (${$fmeqickjsq} <= 0) {
${$igpfgl} = 0;
}
${${"GLOBALS"}["lhexhpn"]} = SellerShipping::get_carrier_products($order->id_cart, ${${"GLOBALS"}["xatlvob"]});
${${"GLOBALS"}["dgzhnfghdyhw"]} = $theCart->get_carrier_product_amount(${${"GLOBALS"}["kuhnlzetgvuv"]}, ${$kdfqjqfqsjx}, ${$pzrdwfvp});
foreach (${${"GLOBALS"}["nslttj"]} as ${${"GLOBALS"}["ocknvlib"]} => ${$tbjorrypbg}) {
${"GLOBALS"}["wxcwdztprh"] = "carrier_weight";
$kcnyqoiiysji = "sql";
${"GLOBALS"}["mshbmex"] = "carrier_cost_nt";
$vgzxbvut = "id_order";
$wdpdcsicekr = "carrier";
$hofugrjv = "sql";
${$wdpdcsicekr} = new Carrier(${${"GLOBALS"}["ocknvlib"]});
${${"GLOBALS"}["wxcwdztprh"]} = $theCart->getTotalWeightOfCarrier(${${"GLOBALS"}["ocknvlib"]}, ${${"GLOBALS"}["pbiyrsaos"]});
$droulqoak = "id_carrier";
$yjoeybarcn = "carrier_cost_wt";
${"GLOBALS"}["pcudjykh"] = "id_carrier";
if ($theCart->is_all_virtual(${$droulqoak}, ${${"GLOBALS"}["bdeqgeiag"]}, ${${"GLOBALS"}["oeffcxou"]})) {
${"GLOBALS"}["pwyliscteeld"] = "carrier_cost_wt";
${${"GLOBALS"}["pwyliscteeld"]} = 0;
${"GLOBALS"}["scypvqtn"] = "carrier_cost_nt";
${${"GLOBALS"}["scypvqtn"]} = 0;
} else {
$auuuewwfnfk = "carrier_weight";
${"GLOBALS"}["gyebxrhrbvu"] = "id_zone";
${"GLOBALS"}["kodkhlyllii"] = "id_seller";
${"GLOBALS"}["poxoouod"] = "carrier_weight";
${"GLOBALS"}["shrovpozyl"] = "carrier_amount";
${"GLOBALS"}["ajaqule"] = "carrier_cost_nt";
${${"GLOBALS"}["qxvetwv"]} = $theCart->getOrderShippingCostPerSellerCarrier(${${"GLOBALS"}["pbiyrsaos"]}, true, ${${"GLOBALS"}["gyebxrhrbvu"]}, ${${"GLOBALS"}["ocknvlib"]}, ${${"GLOBALS"}["rpctfybh"]}, ${${"GLOBALS"}["poxoouod"]});
${"GLOBALS"}["suswecc"] = "id_carrier";
${${"GLOBALS"}["ajaqule"]} = $theCart->getOrderShippingCostPerSellerCarrier(${${"GLOBALS"}["kodkhlyllii"]}, true, ${${"GLOBALS"}["fooexp"]}, ${${"GLOBALS"}["suswecc"]}, ${${"GLOBALS"}["shrovpozyl"]}, ${$auuuewwfnfk});
}
${$hofugrjv} = "INSERT INTO " . _DB_PREFIX_ . "order_carrier (id_order,id_carrier,id_order_invoice,weight,shipping_cost_tax_excl,shipping_cost_tax_incl,tracking_number,date_add) VALUES\n\t\t\t\t(" . $order->id . "," . ${${"GLOBALS"}["pcudjykh"]} . "," . $order->invoice_number . "," . ${${"GLOBALS"}["gndpeagosc"]} . "," . ${${"GLOBALS"}["mshbmex"]} . "," . ${$yjoeybarcn} . ",'','" . date("Y-m-d H:i:s") . "')\n\t\t\t";
Db::getInstance()->Execute(${$kcnyqoiiysji});
${${"GLOBALS"}["sywhpwni"]} = "UPDATE " . _DB_PREFIX_ . "orders SET id_carrier=" . (int) ${${"GLOBALS"}["ocknvlib"]} . " WHERE id_order=" . (int) ${$vgzxbvut};
Db::getInstance()->Execute(${${"GLOBALS"}["sywhpwni"]});
}
${$kvfyncexe} = $theCart->getOrderTotal(true);
${${"GLOBALS"}["elkslimxj"]} = $theCart->getOrderTotal(false);
${$kfcpcbdwvhyu} = $theCart->getOrderTotal(true, Cart::ONLY_SHIPPING);
${$upvrqiuqqzn} = $theCart->getOrderTotal(false, Cart::ONLY_SHIPPING);
${${"GLOBALS"}["sywhpwni"]} = "UPDATE " . _DB_PREFIX_ . "orders SET total_shipping=" . ${${"GLOBALS"}["wkjrmqs"]} . ",total_shipping_tax_incl=" . ${${"GLOBALS"}["dnwyybsbrnr"]} . ",total_shipping_tax_excl=" . ${${"GLOBALS"}["lqyqho"]} . ",total_paid=" . ${${"GLOBALS"}["keewmyi"]} . ",total_paid_tax_excl=" . ${${"GLOBALS"}["nkxibflqmkb"]} . ", total_paid_tax_incl=" . ${${"GLOBALS"}["keewmyi"]} . " WHERE id_order=" . ${$ovnmgas};
Db::getInstance()->Execute(${${"GLOBALS"}["sywhpwni"]});
if (version_compare(_PS_VERSION_, "1.5", ">=")) {
$ocsjrc = "order_total_nt";
$hgohjmbkvj = "id_order";
$mokvoyxe = "shipping_total_wt";
${"GLOBALS"}["joiutwgqtk"] = "shipping_total_nt";
${${"GLOBALS"}["sywhpwni"]} = "UPDATE " . _DB_PREFIX_ . "order_invoice SET total_shipping_tax_incl=" . ${$mokvoyxe} . ",total_shipping_tax_excl=" . ${${"GLOBALS"}["joiutwgqtk"]} . ",total_paid_tax_excl=" . ${$ocsjrc} . ", total_paid_tax_incl=" . ${${"GLOBALS"}["keewmyi"]} . " WHERE id_order=" . ${$hgohjmbkvj};
//.........这里部分代码省略.........
示例5: adjust_shipping_cost_carriers
public static function adjust_shipping_cost_carriers($templateVars)
{
if (_PS_VERSION_ < '1.5') {
return;
}
if (!Module::isInstalled('agilesellershipping')) {
return;
}
$id_order = AgileSellerManager::get_order_id_from_maildata($templateVars);
if (!intval($id_order)) {
return;
}
include_once _PS_ROOT_DIR_ . "/modules/agilesellershipping/agilesellershipping.php";
$order = new Order($id_order);
if (!Validate::isLoadedObject($order)) {
return;
}
Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'order_carrier WHERE id_order=' . $id_order);
$theCart = new Cart($order->id_cart);
$id_zone = SellerShipping::getZoneID($theCart->id_address_delivery, $theCart->id_customer);
$products = $theCart->getProducts();
$product_index = array();
foreach ($products as $p) {
$product_index[$p['id_product']] = $p;
}
$id_seller = AgileSellerManager::getObjectOwnerID('order', $order->id);
if ($id_seller <= 0) {
$id_seller = 0;
}
$carrier_products = SellerShipping::get_carrier_products($order->id_cart, $id_seller);
$carrier_amounts = $theCart->get_carrier_product_amount($carrier_products, $products, $product_index);
foreach ($carrier_amounts as $id_carrier => $carrier_amount) {
$carrier = new Carrier($id_carrier);
$carrier_weight = $theCart->getTotalWeightOfCarrier($id_carrier, $id_seller);
if ($theCart->is_all_virtual($id_carrier, $carrier_products, $product_index)) {
$carrier_cost_wt = 0;
$carrier_cost_nt = 0;
} else {
$carrier_cost_wt = $theCart->getOrderShippingCostPerSellerCarrier($id_seller, true, $id_zone, $id_carrier, $carrier_amount, $carrier_weight);
$carrier_cost_nt = $theCart->getOrderShippingCostPerSellerCarrier($id_seller, true, $id_zone, $id_carrier, $carrier_amount, $carrier_weight);
}
$sql = 'INSERT INTO ' . _DB_PREFIX_ . 'order_carrier (id_order,id_carrier,id_order_invoice,weight,shipping_cost_tax_excl,shipping_cost_tax_incl,tracking_number,date_add) VALUES
(' . $order->id . ',' . $id_carrier . ',' . $order->invoice_number . ',' . $carrier_weight . ',' . $carrier_cost_nt . ',' . $carrier_cost_wt . ',\'\',\'' . date('Y-m-d H:i:s') . '\')
';
Db::getInstance()->Execute($sql);
$sql = 'UPDATE ' . _DB_PREFIX_ . 'orders SET id_carrier=' . (int) $id_carrier . ' WHERE id_order=' . (int) $id_order;
Db::getInstance()->Execute($sql);
}
$order_total_wt = $theCart->getOrderTotal(true);
$order_total_nt = $theCart->getOrderTotal(false);
$shipping_total_wt = $theCart->getOrderTotal(true, Cart::ONLY_SHIPPING);
$shipping_total_nt = $theCart->getOrderTotal(false, Cart::ONLY_SHIPPING);
$sql = 'UPDATE ' . _DB_PREFIX_ . 'orders SET total_shipping=' . $shipping_total_wt . ',total_shipping_tax_incl=' . $shipping_total_wt . ',total_shipping_tax_excl=' . $shipping_total_nt . ',total_paid=' . $order_total_wt . ',total_paid_tax_excl=' . $order_total_nt . ', total_paid_tax_incl=' . $order_total_wt . ' WHERE id_order=' . $id_order;
Db::getInstance()->Execute($sql);
if (version_compare(_PS_VERSION_, '1.5', '>=')) {
$sql = 'UPDATE ' . _DB_PREFIX_ . 'order_invoice SET total_shipping_tax_incl=' . $shipping_total_wt . ',total_shipping_tax_excl=' . $shipping_total_nt . ',total_paid_tax_excl=' . $order_total_nt . ', total_paid_tax_incl=' . $order_total_wt . ' WHERE id_order=' . $id_order;
Db::getInstance()->Execute($sql);
}
}