Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php goto HTuFg; HTuFg: $cache_shop_by_product = array(); goto n8X1e; bmUMD: $cache_tax =..

Decoded Output download

<?php goto HTuFg; HTuFg: $cache_shop_by_product = array(); goto n8X1e; bmUMD: $cache_tax = array(); goto Yqo6j; n8X1e: $cache_warehouse_by_product = array(); goto bmUMD; Yqo6j: class SCI { public $ps_vers; public static function getDefaultCountryId() { goto CwoW8; CwoW8: $return = 0; goto YA1cc; x6dcQ: if (version_compare(_PS_VERSION_, "1.5.0.0", "<")) { goto PvBnJ; } goto CSYES; plzY2: PvBnJ: goto TNZ9g; FxW0y: define("SC_CACHE_DEFAULT_COUNTRY_ID", $return); goto knTE3; P_upg: GSSHD: goto FxW0y; hgg3T: ElBlo: goto x6dcQ; knTE3: tRER_: goto YVRaJ; dLz1h: $return = SC_CACHE_DEFAULT_COUNTRY_ID; goto avj6M; avj6M: goto tRER_; goto hgg3T; YA1cc: if (!defined("SC_CACHE_DEFAULT_COUNTRY_ID")) { goto ElBlo; } goto dLz1h; eKQlv: goto GSSHD; goto plzY2; YVRaJ: return $return; goto CKDES; TNZ9g: $return = (int) Country::getDefaultCountryId(); goto P_upg; CSYES: $return = (int) SCI::getConfigurationValue("PS_COUNTRY_DEFAULT", null, 0, (int) SCI::getSelectedShop()); goto eKQlv; CKDES: } public static function hookExec($hook_name, $hookArgs = array(), $id_module = null) { goto NKVlV; yUEZP: if (!($hook_name == "updateProduct")) { goto GmrnV; } goto x1S3C; k2Yh2: if (!($hook_name == "updateProduct")) { goto hSjg2; } goto InZvb; InZvb: SCI::updateConfigurationValue("PS_SMARTY_CLEAR_CACHE", $old_value); goto clvgW; clvgW: hSjg2: goto JY_Y5; OISML: gFHGF: goto Ho4G9; qZpBS: dwsFQ: goto XqDBe; XqDBe: $result = Hook::exec(sc_array_key_exists(strtolower($hook_name), $alias) ? $alias[strtolower($hook_name)] : $hook_name, $hookArgs, $id_module, false, true, false, (int) SCI::getSelectedShop()); goto n1WOa; XIatb: $result = Hook::exec(sc_array_key_exists(strtolower($hook_name), $alias) ? $alias[strtolower($hook_name)] : $hook_name, $hookArgs, $id_module); goto O60eo; JY_Y5: return $result; goto GufuF; n0JCZ: GmrnV: goto YJImT; RSWQR: SCI::updateConfigurationValue("PS_SMARTY_CLEAR_CACHE", "never"); goto n0JCZ; VcDO2: return; goto e0y_k; mQXhm: return Module::hookExec($hook_name, $hookArgs, $id_module); goto OISML; GufuF: goto gFHGF; goto aPvUZ; n1WOa: uQKN2: goto k2Yh2; O60eo: goto uQKN2; goto qZpBS; NKVlV: if (!(!_s("APP_COMPAT_HOOK") && !SCI::checkUsedHook($hook_name))) { goto jYJD3; } goto VcDO2; x1S3C: $old_value = Configuration::get("PS_SMARTY_CLEAR_CACHE"); goto RSWQR; kcQgd: if (version_compare(_PS_VERSION_, "1.5.0.0", "<")) { goto c4r1k; } goto zIWbD; aPvUZ: c4r1k: goto mQXhm; e0y_k: jYJD3: goto kcQgd; YJImT: if (SCMS) { goto dwsFQ; } goto XIatb; zIWbD: $alias = Hook::getHookAliasList(); goto yUEZP; Ho4G9: } public static function checkUsedHook($hook_name) { goto BULAD; GySEr: QlW6O: goto fFn9u; GIEqa: iOjnw: goto IBbXW; BULAD: $hook_list = unserialize(Configuration::get("SC_HOOK_MODULE")); goto aienC; A44Ft: if (!empty($hook_list)) { goto QlW6O; } goto QGRsA; tISOy: goto hebz6; goto GySEr; Sd70V: goto dSPDY; goto GIEqa; QGRsA: return true; goto tISOy; fFn9u: return sc_array_key_exists(strtolower($hook_name), $hook_list_by_shop); goto gaD8q; UnNNK: dSPDY: goto A44Ft; aienC: if (SCMS) { goto iOjnw; } goto Rfqai; Rfqai: $hook_list_by_shop = $hook_list; goto Sd70V; IBbXW: $hook_list_by_shop = $hook_list[SCI::getSelectedShop()]; goto UnNNK; gaD8q: hebz6: goto omtca; omtca: } public static function addToShops($objectTableName, $objects_id = array(), $shops = array()) { goto n0fl5; IG8_D: U7q6o: goto WwlUm; OEHpM: foreach ($shops as $id_shop) { goto tEdVi; uAA5l: Xmn_l: goto Qjwvm; uhHdX: pX8tw: goto uAA5l; tEdVi: foreach ($objects_id as $id_object) { $newRelations[] = "(" . (int) $id_shop . "," . (int) $id_object . ")"; Xxfj_: } goto uhHdX; Qjwvm: } goto rUeH2; Tu3SK: $newRelations = arrayDiffEmulation($newRelations, $relationsArray); goto x4KHp; iH1YJ: $relationsArray = array(); goto Ht52Y; L51s3: $sql = "INSERT INTO " . _DB_PREFIX_ . $objectTableName . "_shop (id_shop,id_" . $objectTableName . ") VALUES " . join(",", $newRelations); goto UF9Bs; kCGAb: nNM93: goto EYPXl; x4KHp: if (!count($newRelations)) { goto U7q6o; } goto L51s3; Yqmfn: if (!(is_array($shops) && count($shops) == 0)) { goto wCcDt; } goto DoSzo; n0fl5: if (!(version_compare(_PS_VERSION_, "1.5.0.0", "<") || count($objects_id) == 0)) { goto XG0ZB; } goto wykzK; EYPXl: $newRelations = array(); goto OEHpM; wykzK: return; goto jSEBq; jSEBq: XG0ZB: goto Yqmfn; DoSzo: $shops = Shop::getShops(true, null, true); goto WXFgH; UF9Bs: Db::getInstance()->Execute($sql); goto IG8_D; WXFgH: wCcDt: goto CGV9V; rUeH2: Pd9Po: goto Tu3SK; CGV9V: $relations = Db::getInstance()->ExecuteS("SELECT id_shop,id_" . $objectTableName . " FROM " . _DB_PREFIX_ . $objectTableName . "_shop"); goto iH1YJ; Ht52Y: foreach ($relations as $v) { $relationsArray[] = "(" . $v["id_shop"] . "," . $v["id_" . $objectTableName] . ")"; Gbj7s: } goto kCGAb; WwlUm: } public static function duplicateImageToShops($object_id, $actual_shop_id, $shops = array()) { goto TMpes; Lzh72: foreach ($shops as $shop) { $other_shops[] = "(" . (int) $shop . "," . (int) $image_actual_shop["id_image"] . "," . $image_actual_shop["cover"] . ")"; iSuws: } goto Mbnal; fykgf: xFI1G: goto zx09P; Mbnal: m3Pie: goto jLX_6; JIJHe: $image_actual_shop = Db::getInstance()->getRow("SELECT img_s.id_shop,img_s.id_image,img_s.cover, i.id_product\xa            FROM " . _DB_PREFIX_ . "image_shop img_s\xa                INNER JOIN " . _DB_PREFIX_ . "image i ON (img_s.id_image=i.id_image)
            WHERE img_s.id_image = '" . (int) $object_id . "' AND img_s.id_shop='" . (int) $actual_shop_id . "'"); goto RvdQQ; jLX_6: goto xFI1G; goto WdFBv; e7NW4: foreach ($shops as $shop) { goto SPC2I; KJWDw: zLJkH: goto owIgd; SPC2I: if (!empty($image_actual_shop["cover"])) { goto WHelo; } goto u_dlp; u_dlp: $image_actual_shop["cover"] = "NULL"; goto bfeLE; IKHVL: $other_shops[] = "(" . (int) $shop . "," . (int) $image_actual_shop["id_image"] . "," . (int) $image_actual_shop["id_product"] . "," . $image_actual_shop["cover"] . ")"; goto KJWDw; bfeLE: WHelo: goto IKHVL; owIgd: } goto qr5_U; RvdQQ: $other_shops = array(); goto e7NW4; zx09P: if (!count($other_shops)) { goto VoEIa; } goto LyfkC; dQFCw: $other_shops = array(); goto Lzh72; LyfkC: $sql = "INSERT INTO " . _DB_PREFIX_ . "image_shop (id_shop,id_image" . (version_compare(_PS_VERSION_, "1.6.1.0", ">=") ? ",id_product" : '') . ",cover) VALUES " . join(",", $other_shops); goto lXsfD; lXsfD: Db::getInstance()->Execute($sql); goto sUJ2f; f9rE8: if (version_compare(_PS_VERSION_, "1.6.1.0", ">=")) { goto BLOFV; } goto lKLk3; WdFBv: BLOFV: goto JIJHe; sUJ2f: VoEIa: goto rkgcZ; RETkI: return; goto O7xm6; qr5_U: l3XBv: goto fykgf; lKLk3: $image_actual_shop = Db::getInstance()->getRow("SELECT id_shop,id_image,cover FROM " . _DB_PREFIX_ . "image_shop WHERE id_image = '" . (int) $object_id . "' AND id_shop='" . (int) $actual_shop_id . "'"); goto dQFCw; TMpes: if (!(version_compare(_PS_VERSION_, "1.5.0.0", "<") || empty($object_id) || empty($actual_shop_id) || empty($shops))) { goto wkfZn; } goto RETkI; xxeKx: Db::getInstance()->execute("DELETE FROM " . _DB_PREFIX_ . "image_shop WHERE id_image = '" . (int) $object_id . "' AND id_shop IN (" . join(",", $shops) . ")"); goto f9rE8; O7xm6: wkfZn: goto xxeKx; rkgcZ: } public static function getLastPositionFromCategory($id_category, $id_shop = 1) { goto cE9PK; fPyEb: return Category::getLastPosition($id_category); goto UgQET; amCoe: return Category::getLastPosition($id_category, $id_shop); goto w1IiY; w1IiY: goto GgO_7; goto ct3cq; ct3cq: VsqQk: goto fPyEb; cE9PK: if (version_compare(_PS_VERSION_, "1.5.0.0", "<")) { goto VsqQk; } goto amCoe; UgQET: GgO_7: goto c_ht1; c_ht1: } public static function imageResize($sourceFile, $destFile, $destWidth = null, $destHeight = null, $fileType = "jpg") { goto Qp_Cy; rbRpI: QdSwY: goto gRVM1; tSzpV: ui0Ka: goto VhzOy; TpM_8: return @ImageManager::resize($sourceFile, $destFile, $destWidth, $destHeight, $fileType); goto BIpyf; BIpyf: goto ui0Ka; goto rbRpI; gRVM1: return imageResize($sourceFile, $destFile, $destWidth, $destHeight, $fileType); goto tSzpV; Qp_Cy: if (version_compare(_PS_VERSION_, "1.5.0.0", "<")) { goto QdSwY; } goto TpM_8; VhzOy: } public static function updateConfigurationValue($key, $values, $html = false, $id_shop_group = 0, $id_shop = 0) { goto TdAx4; SLTKA: AvGtI: goto Enq8i; psn7L: goto AvGtI; goto z8uaL; z8uaL: QEAsr: goto EAzCv; TdAx4: if (version_compare(_PS_VERSION_, "1.5.0.0", "<")) { goto QEAsr; } goto xZ18B; xZ18B: return Configuration::updateValue($key, $values, $html, $id_shop_group, $id_shop); goto psn7L; EAzCv: return Configuration::updateValue($key, $values, $html); goto SLTKA; Enq8i: } public static function getConfigurationValue($key, $id_lang = null, $id_shop_group = 0, $id_shop = 0) { goto L9Y0K; LbSqD: return Configuration::get($key, $id_lang, $id_shop_group, $id_shop); goto B01Ki; d8_M3: pKmO4: goto KUCAo; mWJ4y: return Configuration::get($key, $id_lang); goto d8_M3; B01Ki: goto pKmO4; goto nDZDn; L9Y0K: if (version_compare(_PS_VERSION_, "1.5.0.0", "<")) { goto he5J1; } goto LbSqD; nDZDn: he5J1: goto mWJ4y; KUCAo: } public static function getEcotaxTaxRate() { goto kt0fL; bILfq: DLyIN: goto xY3ug; xY3ug: $return = Tax::getProductEcotaxRate() / 100 + 1; goto Ba_Ob; gbi0P: $tax_manager = TaxManagerFactory::getManager($address, (int) Configuration::get("PS_ECOTAX_TAX_RULES_GROUP_ID", null, 0, (int) SCI::getSelectedShop())); goto rLxEK; cOVyS: goto w2UjU; goto bILfq; Kt0Ot: mbOTA: goto N2hEu; Ba_Ob: goto w2UjU; goto U_tUR; NTulv: PJ07c: goto DZWo3; rLxEK: $tax_calculator = $tax_manager->getTaxCalculator(); goto DxNyA; g4bsj: goto w2UjU; goto Kt0Ot; dtQX1: if (version_compare(_PS_VERSION_, "1.4.0.0", ">=")) { goto DLyIN; } goto TCCbp; mEpve: goto w2UjU; goto NTulv; HpTEW: $tax = new Tax((int) Configuration::get("PS_ECOTAX_TAX_ID")); goto HWx0w; jKmXR: yCKYu: goto alF3i; DxNyA: $return = $tax_calculator->getTotalRate() / 100 + 1; goto cOVyS; N2hEu: $return = 1; goto mEpve; FvV1Z: goto yCKYu; goto nCbcR; YdG5R: w2UjU: goto HS2JV; kDWdr: if (version_compare(_PS_VERSION_, "1.4.0.0", ">=") && version_compare(_PS_VERSION_, "1.5.0.0", "<") && (int) SCI::getConfigurationValue("PS_USE_ECOTAX") == 0 || version_compare(_PS_VERSION_, "1.5.0.0", ">=") && (int) SCI::getConfigurationValue("PS_USE_ECOTAX", null, 0, (int) SCI::getSelectedShop()) == 0) { goto mbOTA; } goto T8pcj; UMZ2S: $return = 1; goto g4bsj; utYH7: if (!defined("SC_CACHE_ECOTAX_RATE")) { goto qYSa7; } goto iEcyZ; kt0fL: $return = 100; goto utYH7; nCbcR: qYSa7: goto kDWdr; U_tUR: xG5EP: goto HpTEW; TCCbp: if (version_compare(_PS_VERSION_, "1.3.0.0", ">=")) { goto xG5EP; } goto UMZ2S; T8pcj: if (version_compare(_PS_VERSION_, "1.5.0.0", ">=")) { goto PJ07c; } goto dtQX1; HS2JV: define("SC_CACHE_ECOTAX_RATE", $return); goto jKmXR; DZWo3: $address = Address::initialize(null); goto gbi0P; alF3i: return $return; goto oq14l; HWx0w: $return = (double) $tax->rate / 100 + 1; goto YdG5R; iEcyZ: $return = SC_CACHE_ECOTAX_RATE; goto FvV1Z; oq14l: } public static function getSelectedShopActionList($string = false, $id_product = null) { goto sOPmw; tCDuv: $list = array(SCI::getSelectedShop()); goto kHwIg; D3lbJ: $list = explode(",", $_COOKIE["sc_shop_list"]); goto Gb_jp; O4MpF: $list = $list_temp; goto RZgQ_; Gb_jp: Vhu94: goto yrs8_; vyAVy: $list_temp = array(); goto E1H2F; sOPmw: $list = array(); goto muULK; muULK: if (!empty($_COOKIE["sc_shop_list"])) { goto MIyz9; } goto tCDuv; e_ql8: $list = $string ? implode(",", $list) : $list; goto zQxeQ; t5nga: MIyz9: goto D3lbJ; DCz2V: foreach ($shops as $shop_id) { goto KDZ_p; PDUZQ: lk3H3: goto ezd7Z; b79x9: u40YS: goto PDUZQ; KDZ_p: if (!sc_in_array($shop_id, $list, "SCISelectShopProduct")) { goto u40YS; } goto ZtSWq; ZtSWq: $list_temp[] = $shop_id; goto b79x9; ezd7Z: } goto L1OLy; E1H2F: $shops = self::getShopsByProduct($id_product); goto DCz2V; zQxeQ: return $list; goto h80OT; RZgQ_: QfiS9: goto e_ql8; L1OLy: Cb8xQ: goto O4MpF; kHwIg: goto Vhu94; goto t5nga; yrs8_: if (empty($id_product)) { goto QfiS9; } goto vyAVy; h80OT: } public static function getSelectedShop() { goto mfTv3; LWABs: if (version_compare(_PS_VERSION_, "1.5.0.0", ">=")) { goto B7rQE; } goto Dha_P; AujdZ: a9seY: goto Pn785; U5o0N: goto a9seY; goto cuDht; T0s00: BS5ES: goto KzjpQ; od9gG: goto a9seY; goto T0s00; cuDht: B7rQE: goto cJRHX; Dha_P: return 0; goto od9gG; KzjpQ: return isset($_COOKIE["sc_shop_selected"]) ? (int) $_COOKIE["sc_shop_selected"] : 0; goto U5o0N; cJRHX: return (int) Configuration::get("PS_SHOP_DEFAULT"); goto AujdZ; mfTv3: if (SCMS) { goto BS5ES; } goto LWABs; Pn785: } public static function getAllShops() { goto hNXCl; hNXCl: $sql = "SELECT s.*\xa		\x9	FROM " . _DB_PREFIX_ . "shop s\xa\x9	\x9	WHERE s.deleted = 0"; goto gdrhJ; DTb0A: return count($results); goto k0jJF; gdrhJ: $results = Db::getInstance()->executeS($sql); goto DTb0A; k0jJF: } public static function getShopsByProduct($id_product) { goto K5ty9; AgUGf: return $list; goto QOzt1; K5ty9: global $cache_shop_by_product; goto vjHvX; mGbxH: $list = array(); goto V1AQh; O_21Q: YmgXq: goto mGbxH; vFO8a: if (empty($cache)) { goto YmgXq; } goto wjOKT; Ri9bo: fdhIe: goto cifGd; Dr5rW: gNWxH: goto vFO8a; uls96: $cache = $cache_shop_by_product[$id_product]; goto Dr5rW; wj8Oh: if (!(!empty($res) && count($res) > 0)) { goto zQ73h; } goto cgBZv; cgBZv: foreach ($res as $value) { $list[] = $value["id_shop"]; HJQQy: } goto Ri9bo; cifGd: zQ73h: goto ssqaK; Egnwy: goto n6_Kv; goto O_21Q; sIVcD: if (!sc_array_key_exists($id_product, $cache_shop_by_product)) { goto gNWxH; } goto uls96; V1AQh: $res = Db::getInstance()->executeS("
		\x9	SELECT `id_shop`
		\x9\x9FROM `" . _DB_PREFIX_ . "product_shop`\xa\x9	\x9\x9WHERE `id_product` = " . (int) $id_product); goto wj8Oh; wjOKT: $list = $cache; goto Egnwy; vjHvX: $cache = array(); goto sIVcD; ssqaK: $cache_shop_by_product[$id_product] = $list; goto xziK7; xziK7: n6_Kv: goto AgUGf; QOzt1: } public static function getShopsByCategory($id_category) { goto Vs5jC; STHCS: $cache = array(); goto TeRKL; F0Cw_: tuGcG: goto GSE0C; NOBWU: $list = $cache; goto wQJKA; hUR2G: $cache_shop_by_category[$id_category] = $list; goto Xx8MY; cl1UN: $cache = $cache_shop_by_category[$id_category]; goto F0Cw_; grXmT: IZMpR: goto hUR2G; Xx8MY: hIAhB: goto AQFUz; TeRKL: if (!(is_array($cache_shop_by_category) && sc_array_key_exists($id_category, $cache_shop_by_category))) { goto tuGcG; } goto cl1UN; Vs5jC: global $cache_shop_by_category; goto STHCS; wQJKA: goto hIAhB; goto pyY63; AQFUz: return $list; goto FOEee; pQKzY: $list = array(); goto ORUoR; iTSiv: NHjWa: goto grXmT; eHmH2: if (!(!empty($res) && count($res) > 0)) { goto IZMpR; } goto H1aHQ; GSE0C: if (empty($cache)) { goto f7DG8; } goto NOBWU; H1aHQ: foreach ($res as $value) { $list[] = $value["id_shop"]; MbPjX: } goto iTSiv; ORUoR: $res = Db::getInstance()->executeS("\xa	\x9\x9	SELECT `id_shop`\xa	\x9	\x9FROM `" . _DB_PREFIX_ . "category_shop`
		\x9	WHERE `id_category` = " . (int) $id_category); goto eHmH2; pyY63: f7DG8: goto pQKzY; FOEee: } public static function qtySumStockAvailable($id_product) { goto a4C7f; nhW32: WC_Vj: goto VgIeJ; Jm7tD: foreach ($shops as $shop_id) { goto d1LPZ; Nz391: $query->where("id_product = " . (int) $id_product); goto sCzrI; asukO: $new_qty = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto DkAyE; KQiY3: $query->select("SUM(quantity)"); goto lA6gV; d1LPZ: $query = new DbQuery(); goto KQiY3; qxtOM: $query = StockAvailable::addSqlShopRestriction($query, $shop_id); goto asukO; DkAyE: SCI::setQuantity($id_product, 0, $new_qty, $shop_id); goto X2YfN; lA6gV: $query->from("stock_available"); goto Nz391; X2YfN: N01fv: goto iOhiL; sCzrI: $query->where("id_product_attribute != 0 "); goto qxtOM; iOhiL: } goto nhW32; a4C7f: $shops = self::getShopsByProduct($id_product); goto Jm7tD; VgIeJ: } public static function getSelectedWarehouseActionList($string = false, $id_product = null) { goto HPOMw; OPBBY: goto xN6eg; goto DKFmS; dsert: $list_temp = array(); goto dXW65; XJKAq: wRata: goto hCCsM; hCCsM: $list = $string ? implode(",", $list) : $list; goto TNn8J; TNn8J: return $list; goto i2RRy; C8xvJ: $list = explode(",", $_COOKIE["sc_warehouse_list"]); goto d5Ivz; voWho: if (empty($id_product)) { goto wRata; } goto dsert; dXW65: $warehouses = Warehouse::getProductWarehouseList($id_product, 0, self::getSelectedShop()); goto P7UFm; mdqf1: $list = array(SCI::getSelectedWarehouse()); goto OPBBY; HPOMw: $list = array(); goto ccTe6; P7UFm: foreach ($warehouses as $warehouse) { goto XnIRh; XnIRh: $warehouse_id = $warehouse["id_warehouse"]; goto gNfCW; X7otb: f0Ng7: goto j9hLd; ahM8F: $list_temp[] = $warehouse_id; goto X7otb; j9hLd: KpfBc: goto n4XO2; gNfCW: if (!sc_in_array($warehouse_id, $list, "SCISelectedWarehouseProduct")) { goto f0Ng7; } goto ahM8F; n4XO2: } goto M47v4; d5Ivz: xN6eg: goto voWho; M47v4: D1SI2: goto MoALp; DKFmS: pnbkY: goto C8xvJ; ccTe6: if (!empty($_COOKIE["sc_warehouse_list"])) { goto pnbkY; } goto mdqf1; MoALp: $list = $list_temp; goto XJKAq; i2RRy: } public static function getSelectedWarehouse() { goto hEtAK; hEtAK: if (SCAS) { goto dvEaO; } goto Ea6kg; Ea6kg: return 0; goto O6327; SUdY5: return isset($_COOKIE["sc_warehouse_selected"]) ? (int) $_COOKIE["sc_warehouse_selected"] : 0; goto uDPuC; O6327: goto VcXs_; goto JjSqI; uDPuC: VcXs_: goto oa_Ws; JjSqI: dvEaO: goto SUdY5; oa_Ws: } public static function getProductRealQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false, $has_combination = false) { goto MBBvz; RKktg: $query->select("od.product_quantity, od.product_quantity_refunded"); goto H9GjZ; Q7APi: $query->where("sod.id_product = " . (int) $id_product . " AND sod.id_product_attribute = " . (int) $id_product_attribute); goto stDPX; qaRv3: foreach ($supply_orders_qties as $qty) { goto JGEIA; DqoV0: MqXZi: goto sMHUX; sMHUX: hhNp8: goto BTQWu; JGEIA: if (!($qty["quantity_expected"] > $qty["quantity_received"])) { goto MqXZi; } goto d7JJY; d7JJY: $supply_orders_qty += $qty["quantity_expected"] - $qty["quantity_received"]; goto DqoV0; BTQWu: } goto pgyT1; stDPX: if (!(!is_null($ids_warehouse) && count($ids_warehouse))) { goto qVZTz; } goto nPBPX; Npu8B: if ($has_combination) { goto m3uiQ; } goto iUpTn; iUpTn: $temp_ids_warehouse = array(); goto ooBUJ; yu8Z4: $query->where("od.id_warehouse IN(" . implode(", ", $ids_warehouse) . ")"); goto KQCak; iBm6U: vyVEn: goto Npu8B; chvqu: Xx_Jw: goto UEXBh; KQCak: aUWdK: goto CvUhh; SH1Xi: $client_orders_qty = 0; goto o3jTf; ujEMB: $query->select("sod.quantity_expected, sod.quantity_received"); goto Ci0KV; fp4Fo: $query->leftjoin("supply_order_state", "sos", "sos.id_supply_order_state = so.id_supply_order_state"); goto x7uxJ; OYCMl: foreach ($res as $row) { $client_orders_qty += $row["product_quantity"] - $row["product_quantity_refunded"]; t5IsB: } goto E0Wjc; CvUhh: $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); goto SH1Xi; HFkDM: qVZTz: goto sq_BQ; GtDio: $qty = self::getProductPhysicalQuantities($id_product, $id_product_attribute, $ids_warehouse, $usable, $has_combination); goto t9IUL; H9GjZ: $query->from("order_detail", "od"); goto nCzRS; tCGB4: mYCIn: goto LwG36; Ci0KV: $query->from("supply_order", "so"); goto oOdFl; E0Wjc: D_fd5: goto rtoKF; o3jTf: if (!count($res)) { goto edZpk; } goto OYCMl; iGAps: m3uiQ: goto scyvc; U_p6d: $query->leftJoin("order_state", "os", "os.id_order_state = oh.id_order_state"); goto l2Ioa; x7uxJ: $query->where("sos.pending_receipt = 1"); goto Q7APi; pgyT1: eDshD: goto GtDio; nCzRS: $query->leftjoin("orders", "o", "o.id_order = od.id_order"); goto rPG_O; QE22p: $ids_warehouse = array($ids_warehouse); goto GLzvz; rPG_O: $query->where("od.product_id = " . (int) $id_product); goto kEgw_; oOdFl: $query->leftjoin("supply_order_detail", "sod", "sod.id_supply_order = so.id_supply_order"); goto fp4Fo; t9IUL: return $qty - $client_orders_qty + $supply_orders_qty; goto yavHw; GLzvz: cYhiW: goto BJuyG; kEgw_: if (!(0 != $id_product_attribute)) { goto YSTUC; } goto X_1XV; rtoKF: edZpk: goto ND3xt; IkJ45: $supply_orders_qty = 0; goto qaRv3; X_1XV: $query->where("od.product_attribute_id = " . (int) $id_product_attribute); goto up_Ny; fVWac: $query->where("o.valid = 1 OR (os.id_order_state != " . (int) Configuration::get("PS_OS_ERROR") . "\xa	\x9\x9\x9\x9   AND os.id_order_state != " . (int) Configuration::get("PS_OS_CANCELED") . ")"); goto fSS4Z; nPBPX: $query->where("so.id_warehouse IN(" . implode(", ", $ids_warehouse) . ")"); goto HFkDM; l2Ioa: $query->where("os.shipped != 1"); goto fVWac; Dk9S0: return Product::getRealQuantity((int) $id_product, (int) $id_product_attribute, $ids_warehouse, (int) SCI::getSelectedShop()); goto tCGB4; MBBvz: if (!version_compare(_PS_VERSION_, "1.6.1.0", ">=")) { goto mYCIn; } goto Dk9S0; ND3xt: $query = new DbQuery(); goto ujEMB; BJuyG: $ids_warehouse = array_map("intval", $ids_warehouse); goto iBm6U; UEXBh: $ids_warehouse = $temp_ids_warehouse; goto iGAps; ooBUJ: foreach ($ids_warehouse as $id_warehouse) { goto WfDJ2; S9IGW: Gb5Ui: goto gu1ti; QWNzN: if (empty($temp_check_in_warehouse)) { goto C4tuT; } goto GSHZt; GSHZt: $temp_ids_warehouse[] = $id_warehouse; goto RWyX0; WfDJ2: $temp_check_in_warehouse = WarehouseProductLocation::getIdByProductAndWarehouse((int) $id_product, (int) $id_product_attribute, (int) $id_warehouse); goto QWNzN; RWyX0: C4tuT: goto S9IGW; gu1ti: } goto chvqu; up_Ny: YSTUC: goto OGLLQ; LwG36: if (is_null($ids_warehouse)) { goto vyVEn; } goto eLk_x; sq_BQ: $supply_orders_qties = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); goto IkJ45; eLk_x: if (is_array($ids_warehouse)) { goto cYhiW; } goto QE22p; scyvc: $query = new DbQuery(); goto RKktg; OGLLQ: $query->leftJoin("order_history", "oh", "oh.id_order = o.id_order AND oh.id_order_history = (SELECT MAX(oh2.id_order_history) FROM " . _DB_PREFIX_ . "order_history oh2 WHERE oh2.id_order = o.id_order)"); goto U_p6d; xCeOb: if (!count($ids_warehouse)) { goto aUWdK; } goto yu8Z4; fSS4Z: $query->groupBy("od.id_order_detail"); goto xCeOb; yavHw: } public static function getProductPhysicalQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false, $has_combination = false) { goto XKOJS; czf_b: $ids_warehouse = array($ids_warehouse); goto GWRkG; OD_Gz: if (!(0 != $id_product_attribute)) { goto PLGcP; } goto XwCbE; Dh6s4: if (!$has_combination) { goto OZovy; } goto wRu9i; TJevt: if (is_array($ids_warehouse)) { goto UUoOa; } goto czf_b; nEdZc: $ids_warehouse = array(); goto iEVQk; znQi6: N2W2C: goto GrSGx; GrSGx: bUxWR: goto gsEsH; rRUAd: $query->where("s.id_product = " . (int) $id_product); goto OD_Gz; u6vdn: LC6If: goto TJevt; wRu9i: $query->where("s.id_product_attribute != 0"); goto s8R8F; ikO2J: if (count($ids_warehouse)) { goto N2W2C; } goto fkA6J; fkA6J: return 0; goto znQi6; emqtQ: $query->select("SUM(" . ($usable ? "s.usable_quantity" : "s.physical_quantity") . ")"); goto e1Jxa; GWRkG: UUoOa: goto XZ2ev; mplxF: if (!count($ids_warehouse)) { goto UAX1X; } goto C7Zv_; gsEsH: $query = new DbQuery(); goto emqtQ; cV6ft: UAX1X: goto Dh6s4; XKOJS: if (!is_null($ids_warehouse)) { goto LC6If; } goto nEdZc; ZbQKu: if (!$has_combination) { goto PXnCm; } goto wjnKh; XwCbE: $query->where("s.id_product_attribute = " . (int) $id_product_attribute); goto cLPPF; Sxqx3: PXnCm: goto rRUAd; s8R8F: OZovy: goto dFUN1; cLPPF: PLGcP: goto mplxF; C7Zv_: $query->where("s.id_warehouse IN(" . implode(", ", $ids_warehouse) . ")"); goto cV6ft; dFUN1: return (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto QtvCk; XZ2ev: $ids_warehouse = array_map("intval", $ids_warehouse); goto ikO2J; wjnKh: $query->innerJoin("warehouse_product_location", "wpl", "(wpl.id_product = s.id_product AND wpl.id_product_attribute = s.id_product_attribute" . (count($ids_warehouse) ? " AND wpl.id_warehouse IN(" . implode(", ", $ids_warehouse) . ")" : '') . ")"); goto Sxqx3; iEVQk: goto bUxWR; goto u6vdn; e1Jxa: $query->from("stock", "s"); goto ZbQKu; QtvCk: } public static function getCustomerCartRules($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null, $free_shipping_only = false, $highlight_only = false) { goto U7vtg; fdIoM: goto BwW1I; goto g9vWP; U7vtg: if (version_compare(_PS_VERSION_, "1.7.0.0", ">=")) { goto jECCA; } goto uIovd; uIovd: return self::_getCustomerCartRules($id_lang, $id_customer, $active, $includeGeneric, $inStock, $cart); goto fdIoM; VMw7s: BwW1I: goto jjYZb; GvUJs: return self::_getCustomerCartRules_17($id_lang, $id_customer, $active, $includeGeneric, $inStock, $cart, $free_shipping_only, $highlight_only); goto VMw7s; g9vWP: jECCA: goto GvUJs; jjYZb: } public static function _getCustomerCartRules_17($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null, $free_shipping_only = false, $highlight_only = false) { goto vAQkO; Ma8Kw: tiOW4: goto bJbkz; PkOAd: $sql_part1 = "* FROM `" . _DB_PREFIX_ . "cart_rule` cr
\x9\x9\x9\x9LEFT JOIN `" . _DB_PREFIX_ . "cart_rule_lang` crl ON (cr.`id_cart_rule` = crl.`id_cart_rule` AND crl.`id_lang` = " . (int) $id_lang . ")"; goto tZm6f; wy_3C: qT1HV: goto z1pj6; smZNw: return array(); goto bv3_S; JuhNw: $sql_part2 .= " AND free_shipping = 1 AND carrier_restriction = 1"; goto IIpMa; goI2G: $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql, true, false); goto DwwNd; vwZzY: $sql .= " UNION (SELECT " . $sql_part1 . " WHERE cr.`group_restriction` = 1 " . $sql_part2 . ")"; goto BRZoa; bJbkz: vJePV: goto tYXGa; VLIV_: foreach ($result as $key => $cart_rule) { goto po3vN; HAfH1: unset($result[$key]); goto JV21v; R5TeF: pCUe0: goto HAfH1; mrI_1: $cr = new CartRule((int) $cart_rule["id_cart_rule"]); goto MTstW; oFNm7: ijShG: goto YfmBm; po3vN: if (!$cart_rule["product_restriction"]) { goto ooM8c; } goto mrI_1; tZp_s: if (!($r !== false)) { goto pCUe0; } goto k4bZf; MTstW: $r = $cr->checkProductRestrictions(Context::getContext(), false, false); goto tZp_s; JV21v: ooM8c: goto oFNm7; k4bZf: goto ijShG; goto R5TeF; YfmBm: } goto Ma8Kw; ljwdM: if (!(isset($cart) && isset($cart->id))) { goto vJePV; } goto VLIV_; l6MGg: $result = $result_bak; goto CG7Uh; pwJwG: $sql = "(SELECT SQL_NO_CACHE " . $sql_part1 . " WHERE cr.`id_customer` = " . (int) $id_customer . " " . $sql_part2 . ")"; goto vwZzY; CG7Uh: cSRKy: goto Vl7H6; oQ5YT: foreach ($result as $key => $cart_rule) { goto D32eJ; VZWc9: foreach ($cartRuleShops as $cartRuleShop) { goto nxeBX; D2K5x: goto J5oiG; goto TtSyk; nxeBX: if (!(Shop::isFeatureActive() && $cartRuleShop["id_shop"] == (int) SCI::getSelectedShop())) { goto zZBoZ; } goto D2K5x; TtSyk: zZBoZ: goto OkLdh; OkLdh: XdmHD: goto pC7_1; pC7_1: } goto jFifX; WJSXN: P6RHt: goto oEklD; D32eJ: if (!$cart_rule["shop_restriction"]) { goto P6RHt; } goto iwqSN; iwqSN: $cartRuleShops = Db::getInstance()->executeS("SELECT id_shop FROM " . _DB_PREFIX_ . "cart_rule_shop WHERE id_cart_rule = " . (int) $cart_rule["id_cart_rule"]); goto VZWc9; jFifX: H1tSp: goto SjlL3; oEklD: J5oiG: goto aNTxz; SjlL3: unset($result[$key]); goto WJSXN; aNTxz: } goto si_1W; jDTil: drCkm: goto gexiH; M4GKW: Irnoh: goto goI2G; sRQ30: foreach ($result as $key => $cart_rule) { goto WA2yo; GdANI: RhbWB: goto iN5tf; SeK7a: foreach ($cartRuleGroups as $cartRuleGroup) { goto w3iLQ; h1MXd: WpGwQ: goto e4czr; w3iLQ: if (!in_array($cartRuleGroup["id_group"], $customerGroups)) { goto W7Pcd; } goto K9_B1; K9_B1: goto RhbWB; goto X85yZ; X85yZ: W7Pcd: goto h1MXd; e4czr: } goto yJtkX; WA2yo: if (!$cart_rule["group_restriction"]) { goto ZuBww; } goto Tlw4G; QZuv_: unset($result[$key]); goto Aei3K; Aei3K: ZuBww: goto GdANI; Tlw4G: $cartRuleGroups = Db::getInstance()->executeS("SELECT id_group FROM " . _DB_PREFIX_ . "cart_rule_group WHERE id_cart_rule = " . (int) $cart_rule["id_cart_rule"]); goto SeK7a; yJtkX: hvoqU: goto QZuv_; iN5tf: } goto ppcls; gexiH: unset($cart_rule); goto oQ5YT; lb2X5: $result = array(); goto G4i3H; z1pj6: if ($country_restriction) { goto cSRKy; } goto l6MGg; bv3_S: WV_ky: goto PkOAd; vAQkO: if (CartRule::isFeatureActive()) { goto WV_ky; } goto smZNw; BRZoa: if (!($includeGeneric && (int) $id_customer != 0)) { goto Irnoh; } goto w10iK; BkFZx: $sql_part2 .= " AND highlight = 1 AND code NOT LIKE "" . pSQL(CartRule::BO_ORDER_CODE_PREFIX) . "%""; goto YDhBc; Tnh0l: $customerGroups = Customer::getGroupsStatic($id_customer); goto sRQ30; E26xJ: if (!$free_shipping_only) { goto ryJJE; } goto JuhNw; w10iK: $sql .= " UNION (SELECT " . $sql_part1 . " WHERE cr.`id_customer` = 0 " . $sql_part2 . ")"; goto M4GKW; rYfkX: if (!$highlight_only) { goto TgNrc; } goto BkFZx; Vl7H6: return $result; goto hTaJM; DSORD: foreach ($result_bak as $key => $cart_rule) { goto kmqK0; aaq9w: V1W4Y: goto AvWFr; UJcR7: $countries = Db::getInstance()->ExecuteS("\xa                    SELECT `id_country`\xa                    FROM `" . _DB_PREFIX_ . "address`\xa                    WHERE `id_customer` = " . (int) $id_customer . "
                    AND `deleted` = 0"); goto ktPZv; bD2qO: goto TpAdB; goto DSmff; RdthT: $country_restriction = true; goto UJcR7; swdqP: foreach ($countries as $country) { goto YJoJB; HbRTm: if (!$id_cart_rule) { goto nWtgs; } goto FFdqn; FFdqn: $result[] = $result_bak[$key]; goto yFaO7; rvRLV: d4lVC: goto siJt8; YJoJB: $id_cart_rule = (bool) Db::getInstance()->getValue("
                            SELECT crc.id_cart_rule
                            FROM " . _DB_PREFIX_ . "cart_rule_country crc\xa                            WHERE crc.id_cart_rule = " . (int) $cart_rule["id_cart_rule"] . "\xa                            AND crc.id_country = " . (int) $country["id_country"]); goto HbRTm; yFaO7: goto Zhq0B; goto tiTBg; tiTBg: nWtgs: goto rvRLV; siJt8: } goto w0zTh; w0zTh: Zhq0B: goto aaq9w; dYfJR: mwdea: goto u4zBf; AvWFr: TpAdB: goto dYfJR; DSmff: Wjts6: goto RdthT; ktPZv: if (!(is_array($countries) && count($countries))) { goto V1W4Y; } goto swdqP; kmqK0: if ($cart_rule["country_restriction"]) { goto Wjts6; } goto dsFdF; dsFdF: $result[] = $result_bak[$key]; goto bD2qO; u4zBf: } goto wy_3C; tYXGa: $result_bak = $result; goto lb2X5; YDhBc: TgNrc: goto pwJwG; Jgsv0: return array(); goto QIIdq; si_1W: rhTtY: goto ljwdM; G4i3H: $country_restriction = false; goto DSORD; DwwNd: if (!empty($result)) { goto s0La7; } goto Jgsv0; QIIdq: s0La7: goto Tnh0l; tZm6f: $sql_part2 = " AND cr.date_from < "" . date("Y-m-d H:i:s") . ""
\x9\x9\x9\x9AND cr.date_to > "" . date("Y-m-d H:i:s") . ""
	\x9\x9	" . ($active ? "AND cr.`active` = 1" : '') . "
\x9	\x9	" . ($inStock ? "AND cr.`quantity` > 0" : ''); goto E26xJ; IIpMa: ryJJE: goto rYfkX; SFiwO: foreach ($result as &$cart_rule) { goto rNbNR; MkWtQ: $quantity_used += $cart->getDiscountsCustomer((int) $cart_rule["id_cart_rule"]); goto pYIB9; YPMtz: UhqTp: goto zBm1V; XvRcB: $cart_rule["quantity_for_user"] = 0; goto mVhIT; mVhIT: goto Hcabf; goto D6qos; D6qos: SDYqp: goto C4iD0; pYIB9: FQBGk: goto xjMOM; rNbNR: if ($cart_rule["quantity_per_user"]) { goto SDYqp; } goto XvRcB; C4iD0: $quantity_used = Order::getDiscountsCustomer((int) $id_customer, (int) $cart_rule["id_cart_rule"]); goto Nw0OI; GRjDB: Hcabf: goto YPMtz; xjMOM: $cart_rule["quantity_for_user"] = $cart_rule["quantity_per_user"] - $quantity_used; goto GRjDB; Nw0OI: if (!(isset($cart) && isset($cart->id))) { goto FQBGk; } goto MkWtQ; zBm1V: } goto jDTil; ppcls: zbhnp: goto SFiwO; hTaJM: } public static function _getCustomerCartRules($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null) { goto Zq5Ms; oixjF: unset($cart_rule); goto Uh1bk; ts424: foreach ($result as $cart_rule) { goto p7ncN; u4EE8: A9an3: goto lGP6m; qhhQe: if (!(isset($cart) && isset($cart->id))) { goto fhU7a; } goto cEqVB; iZEzs: goto G0rfS; goto u4EE8; jciM0: $cart_rule["quantity_for_user"] = $cart_rule["quantity_per_user"] - $quantity_used; goto ZwsnM; cEqVB: $quantity_used += $cart->getDiscountsCustomer((int) $cart_rule["id_cart_rule"]); goto UXLwb; XQqqD: $cart_rule["quantity_for_user"] = 0; goto iZEzs; lGP6m: $quantity_used = Order::getDiscountsCustomer((int) $id_customer, (int) $cart_rule["id_cart_rule"]); goto qhhQe; p7ncN: if ($cart_rule["quantity_per_user"]) { goto A9an3; } goto XQqqD; B7Xsj: uTY4W: goto m__kn; UXLwb: fhU7a: goto jciM0; ZwsnM: G0rfS: goto B7Xsj; m__kn: } goto S2nta; mW1z2: VU9tR: goto IlLug; S2nta: YxAgt: goto jKfKt; M00V1: PaV9j: goto u4Lwy; hd_jR: Ugizz: goto Wr0By; u4Lwy: $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS("
		SELECT *
		FROM `" . _DB_PREFIX_ . "cart_rule` cr\xa\x9	LEFT JOIN `" . _DB_PREFIX_ . "cart_rule_lang` crl ON (cr.`id_cart_rule` = crl.`id_cart_rule` AND crl.`id_lang` = " . (int) $id_lang . ")
	\x9WHERE (\xa\x9\x9\x9cr.`id_customer` = " . (int) $id_customer . "\xa	\x9	" . ($includeGeneric ? "OR cr.`id_customer` = 0" : '') . "\xa\x9	)\xa		" . ($active ? "AND cr.`active` = 1" : '') . "\xa		" . ($inStock ? "AND cr.`quantity` > 0" : '')); goto Ze9vp; ictXK: MEwiM: goto HB8Bp; HB8Bp: uTmSA: goto Ube_p; IlLug: return $result; goto R8Mw4; Zq5Ms: if (CartRule::isFeatureActive()) { goto PaV9j; } goto CaIk4; Wr0By: LUUX9: goto ts424; Ze9vp: if (!$includeGeneric) { goto LUUX9; } goto kYYIw; SPUs1: foreach ($result as $key => $cart_rule) { goto drTNN; drTNN: if (!$cart_rule["group_restriction"]) { goto FtDIi; } goto ZIy0z; QG3lK: uR1yK: goto Hu64F; WiOQq: unset($result[$key]); goto CouXT; timkI: YcU6h: goto WiOQq; ZIy0z: $cartRuleGroups = Db::getInstance()->executeS("SELECT id_group FROM " . _DB_PREFIX_ . "cart_rule_group WHERE id_cart_rule = " . (int) $cart_rule["id_cart_rule"]); goto yOpmR; yOpmR: foreach ($cartRuleGroups as $cartRuleGroup) { goto IVvH6; FxgH8: goto uR1yK; goto KPpdA; IVvH6: if (!in_array($cartRuleGroup["id_group"], $customerGroups)) { goto rKCqf; } goto FxgH8; bG43j: Fiytp: goto rDgWR; KPpdA: rKCqf: goto bG43j; rDgWR: } goto timkI; CouXT: FtDIi: goto QG3lK; Hu64F: } goto hd_jR; Ube_p: foreach ($result as $cart_rule) { goto Eh9HZ; UDJZP: Yo8AB: goto ss18W; yvDdZ: $cart_rule["minimal"] = $cart_rule["minimum_amount"]; goto sS_8W; h_jYX: goto qB5T8; goto yKbhU; vMVB8: SXzMd: goto W6h8V; R6UPO: if ($cart_rule["reduction_amount"] > 0) { goto CZiNS; } goto bphUy; yKbhU: CZiNS: goto Scu6C; sS_8W: $cart_rule["cumulable"] = !$cart_rule["cart_rule_restriction"]; goto qR8gG; ibFyd: THp7v: goto Fu3Xe; bphUy: goto qB5T8; goto ibFyd; Fu3Xe: $cart_rule["id_discount_type"] = Discount::FREE_SHIPPING; goto hrqo0; Scu6C: $cart_rule["id_discount_type"] = Discount::AMOUNT; goto iSjZ4; iSjZ4: $cart_rule["value"] = $cart_rule["reduction_amount"]; goto QA6ci; Eh9HZ: $cart_rule["value"] = 0; goto yvDdZ; QA6ci: qB5T8: goto vMVB8; ufpr1: if ($cart_rule["free_shipping"]) { goto THp7v; } goto i6VSM; i6VSM: if ($cart_rule["reduction_percent"] > 0) { goto Yo8AB; } goto R6UPO; qR8gG: $cart_rule["id_discount_type"] = false; goto ufpr1; XpTV4: $cart_rule["value"] = $cart_rule["reduction_percent"]; goto h_jYX; ss18W: $cart_rule["id_discount_type"] = Discount::PERCENT; goto XpTV4; hrqo0: goto qB5T8; goto UDJZP; W6h8V: } goto mW1z2; CaIk4: return array(); goto M00V1; Uh1bk: foreach ($result as $cart_rule) { goto aXuE2; arXen: $cartRuleShops = Db::getInstance()->executeS("SELECT id_shop FROM " . _DB_PREFIX_ . "cart_rule_shop WHERE id_cart_rule = " . (int) $cart_rule["id_cart_rule"]); goto YPeHO; T575p: unset($result[$key]); goto A1VUc; aXuE2: if (!$cart_rule["shop_restriction"]) { goto ihwNQ; } goto arXen; A1VUc: ihwNQ: goto AkgHO; YPeHO: foreach ($cartRuleShops as $cartRuleShop) { goto HJnLs; HJnLs: if (!(Shop::isFeatureActive() && $cartRuleShop["id_shop"] == (int) SCI::getSelectedShop())) { goto n0VJE; } goto ah0rs; ah0rs: goto R016j; goto VcKxV; t1ty6: FfO_Y: goto VQtLd; VcKxV: n0VJE: goto t1ty6; VQtLd: } goto GuWH2; AkgHO: R016j: goto tan8S; GuWH2: ovE1M: goto T575p; tan8S: } goto ictXK; kYYIw: $customerGroups = Customer::getGroupsStatic($id_customer); goto SPUs1; jKfKt: if (!version_compare(_PS_VERSION_, "1.6.0.0", ">=")) { goto uTmSA; } goto oixjF; R8Mw4: } public static function days_in_month($month, $year) { return $month == 2 ? $year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29)) : (($month - 1) % 7 % 2 ? 30 : 31); } public static function getProductQty($id_product, $id_product_attribute = null, $id_warehouse = null, $id_shop = null) { goto LGS3a; cqVRm: return $return; goto YFx5n; LGS3a: $return = 0; goto J89C_; R3CyK: PIAkp: goto qQF9B; J89C_: if (!empty($id_product)) { goto iidPq; } goto cqVRm; knY6Q: TsXhn: goto gmboX; qQF9B: return $return; goto ozeUW; YFx5n: iidPq: goto jmGrc; pdd9K: $return = self::_getProductQty($id_product, $id_product_attribute, $id_warehouse, $id_shop); goto L35Yu; gmboX: $return = self::_getProductAttributeQty($id_product, $id_product_attribute, $id_warehouse, $id_shop); goto R3CyK; jmGrc: if (!empty($id_product_attribute)) { goto TsXhn; } goto pdd9K; L35Yu: goto PIAkp; goto knY6Q; ozeUW: } public static function _getProductQty($id_product, $id_product_attribute = null, $id_warehouse = null, $id_shop = null) { goto dDVwp; H_6lY: $product = new Product($id_product); goto IrkdD; Thbr2: ggcP_: goto V4R4_; khbIX: goto xL3cp; goto xolwm; V4R4_: return $return; goto wxGso; JlLxt: goto xL3cp; goto gSruH; EVLB2: $usable_quantity = 0; goto Rnban; ACA9F: $type_advanced_stock_management = 3; goto mqZsX; FBup6: alZGp: goto lD0EC; zJV1a: $has_combination = false; goto cWqUR; Xd81w: $type_advanced_stock_management = 2; goto C_tbX; Pk7Cm: y5w6u: goto qV9Q4; aexp_: $query->where("id_warehouse = " . (int) $id_warehouse . ''); goto WP93O; NNRg1: $query->select("SUM(usable_quantity) as usable_quantity"); goto XsYHt; WP93O: $quantities = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); goto xWXms; mqZsX: t8gq2: goto R1aR8; dDVwp: $return = 0; goto Hb9WR; ptLK6: if (SCAS && $type_advanced_stock_management == 2 && $has_combination && !$not_in_warehouse) { goto Bu7sk; } goto uCRZq; rH2K7: $is_advanced_stock_management = true; goto Xd81w; X9YNM: if (!($product->advanced_stock_management == 1)) { goto Xz9tA; } goto rH2K7; A3vG5: goto xL3cp; goto p_doj; xhwSA: $quantities = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); goto LDGQT; x95u_: $query->from("stock_available"); goto eFjap; rh7N2: aTMjL: goto itHYT; trGru: goto xL3cp; goto Gl1Bv; z5OjZ: $query = StockAvailable::addSqlShopRestriction($query, (int) $id_shop); goto OdqCn; m0moR: $query->where("st.id_warehouse = " . (int) $id_warehouse . ''); goto Qm9T5; YUpVV: if (!empty($id_shop)) { goto frm5T; } goto VYB7i; RKGK6: $sql = "SELECT SUM(quantity) as quantity FROM " . _DB_PREFIX_ . "product_attribute WHERE id_product = " . (int) $id_product . " AND id_product_attribute != 0"; goto veTJT; LphdC: return $return; goto FBup6; veTJT: $ret = Db::getInstance()->ExecuteS($sql); goto j1lYl; qaCzB: if (version_compare(_PS_VERSION_, "1.5.0.0", ">=") && !$has_combination) { goto maIHS; } goto PrXua; ST5Qm: frm5T: goto W3foJ; zKAId: xL3cp: goto Sgs4u; Hb9WR: if (!empty($id_product)) { goto alZGp; } goto LphdC; R1aR8: Xz9tA: goto rh7N2; jHRQO: $query = new DbQuery(); goto p9iKt; XvCJU: if (!SCMS) { goto ZzvxR; } goto z5OjZ; Sgs4u: if (!empty($return)) { goto ggcP_; } goto vdSni; itHYT: if (!$product->hasAttributes()) { goto I6Tsp; } goto o513C; vdSni: $return = 0; goto Thbr2; DU30G: $not_in_warehouse = false; goto aO2ml; Gl1Bv: Bu7sk: goto S3Ax0; fmC0Y: kfa1z: goto RKGK6; uCRZq: if (SCAS && $type_advanced_stock_management == 2 && !$has_combination && !$not_in_warehouse) { goto D32Xj; } goto WXS0c; W3foJ: SVlNj: goto lyGnC; YdeAq: $query->select("SUM(st.usable_quantity) as usable_quantity"); goto H0mu2; OdqCn: ZzvxR: goto wIute; VYB7i: $id_shop = SCI::getSelectedShop(); goto ST5Qm; PPqN6: if (StockAvailable::dependsOnStock((int) $id_product, (int) SCI::getSelectedShop())) { goto t8gq2; } goto ACA9F; j1lYl: if (empty($ret[0]["quantity"])) { goto p36yk; } goto HJwfe; LDGQT: $return = $quantities["usable_quantity"]; goto A3vG5; XAmcU: $type_advanced_stock_management = 1; goto H4HVl; lyGnC: if (version_compare(_PS_VERSION_, "1.5.0.0", ">=")) { goto lTcr6; } goto H_6lY; C3WU4: $query->where("id_product = " . (int) $id_product); goto CQYH7; TUxdv: $query->where("id_product_attribute != 0"); goto XvCJU; XsYHt: $query->from("stock"); goto Rbq1L; gSruH: T_wP1: goto zk0n9; GEl7C: $query = StockAvailable::addSqlShopRestriction($query, (int) $id_shop); goto Pk7Cm; eFjap: $query->where("id_product = " . (int) $id_product); goto TUxdv; HJwfe: $return = $ret[0]["quantity"]; goto xyacM; xWXms: $return = $quantities["usable_quantity"]; goto JlLxt; gjq66: $product = new Product($id_product, false, null, (int) $id_shop); goto d3Ex1; o513C: $has_combination = true; goto gfSTH; Qm9T5: $query->where("st.id_product_attribute != 0"); goto xhwSA; WXS0c: if (SCAS && $type_advanced_stock_management == 2 && $not_in_warehouse) { goto T_wP1; } goto z7DSo; y0R7Y: goto xL3cp; goto Ri1hE; xolwm: maIHS: goto jHRQO; Rbq1L: $query->where("id_product = " . (int) $id_product . ''); goto aexp_; xyacM: p36yk: goto zKAId; S0BPP: lTcr6: goto gjq66; cf5q4: $id_warehouse = (int) SCI::getSelectedWarehouse(); goto zveN3; p_doj: D32Xj: goto ChyhU; z7DSo: if (version_compare(_PS_VERSION_, "1.5.0.0", ">=") && $has_combination) { goto OiVmm; } goto qaCzB; C_tbX: $temp_check_in_warehouse = WarehouseProductLocation::getIdByProductAndWarehouse((int) $id_product, 0, (int) $id_warehouse); goto LgOzi; p9iKt: $query->select("quantity"); goto eIBA9; lD0EC: if (!SCMS) { goto SVlNj; } goto YUpVV; d3Ex1: Q_kNg: goto ZgLWh; qV9Q4: $return = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto oXeVr; LgOzi: if (empty($temp_check_in_warehouse)) { goto cD4Gi; } goto DU30G; Rnban: if (!SCAS) { goto aTMjL; } goto X9YNM; IrkdD: goto Q_kNg; goto S0BPP; CRlfj: if (!SCMS) { goto y5w6u; } goto GEl7C; cWqUR: $not_in_warehouse = true; goto Uut9j; wIute: $return = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto khbIX; ZgLWh: if (!(SCAS && empty($id_warehouse))) { goto PnGMA; } goto cf5q4; YFJYp: $return = $product->quantity; goto trGru; UWgKM: $query = new DbQuery(); goto hCBvd; hCBvd: $query->select("SUM(quantity)"); goto x95u_; oXeVr: goto xL3cp; goto fmC0Y; zveN3: PnGMA: goto XAmcU; Uut9j: $without_warehouse = true; goto EVLB2; aO2ml: cD4Gi: goto PPqN6; oDYoh: $query->where("st.id_product = " . (int) $id_product . ''); goto m0moR; gfSTH: I6Tsp: goto ptLK6; H4HVl: $is_advanced_stock_management = false; goto zJV1a; Ri1hE: OiVmm: goto UWgKM; H0mu2: $query->from("stock", "st"); goto oDYoh; PrXua: if (version_compare(_PS_VERSION_, "1.5.0.0", "<") && $has_combination) { goto kfa1z; } goto YFJYp; zk0n9: $return = 0; goto y0R7Y; eIBA9: $query->from("stock_available"); goto C3WU4; ChyhU: $query = new DbQuery(); goto NNRg1; CQYH7: $query->where("id_product_attribute = 0"); goto CRlfj; S3Ax0: $query = new DbQuery(); goto YdeAq; wxGso: } public static function _getProductAttributeQty($id_product, $id_product_attribute = null, $id_warehouse = null, $id_shop = null) { goto UTPIf; G59EY: Znny7: goto nJAHF; EqV3C: if (!SCMS) { goto Znny7; } goto zStE3; aNQcX: MLaKz: goto GoqA1; ugue0: $id_shop = SCI::getSelectedShop(); goto Uo0E9; We7St: $query = StockAvailable::addSqlShopRestriction($query, (int) $id_shop); goto qPHPr; uvgp5: $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS("\xa\x9\x9	\x9SELECT quantity
\x9\x9	\x9FROM `" . _DB_PREFIX_ . "product_attribute`
\x9\x9		WHERE id_product_attribute = "" . (int) $id_product_attribute . """); goto vk_J8; qrF5U: Meu6O: goto H0KzN; oNrYa: tslkJ: goto K6bQK; lA0VY: $query->where("id_product_attribute = " . (int) $id_product_attribute); goto EqV3C; RGUox: if (!(SCAS && empty($id_warehouse))) { goto wyGRx; } goto hftN2; qPHPr: F4Xuo: goto Emi0o; vLUNv: RaKnZ: goto olzMh; A6HjZ: $temp_check_in_warehouse = WarehouseProductLocation::getIdByProductAndWarehouse((int) $id_product, (int) $id_product_attribute, (int) $id_warehouse); goto Wb6co; cEIJz: rVCSO: goto k2I1n; UTPIf: $return = 0; goto qznkQ; kBxx8: $quantities = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); goto cMvfd; H0KzN: if (SCAS && $type_advanced_stock_management == 2 && !$not_in_warehouse) { goto p8dPD; } goto sD278; GAooi: $combination->quantity = 0; goto Rw5sm; XqiK_: if (version_compare(_PS_VERSION_, "1.5.0.0", ">=")) { goto F9Z7l; } goto uvgp5; GoqA1: if (!empty($return)) { goto Ni9Ad; } goto fyGHh; EmaGf: $is_advanced_stock_management = false; goto wXKkS; qznkQ: if (!empty($id_product)) { goto g0X9h; } goto LVRMC; nkK0V: return $return; goto Utn_D; OTXWi: $return = $combination->quantity; goto CXUz4; LVRMC: return $return; goto iPIUW; GZb5_: if (!SCAS) { goto Meu6O; } goto sXg5T; ONn7P: goto MLaKz; goto cEIJz; VnSY1: tbTLS: goto qrF5U; efh7B: $type_advanced_stock_management = 3; goto pCIec; sD278: if (SCAS && $type_advanced_stock_management == 2 && $not_in_warehouse) { goto i3JU4; } goto V3EBS; HjH3q: $combination->quantity = (int) $result[0]["quantity"]; goto NH77u; suSNt: $query->from("stock", "st"); goto Jno6N; d_M4x: Ni9Ad: goto nkK0V; DhziG: F9Z7l: goto OiE6R; zStE3: $query = StockAvailable::addSqlShopRestriction($query, (int) $id_shop); goto G59EY; toDRX: jvVnQ: goto HjH3q; Ds9cH: $query->where("id_product = " . (int) $id_product); goto lA0VY; V3EBS: if ((!SCAS || SCAS && $type_advanced_stock_management == 1) && version_compare(_PS_VERSION_, "1.5.0.0", ">=")) { goto rVCSO; } goto XqiK_; fkLGn: p8dPD: goto JYMj0; u_A6R: wyGRx: goto EmaGf; VAflk: $is_advanced_stock_management = true; goto kZEwM; k2I1n: $query = new DbQuery(); goto EvStt; ZneHY: $query->where("id_product = " . (int) $id_product); goto UfR1F; aOEdX: if (!SCMS) { goto F4Xuo; } goto We7St; sXg5T: if (!($product->advanced_stock_management == 1)) { goto GDJ01; } goto VAflk; RpH1k: goto Arpd7; goto vLUNv; Wb6co: if (empty($temp_check_in_warehouse)) { goto tbTLS; } goto ocxmB; ocxmB: $not_in_warehouse = false; goto FZvp2; Oy1jx: if (!empty($result[0]["quantity"]) && is_numeric($result[0]["quantity"])) { goto jvVnQ; } goto GAooi; vk_J8: $combination = new stdClass(); goto Oy1jx; nGm1F: i3JU4: goto qzoDg; qzoDg: $return = 0; goto ONn7P; EvStt: $query->select("SUM(quantity)"); goto eZyMr; hftN2: $id_warehouse = (int) SCI::getSelectedWarehouse(); goto u_A6R; cZ7vC: $without_warehouse = true; goto GZb5_; Uo0E9: TTyYy: goto yUxsc; OiE6R: $query = new DbQuery(); goto F6psI; iMqqB: if (StockAvailable::dependsOnStock((int) $id_product, (int) $id_shop)) { goto d6LKM; } goto efh7B; K6bQK: goto MLaKz; goto fkLGn; CXUz4: goto tslkJ; goto DhziG; KNHXP: Arpd7: goto RGUox; NH77u: TUm5y: goto OTXWi; kZEwM: $type_advanced_stock_management = 2; goto iMqqB; wXKkS: $type_advanced_stock_management = 1; goto h1zWb; F6psI: $query->select("quantity"); goto j4UuQ; AtCFB: if (!SCMS) { goto mTQMp; } goto u8_a3; Rw5sm: goto TUm5y; goto toDRX; lMona: if (version_compare(_PS_VERSION_, "1.5.0.0", ">=")) { goto RaKnZ; } goto Kun7_; cMvfd: $return = $quantities["usable_quantity"]; goto D0Sjq; OF7wI: $query->where("st.id_warehouse = " . (int) $id_warehouse . ''); goto xVRaI; u8_a3: if (!empty($id_shop)) { goto TTyYy; } goto ugue0; nJAHF: $return = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto oNrYa; olzMh: $product = new Product($id_product, false, null, (int) $id_shop); goto KNHXP; Kun7_: $product = new Product($id_product); goto RpH1k; fyGHh: $return = 0; goto d_M4x; JYMj0: $query = new DbQuery(); goto kHk4U; nhPBk: GDJ01: goto A6HjZ; kHk4U: $query->select("SUM(st.usable_quantity) as usable_quantity"); goto suSNt; Emi0o: $return = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto aNQcX; j4UuQ: $query->from("stock_available"); goto Ds9cH; xVRaI: $query->where("st.id_product_attribute = " . (int) $id_product_attribute . ''); goto kBxx8; eZyMr: $query->from("stock_available"); goto ZneHY; Jno6N: $query->where("st.id_product = " . (int) $id_product . ''); goto OF7wI; D0Sjq: goto MLaKz; goto nGm1F; FZvp2: $without_warehouse = false; goto VnSY1; UfR1F: $query->where("id_product_attribute = " . (int) $id_product_attribute); goto aOEdX; pCIec: d6LKM: goto nhPBk; yUxsc: mTQMp: goto lMona; h1zWb: $not_in_warehouse = true; goto cZ7vC; iPIUW: g0X9h: goto AtCFB; Utn_D: } static function roundPrice($price, $modif_type) { goto zHXb_; wsfEL: if ($modif_type == "6") { goto knSfT; } goto WoIaH; uvN7W: qiWYE: goto OPR4m; Bj2Hc: AqwOz: goto vEbz2; RFfh4: if ($modif_type == "1") { goto XQUdo; } goto pVZeE; NSbK4: if ($decimal >= 0 && $decimal <= 49) { goto BMdpf; } goto CpmR1; CondM: YTvvw: goto ZY0Wg; FjISD: if ($round_type == "1") { goto pPHQW; } goto FBMwG; f9IYt: if ($round_type == "1") { goto MLE1A; } goto rHdVA; fKPDN: $return = $unite; goto bTEjq; KUTC4: goto OrYT_; goto BLnad; BaYJF: goto fTTAL; goto KzbcY; eaz2c: goto u3LrH; goto SAfVs; qKd9Y: list($return, $decimal_part) = explode(".", $return); goto Kvuau; EUsLx: goto I1jiw; goto Ej1QU; tA2kF: $return -= 1; goto x4J7T; p4ynK: goto yXaP_; goto ILRJh; M_Sb8: $return = $return / 10; goto kTUOl; cmsDc: list($unite, $decimal) = explode(".", $return); goto UufRM; ZY0Wg: $return = ceil($return); goto GubK8; LjA0F: TNen8: goto x6ETc; Kvuau: list($other, $chiffre) = explode(".", $return / 100); goto LYJUu; bgCrl: if (!($return >= 100)) { goto Qrrcb; } goto MjLNf; CpmR1: if ($decimal >= 50 && $decimal <= 99) { goto e3CTY; } goto i4eqy; iBFM8: if (empty($round_type)) { goto wua7e; } goto D7w6m; eeQ0P: if (empty($round_type)) { goto ACgZw; } goto kYZLU; zDD1g: if (empty($round_type)) { goto Etcjj; } goto u9uE9; V9AuG: HzdGK: goto hRR1b; oEmuF: list($unite, $decimal) = explode(".", $return); goto dN7xi; Y18Wk: $decimal = 0; goto SQH52; qzkFc: BMdpf: goto lYRGQ; bHMIM: $return = floor($return); goto UYUVZ; PGQPt: goto UhYSD; goto ghnpw; LYJUu: if (!(strlen($chiffre) == 1)) { goto l6f5a; } goto xW0oC; ch79a: $return = round($return); goto xLUY_; dtjaF: if ($decimal >= 1 && $decimal <= 4) { goto rywv5; } goto b7Zze; v1z_r: if (!($round_type == "1")) { goto BlE8X; } goto YuZca; SMMwg: goto AqwOz; goto wj_Xh; Vd1zI: if (empty($round_type)) { goto Ek3wk; } goto Y5Uav; YuZca: $return = str_replace(",", ".", $return * 1000000); goto Qos7w; ZS9gb: $return = round($return); goto zBC7n; XcYwO: $return = round($return); goto lweKC; hq23k: $decimalReturn = 95; goto UyHSg; KuH5Q: pVjBR: goto LZlaL; Q5qtL: if (!($round_type == "1")) { goto KOBKG; } goto C0tHk; l5sdN: goto UikEm; goto yzoCP; Nip3I: $decimal = 0; goto yP9C3; py7vy: SU1sz: goto hL5sL; sWK8n: if ($decimal >= 0 && $decimal <= 24) { goto E9Jll; } goto fa1YQ; pRe0K: $decimal = 0; goto xUN8U; oTJfd: Ejh6I: goto HV8EL; xpKCj: $decimal = 0; goto bhn_p; Ux1X6: $decimal = 0; goto l5sdN; izilA: if ($round_type == "2") { goto rxnhg; } goto s_tRb; hwe14: $decimal = 0; goto Zid3T; U3Bm1: nauyC: goto E7NrQ; SZln2: rywv5: goto IBUdF; B0vYI: if ($round_type == "2") { goto R5Ozp; } goto sdERU; gN6Hx: $decimal = $decimal . "0"; goto hAjsi; usCEd: goto KqF0s; goto gSXbL; lKI6O: goto VH1YJ; goto g2AYj; LcyjF: if (!($round_type == "1")) { goto vFHeb; } goto sd00q; V5D0i: goto KqF0s; goto y0D1g; Ew4ke: goto iOCF9; goto yETa8; hJpN0: $return = $unite + 2; goto bKOUa; JjgiM: pysPb: goto evIIw; X71_K: goto yPtR8; goto TvOqQ; YoFAI: $decimal = 0; goto eYYRg; HV8EL: $unite += 1; goto bqEVx; FI2lq: ObmiO: goto U99TF; eSwVi: goto AqwOz; goto EIF0F; JU54w: Y44bl: goto fzvGa; o2c9p: RVDIt: goto hbz8S; BRcLp: if ($decimal >= 6 && $decimal <= 9) { goto wSrJD; } goto SwFPp; x6ETc: if ($realDecimal > 95 && $realDecimal <= 99) { goto Hpfk9; } goto uVqpL; PTp9M: xmZDQ: goto n5wSu; sd00q: $return = str_replace(",", ".", $return * 1000000); goto CAd40; g1dy8: UikEm: goto hzxAO; MjLNf: $return = str_replace(",", ".", $return); goto qKd9Y; Kz283: TOjLs: goto yNl1J; kTxsQ: $return = round($return); goto jkSNk; lOS6w: goto AqwOz; goto V9AuG; awbGR: goto OrYT_; goto lSF5L; ND89m: goto ObmiO; goto SGmJj; iGpJK: $return = str_replace(",", ".", $return * 1000000); goto Ol5yp; Sucbv: J0wRF: goto pRe0K; P_fXi: $return = $return / 100; goto CFmk8; q4_2U: goto SU1sz; goto CJqGk; mHAcg: if ($chiffre >= 5 && $chiffre <= 9.999999999) { goto zEVMx; } goto Q3l3T; J7EGD: J7RbH: goto EIsNd; hQxrA: jbqwh: goto O4O8Q; vSHYi: $return = $unite + 1; goto oI1KA; Z5_8u: if (empty($round_type)) { goto qn6t_; } goto lxMhF; idnUR: g2ntT: goto tI0vb; fxxD0: sb_cn: goto fmO1C; OMjTo: $return = floor($return); goto X10AH; yCfSR: LxD4r: goto I9kke; xgE5C: list($unite, $decimal) = explode(".", $return); goto iBFM8; vRV6t: goto KEfjD; goto QtW5Y; yP9C3: OrYT_: goto RvN2D; Z3Lbq: goto BRwsY; goto BL1Xu; sZXui: PTGQ5: goto NSbK4; YXDF7: iOCF9: goto Vaj1n; j4RZC: if ($round_type == "1") { goto l9OlP; } goto sew1J; oI1KA: goto pHh0R; goto iAJUf; DjAn7: goto lRxe4; goto oTJfd; BD3N8: $decimal = 0; goto EUaGU; beS2n: ACgZw: goto jgstz; DXu94: $return = ceil($return); goto IzUd5; ncZqc: if ($decimal >= 1 && $decimal <= 5) { goto nauyC; } goto BRcLp; KFO8w: q_iVD: goto Nzo0N; b_Tk6: $return -= 1; goto BApps; dQmLy: aMVy7: goto QLra0; V7ZnQ: if ($modif_type == "4") { goto MoMNq; } goto qLby3; IJlxJ: Utv3N: goto atiAa; Q_jpz: goto JLuPz; goto gI6rU; pVZeE: if ($modif_type == "2") { goto A2YrN; } goto u4_3Z; uELyc: $decimalReturn = "0" . $decimalReturn; goto JeNxm; UkIqh: if ($round_type == 1) { goto TNen8; } goto a6qmS; fa1YQ: if ($decimal >= 25 && $decimal <= 74) { goto IqmHX; } goto ko8NA; x0rOW: goto iOCF9; goto QF0oQ; atiAa: $decimalReturn = 0; goto s8Ad_; rDlSh: $decimal = 0; goto agsao; Q2xQe: e3CTY: goto yvCjL; n04nd: goto cLVGt; goto LjA0F; KzbcY: M1b5S: goto iUNRe; zm68F: $chiffre = ($chiffre . "." . $decimal_part) * 1; goto ZalFu; E_xgM: if ($round_type == "1") { goto sb_cn; } goto B0vYI; lHLU1: I4qJC: goto Gm9rZ; xc6Wx: $return = str_replace(",", ".", $return * 100); goto ksLa2; n_fmA: KOBKG: goto X3mSC; jLH2w: goto yXaP_; goto SSSEI; AGTvE: goto AqwOz; goto IJlxJ; yvCjL: $unite += 1; goto j2Ixp; D7w6m: if ($round_type == "1") { goto RVDIt; } goto zIz8i; n824Q: pvdx9: goto EDG9t; aPBYr: $return = $unite / 1000000; goto qio0V; g2AYj: DVbHl: goto BD3N8; G7Lqy: SR8Xo: goto XcYwO; Zid3T: UhYSD: goto S9RYt; Gm9rZ: if ($decimal >= 0 && $decimal <= 48) { goto DVbHl; } goto fyfyG; eCb7i: l6f5a: goto zm68F; cWD7H: if ($decimal >= 50) { goto Y44bl; } goto TlvA7; j_enA: F2KiR: goto omYGH; x4J7T: Qrrcb: goto AGTvE; evIIw: $return = floor($return); goto Teetq; UufRM: if (!(strlen($decimal) == 1)) { goto NJMw4; } goto ZmtIp; KV8q9: goto BRwsY; goto SZln2; WD3on: $return = ($unite . "." . $decimal) * 1 / 10; goto fzp7g; j0I1h: $decimalReturn = 5; goto EK1Ni; iAJUf: dZ24F: goto hJpN0; lSF5L: NiUNw: goto Y18Wk; tCxNl: BRwsY: goto hQxrA; fzp7g: goto AqwOz; goto fI2Ig; uOkJ8: knSfT: goto LcyjF; COurn: if ($decimal >= 5 && $decimal <= 9) { goto fSZ6b; } goto n6xzt; Ko7_d: $decimal = 0; goto vRV6t; tqyq2: if (!($round_type == "1")) { goto Lb2Ui; } goto iGpJK; TRvG_: $return = $return * 10; goto b91Os; UyHSg: jtYad: goto n04nd; dwnL6: wyzWH: goto E5Tjc; lt0px: $decimal = 5; goto mrnqw; uYKwT: if ($round_type == "1") { goto TOjLs; } goto OmMWW; jvHpI: TYs0x: goto sJlZG; LZlaL: if ($decimal >= 50) { goto yVvi2; } goto qiKm2; s_tRb: goto aMVy7; goto KFO8w; ORTlg: goto aMVy7; goto X1ATb; WoIaH: if ($modif_type == "7") { goto UhYRq; } goto LXOuq; RvN2D: goto jbqwh; goto s2hNA; NFoEK: $return = $unite / 1000000; goto DGndj; yNl1J: $return = ceil($return); goto q4_2U; kagZ8: nJyxj: goto ch79a; eZ536: $return = str_replace(",", ".", $return * 1000000); goto R7ZwS; b91Os: if (empty($round_type)) { goto CytsB; } goto Ts4nB; U99TF: JLuPz: goto eJ4Vr; PWrTx: if ($decimal >= 8 && $decimal <= 9) { goto MvxJ1; } goto awbGR; qz_Ht: KEfjD: goto E5xtA; mk5Z0: $return = $unite + 1; goto H9M5u; ZGOsM: $decimalReturn = 5; goto lOZGI; S9RYt: goto jbqwh; goto EfFnM; GGQZo: goto lRxe4; goto i39Pm; eeEW7: ti6ur: goto KR54_; lsTAI: $decimalReturn = 5; goto uELyc; VPdJb: pPHQW: goto mk5Z0; LXOuq: if ($modif_type == "8") { goto HzdGK; } goto ucm1x; j7d3y: $return = str_replace(",", ".", $return * 10); goto sX8Rx; tYld0: vFHeb: goto xc6Wx; DdvuS: lRxe4: goto XWnQw; Ygjy0: $unite = 1; goto ohATk; VzZsD: $return = $unite / 1000000; goto pYBJz; nRBeq: $decimal = 0; goto X71_K; KrSQO: if ($round_type == "2") { goto ZHG2T; } goto WSlFw; Qos7w: list($unite, $decimal) = explode(".", $return); goto SRoHS; lt4xk: $return = floor($return); goto cTGsV; zIz8i: if ($round_type == "2") { goto ti6ur; } goto EUsLx; tWj36: goto u3LrH; goto lHLU1; E5xtA: I1jiw: goto WD3on; uVqpL: $decimalReturn = 95; goto pgjIG; sszhV: $unite += 1; goto hwe14; cTGsV: H1qsn: goto BeLVq; oOqJL: if ($decimal == 99) { goto dlotz; } goto lKI6O; u7pW6: $decimal = 5; goto tCxNl; yUKWb: if ($round_type == "2") { goto gZsNs; } goto pb3TU; ToFpP: if (!(strlen($decimal) == 1)) { goto Ow7MK; } goto gN6Hx; KR54_: if ($decimal >= 1 && $decimal <= 4) { goto VG14F; } goto COurn; n6xzt: goto KEfjD; goto Jq5Cd; iRFWe: A2YrN: goto v1z_r; rp24w: if ($chiffre >= 50 && $chiffre <= 99.999999999) { goto zC4UV; } goto iInFk; ggQGg: $return -= 1; goto DSWTO; nIbEt: if (empty($round_type)) { goto RLHJo; } goto uYKwT; ypKgR: list($unite, $decimal) = explode(".", $return); goto ToFpP; hbz8S: if ($decimal >= 1 && $decimal <= 5) { goto OCi8I; } goto LQHH_; QtW5Y: fSZ6b: goto onND7; E1DnY: $decimal = $decimal . "0"; goto aF15P; sQPvr: $return = round($return); goto jLH2w; lwyyX: $decimal = 0; goto yCfSR; MlS6E: $decimal = 5; goto waJRu; lweKC: goto fTTAL; goto cqcIA; n5wSu: goto JLuPz; goto VPdJb; pb3TU: goto iOCF9; goto KuH5Q; g8jWY: Xu19V: goto AdKcp; R7ZwS: list($unite, $decimal) = explode(".", $return); goto aPBYr; yzoCP: UXMV4: goto lt0px; EUaGU: goto VH1YJ; goto NzR_R; c21Ys: if ($round_type == "2") { goto Mfz4e; } goto Cs3ZW; rlgZr: if ($decimal > 90) { goto dZ24F; } goto vSHYi; hzxAO: goto I1jiw; goto o2c9p; fsZfF: yPtR8: goto O2Fjr; ghnpw: wSrJD: goto sszhV; cDyFS: if ($round_type == "1") { goto EBOyR; } goto yUKWb; QzIJQ: $unite = 1; goto xpKCj; vEbz2: ebZGM: goto DNCpa; j2Ixp: $decimal = 0; goto Evuh7; sE_H3: yVvi2: goto ZJwJT; qhgKB: UhYRq: goto afseC; A4OjW: $return = round($return); goto ytXPJ; ko8NA: if ($decimal >= 75 && $decimal <= 99) { goto Ejh6I; } goto GGQZo; uP43s: $return = str_replace(",", ".", $return * 1000000); goto oEmuF; ThoaK: if (!(!empty($price) && !empty($modif_type))) { goto ebZGM; } goto x2Lyv; EIF0F: W4e6a: goto qRYOK; fhTVQ: goto lRxe4; goto w5aZy; yWJ7I: $chiffre = ($chiffre . "." . $decimal_part) * 1; goto Vd1zI; xW0oC: $chiffre = $chiffre . "0"; goto eCb7i; UC6JI: list($return, $decimal_part) = explode(".", $return); goto o2Tf8; BApps: goto AqwOz; goto g5_7F; SAfVs: Etcjj: goto sWK8n; x2Lyv: $round_type = _s("CAT_ROUND_PRICE"); goto RFfh4; wj_Xh: sp8PJ: goto Q5qtL; waJRu: goto VH1YJ; goto RuGhf; sdERU: goto yPtR8; goto uvN7W; hL5sL: goto AqwOz; goto iRFWe; NGltZ: if ($decimal >= 3 && $decimal <= 7) { goto ABUqA; } goto PWrTx; hhbCC: $decimal = 5; goto KUTC4; PfUxQ: ZHG2T: goto MW41T; I9kke: goto I1jiw; goto eeEW7; qiKm2: $return = $unite; goto S4s5r; RVYK7: TJqub: goto s7jWG; RuGhf: dlotz: goto fpNEn; lOZGI: $decimalReturn = "0" . $decimalReturn; goto VQcrc; S7SaC: if ($round_type == "2") { goto FXVUm; } goto V5D0i; rJ9zh: if ($round_type == "2") { goto FUKNI; } goto tyFq7; fpNEn: $unite += 1; goto Zw3XL; Qrv9c: if ($decimal >= 8 && $decimal <= 9) { goto TYs0x; } goto CkIrh; CCqBR: if ($round_type == "2") { goto hrdsA; } goto p4ynK; a6qmS: if ($round_type == 2) { goto g2ntT; } goto gs66l; UYUVZ: KqF0s: goto tvFn_; Zw3XL: $decimal = 0; goto AXkxX; lwFRs: $realDecimal = substr($decimal, 0, 2); goto Ulwre; FBMwG: if ($round_type == "2") { goto F2KiR; } goto Q_jpz; iInFk: goto rt6C0; goto RVYK7; AdKcp: $unite += 1; goto lwyyX; sX8Rx: if (empty($round_type)) { goto UUgIL; } goto KfphS; GubK8: goto H1qsn; goto i2Yl0; fmO1C: $unite = 1; goto nRBeq; k0uqU: if ($modif_type == "10") { goto Utv3N; } goto e85e2; Solwc: hrdsA: goto OMjTo; i4eqy: goto LUBr8; goto qzkFc; Re29Y: if (!($round_type == "1")) { goto n_gIr; } goto uP43s; EfFnM: FUKNI: goto dtjaF; SGmJj: YKOLA: goto yWEdp; fbFOX: AjKvh: goto Ux1X6; mrnqw: goto UikEm; goto jvHpI; EDG9t: cLVGt: goto Ajipu; w5aZy: IqmHX: goto hPr0k; dDRmK: $return = $return / 100; goto ypKgR; l1eTs: $unite = 1; goto YoFAI; Mu2Zk: rxnhg: goto J6iQk; PTVnA: list($unite, $decimal) = explode(".", $return); goto E3_LB; X1ATb: vzmrR: goto NZdpf; XWnQw: goto u3LrH; goto sZXui; KTpPX: vRYDL: goto hq23k; Cg54G: n_gIr: goto nIbEt; H9M5u: goto JLuPz; goto j_enA; SRoHS: $return = $unite / 1000000; goto Axwza; O4O8Q: $return = ($unite . "." . $decimal) * 1; goto SMMwg; ZNLPo: qao4P: goto aiwAH; X3mSC: $return = str_replace(",", ".", $return * 100); goto Z5_8u; aF15P: k2cXn: goto Vg6Xx; OOH7A: if (empty($round_type)) { goto nJyxj; } goto f9IYt; e85e2: goto AqwOz; goto qbNKa; W0kuX: Hpfk9: goto gKvIz; g5_7F: WehrF: goto YPYSV; KfphS: if ($round_type == "1") { goto CGLyv; } goto CCqBR; CFmk8: $return = str_replace(",", ".", $return * 10); goto xgE5C; X10AH: yXaP_: goto M_Sb8; KUo4K: $return = ($unite . "." . $decimal) * 1; goto kz8xj; J6iQk: $return = floor($return); goto dQmLy; ksLa2: if (empty($round_type)) { goto q_iVD; } goto DkLxy; i3ula: l020U: goto x0rOW; jVFCo: $decimal = 0; goto g1dy8; BLnad: MvxJ1: goto PsK9E; E7NrQ: $decimal = 5; goto PGQPt; onND7: $decimal = 5; goto qz_Ht; fZU5M: $decimal = 0; goto fsZfF; NZdpf: $return = ceil($return); goto DIPpU; G_WO2: if ($decimal >= 0 && $decimal <= 2) { goto AjKvh; } goto TL7Yq; qbNKa: XQUdo: goto Re29Y; O2Fjr: $return = ($other + $unite . "00") * 1; goto tA2kF; y654n: Ek3wk: goto NX7vD; QLra0: $return = $return / 100; goto kptvk; EDo9P: goto xmZDQ; goto JU54w; ZalFu: if (empty($round_type)) { goto qiWYE; } goto E_xgM; TPzp0: yiGUM: goto Ygjy0; jgstz: if ($decimal >= 0 && $decimal <= 2) { goto NiUNw; } goto NGltZ; TUHXT: $decimal = 0; goto fhTVQ; xUN8U: goto GqtzO; goto bBJS7; VQcrc: goto pvdx9; goto noMwD; ytXPJ: goto H1qsn; goto CondM; bTEjq: goto a9w0E; goto J7EGD; kptvk: list($unite, $decimal) = explode(".", $return); goto ZCohh; lxMhF: if ($round_type == "1") { goto YTvvw; } goto c21Ys; R3DDO: goto yPtR8; goto fxxD0; ms44S: goto fTTAL; goto G7Lqy; kYZLU: if ($round_type == "1") { goto TKMgb; } goto rJ9zh; pYBJz: Lb2Ui: goto j7d3y; ZmtIp: $decimal = $decimal . "0"; goto I9PJ0; Y5Uav: if ($round_type == "1") { goto yiGUM; } goto KrSQO; DNCpa: return $return; goto BHygx; hRR1b: $unite = 0; goto rDlSh; DGndj: fu0di: goto yVKjT; iUNRe: $return = floor($return); goto SmtKV; AWwdE: OCi8I: goto FvPmT; jA10P: goto AqwOz; goto uOkJ8; Axwza: BlE8X: goto TRvG_; uXBw6: list($unite, $decimal) = explode(".", $return); goto NFoEK; WSlFw: goto wyzWH; goto y654n; kTUOl: $return = str_replace(",", ".", $return); goto fVey_; l8PpD: goto nh5rQ; goto JjgiM; xLUY_: goto nh5rQ; goto m45Oz; gKvIz: $return += 1; goto j0I1h; fVey_: list($unite, $decimal) = explode(".", $return); goto eeQ0P; DSWTO: $decimalReturn = 95; goto n824Q; CkIrh: goto UikEm; goto fbFOX; EIsNd: $return = $unite + 1; goto RBZ1E; s8Ad_: $return = str_replace(",", ".", $return); goto FSGXq; eJ4Vr: $return -= 0.01; goto hmh2m; zHXb_: $return = $price; goto ThoaK; Ew_BW: u3LrH: goto KUo4K; qLby3: if ($modif_type == "5") { goto sp8PJ; } goto wsfEL; eI3FA: $return = $unite; goto ND89m; hAjsi: Ow7MK: goto zDD1g; qRYOK: if (!($round_type == "1")) { goto fu0di; } goto m78go; C0tHk: $return = str_replace(",", ".", $return * 1000000); goto PTVnA; p1cdj: goto LxD4r; goto AWwdE; m45Oz: MLE1A: goto yjK0d; EguyM: if (empty($round_type)) { goto SR8Xo; } goto j4RZC; fI2Ig: MoMNq: goto tqyq2; jkSNk: goto SU1sz; goto Kz283; QF0oQ: EBOyR: goto rlgZr; AXkxX: VH1YJ: goto Ew_BW; s7jWG: $decimal = 0; goto L27N3; bBJS7: zEVMx: goto QzIJQ; bhn_p: GqtzO: goto U0_jp; OPR4m: if ($chiffre >= 0 && $chiffre < 50) { goto TJqub; } goto rp24w; Nzo0N: $return = round($return); goto ORTlg; NzR_R: as41F: goto MlS6E; BeLVq: $return = $return / 100; goto cmsDc; gWzrM: goto LxD4r; goto g8jWY; afseC: if (!($round_type == "1")) { goto Tff1D; } goto eZ536; qio0V: Tff1D: goto nurab; bqEVx: $decimal = 0; goto DdvuS; TlvA7: $return = $unite; goto EDo9P; TL7Yq: if ($decimal >= 3 && $decimal <= 7) { goto UXMV4; } goto Qrv9c; FhDmP: ABUqA: goto hhbCC; DIPpU: goto aMVy7; goto Mu2Zk; ZCohh: if (!(strlen($decimal) == 1)) { goto k2cXn; } goto E1DnY; jk6CP: $return = ceil($return); goto BaYJF; Teetq: nh5rQ: goto P_fXi; ZJwJT: $return = $unite + 1; goto i3ula; hPr0k: $decimal = 5; goto DjAn7; FvPmT: $decimal = 5; goto gWzrM; eXCAM: if ($decimal >= 90) { goto J7RbH; } goto fKPDN; o2Tf8: list($other, $chiffre) = explode(".", $return / 10); goto yWJ7I; gI6rU: jXRft: goto cWD7H; kz8xj: $return -= 0.01; goto lOS6w; MW41T: $decimal = 0; goto dwnL6; TvOqQ: R5Ozp: goto fZU5M; ILRJh: UUgIL: goto sQPvr; RBZ1E: a9w0E: goto YXDF7; u9uE9: if ($round_type == "1") { goto PTGQ5; } goto M3_Wo; lYRGQ: $decimal = 5; goto hPc_x; L27N3: goto rt6C0; goto UhqId; eYYRg: rt6C0: goto R3DDO; Kudhb: goto nh5rQ; goto kagZ8; YPYSV: $unite = 0; goto sMPLq; s2hNA: TKMgb: goto ncZqc; yjK0d: $return = ceil($return); goto l8PpD; cqcIA: l9OlP: goto jk6CP; SQH52: goto OrYT_; goto FhDmP; FSGXq: list($return, $decimal) = explode(".", $return); goto lwFRs; bKOUa: pHh0R: goto Ew4ke; E3_LB: $return = $unite / 1000000; goto n_fmA; tI0vb: if ($realDecimal < 5 && $realDecimal >= 0) { goto wLTGT; } goto ZGOsM; z4EXw: XvBcx: goto e41sE; CAd40: list($unite, $decimal) = explode(".", $return); goto me12k; CPPsx: qn6t_: goto A4OjW; zBC7n: goto KqF0s; goto n5dw6; U0_jp: goto wyzWH; goto TPzp0; Q3l3T: goto GqtzO; goto Sucbv; sMPLq: $decimal = 0; goto bgCrl; agsao: $return = str_replace(",", ".", $return); goto UC6JI; yETa8: gZsNs: goto eXCAM; fzvGa: $return = $unite + 1; goto PTp9M; fyfyG: if ($decimal >= 49 && $decimal <= 98) { goto as41F; } goto oOqJL; i2Yl0: Mfz4e: goto lt4xk; DkLxy: if ($round_type == "1") { goto vzmrR; } goto izilA; Rd5PK: if (empty($round_type)) { goto pVjBR; } goto cDyFS; SwFPp: goto UhYSD; goto U3Bm1; pgjIG: goto XvBcx; goto W0kuX; y0D1g: CytsB: goto ZS9gb; hmh2m: goto AqwOz; goto qhgKB; Ajipu: $return = ($return . "." . $decimalReturn) * 1; goto Bj2Hc; n5dw6: mVwnZ: goto g1paU; sew1J: if ($round_type == "2") { goto M1b5S; } goto ms44S; UhqId: zC4UV: goto l1eTs; Vg6Xx: if (empty($round_type)) { goto jXRft; } goto FjISD; ucm1x: if ($modif_type == "9") { goto WehrF; } goto k0uqU; gSXbL: FXVUm: goto bHMIM; Ej1QU: wua7e: goto G_WO2; EfoB_: goto wyzWH; goto PfUxQ; u4_3Z: if ($modif_type == "3") { goto W4e6a; } goto V7ZnQ; OmMWW: if ($round_type == "2") { goto VUbuK; } goto OGoB3; NX7vD: if ($chiffre >= 0 && $chiffre < 5) { goto J0wRF; } goto mHAcg; Vaj1n: $return -= 0.1; goto jA10P; b7Zze: if ($decimal >= 5 && $decimal <= 9) { goto oBbCQ; } goto KV8q9; yWEdp: $return = $unite + 1; goto FI2lq; me12k: $return = $unite / 1000000; goto tYld0; yVKjT: $return = str_replace(",", ".", $return * 100); goto OOH7A; OGoB3: goto SU1sz; goto IoUd4; PsK9E: $unite += 1; goto Nip3I; SSSEI: CGLyv: goto DXu94; IoUd4: RLHJo: goto kTxsQ; sbiVm: $return = floor($return); goto py7vy; CJqGk: VUbuK: goto sbiVm; tyFq7: goto jbqwh; goto beS2n; Ts4nB: if ($round_type == "1") { goto mVwnZ; } goto S7SaC; m78go: $return = str_replace(",", ".", $return * 1000000); goto uXBw6; IBUdF: $decimal = 0; goto Z3Lbq; M3_Wo: if ($round_type == "2") { goto I4qJC; } goto eaz2c; Evuh7: LUBr8: goto tWj36; JeNxm: goto jtYad; goto KTpPX; gs66l: goto cLVGt; goto ZNLPo; i39Pm: E9Jll: goto TUHXT; S4s5r: goto l020U; goto sE_H3; SmtKV: fTTAL: goto dDRmK; E5Tjc: $return = ($other + $unite . $decimal) * 1; goto b_Tk6; Cs3ZW: goto H1qsn; goto CPPsx; tvFn_: $return = $return / 10; goto eSwVi; g1paU: $return = ceil($return); goto usCEd; rHdVA: if ($round_type == "2") { goto pysPb; } goto Kudhb; dN7xi: $return = $unite / 1000000; goto Cg54G; I9PJ0: NJMw4: goto Rd5PK; nurab: $return = str_replace(",", ".", $return * 100); goto EguyM; LQHH_: if ($decimal >= 6 && $decimal <= 9) { goto Xu19V; } goto p1cdj; EK1Ni: $decimalReturn = "0" . $decimalReturn; goto z4EXw; Ol5yp: list($unite, $decimal) = explode(".", $return); goto VzZsD; omYGH: if ($decimal == 99) { goto YKOLA; } goto eI3FA; sJlZG: $unite += 1; goto jVFCo; ohATk: $decimal = 0; goto EfoB_; noMwD: wLTGT: goto ggQGg; IzUd5: goto yXaP_; goto Solwc; Jq5Cd: VG14F: goto Ko7_d; hPc_x: goto LUBr8; goto Q2xQe; e41sE: goto cLVGt; goto idnUR; aiwAH: if ($realDecimal > 50 && $realDecimal <= 99) { goto vRYDL; } goto lsTAI; Ulwre: if ($round_type == 0) { goto qao4P; } goto UkIqh; BL1Xu: oBbCQ: goto u7pW6; BHygx: } public static function usesAdvancedStockManagement($id_product, $id_shop = null) { goto ChfFE; YtalS: $id_shop = SCI::getSelectedShop(); goto G0i2v; ChfFE: if (!empty($id_shop)) { goto ndyJB; } goto YtalS; qLqVj: $query = "SELECT product_shop.advanced_stock_management
\x9\x9FROM `" . _DB_PREFIX_ . "product` p
\x9\x9 INNER JOIN " . _DB_PREFIX_ . "product_shop product_shop
				ON (product_shop.id_product = p.id_product AND product_shop.id_shop = " . ($id_shop > 0 ? (int) $id_shop : "p.id_shop_default") . ")\xa\x9	WHERE (p.id_product = " . (int) $id_product . ")"; goto Mv_11; Mv_11: return (bool) Db::getInstance()->getValue($query); goto WIT19; G0i2v: ndyJB: goto qLqVj; WIT19: } public static function SendMail($id_lang, $template, $subject, $template_vars, $to, $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null) { goto XZx9m; R79P6: xNDPo: goto xX77Y; s9DOz: $to_list = new Swift_RecipientList(); goto WfcDq; pL1et: Tools::dieOrLog(Tools::displayError("Error: invalid e-mail template"), $die); goto zLLmZ; KH6mr: $to_plugin = $to; goto JcBdX; icFGo: $configuration["PS_MAIL_SMTP_PORT"] = "default"; goto iW3ta; ONz3y: $from_name = $configuration["PS_SHOP_NAME"]; goto wq9Nz; bZ3cG: if (Validate::isMailName($from_name)) { goto qMvud; } goto b62eO; pDcPt: jnsqG: goto Bj2jC; k1ctw: Tools::dieOrLog(Tools::displayError("Error: parameter "to" is corrupted"), $die); goto QpEXS; H9RrL: if (Validate::isEmail($from)) { goto Kh4nd; } goto mU1Eu; h5OKD: Jhp1a: goto HMdwA; Trc7q: FLMU5: goto O7Eoo; OLUpR: if (is_array($to) && isset($to)) { goto OQou7; } goto KH6mr; QpEXS: return false; goto Coziu; L3590: if (!(is_numeric($id_shop) && $id_shop)) { goto jnsqG; } goto stSwS; RWv02: $to_name = $to; goto h5OKD; Bj2jC: $configuration = Configuration::getMultiple(array("PS_SHOP_EMAIL", "PS_MAIL_METHOD", "PS_MAIL_SERVER", "PS_MAIL_USER", "PS_MAIL_PASSWD", "PS_SHOP_NAME", "PS_MAIL_SMTP_ENCRYPTION", "PS_MAIL_SMTP_PORT", "PS_MAIL_METHOD", "PS_MAIL_TYPE"), null, null, $id_shop); goto cZ3gr; XZx9m: $theme_path = _PS_THEME_DIR_; goto L3590; b62eO: $from_name = null; goto qAvUq; Coziu: Re3gy: goto MQMUu; g23LZ: ki4KX: goto hd23W; J3ZLI: g5KlB: goto H9RrL; w9wlz: $to_name = null; goto R79P6; LD8KR: tul0g: goto uwhnB; mU1Eu: $from = null; goto DP_BB; JcBdX: if (!($to_name == null)) { goto Jhp1a; } goto RWv02; kqgI3: $to = $to_list; goto zfuJe; jD17q: mL_gc: goto bXT7p; wq9Nz: N0H4x: goto bZ3cG; RaQ1F: Tools::dieOrLog(Tools::displayError("Error: invalid e-mail subject"), $die); goto LgbYl; MQMUu: if (is_array($template_vars)) { goto tul0g; } goto GbdoB; CArdf: xXE0p: goto OLUpR; uwhnB: if (!(is_string($to_name) && !empty($to_name) && !Validate::isMailName($to_name))) { goto xNDPo; } goto w9wlz; r9jXp: if (!(!is_array($to) && !Validate::isEmail($to))) { goto Re3gy; } goto k1ctw; qTWP4: $theme_path = _PS_ROOT_DIR_ . "/themes/" . $theme_name . "/"; goto swTGu; LgbYl: return false; goto CArdf; hd23W: if (Validate::isMailSubject($subject)) { goto xXE0p; } goto RaQ1F; swTGu: nIyf8: goto pDcPt; zfuJe: cIbLm: goto gPJad; stSwS: $shop = new Shop((int) $id_shop); goto nFNBR; wMGCS: goto cIbLm; goto XyfaV; WfcDq: foreach ($to as $key => $addr) { goto W8q2L; sh1EV: if (!($to_name && is_array($to_name) && Validate::isGenericName($to_name[$key]))) { goto jN0dE; } goto GRHp1; W8q2L: $to_name = null; goto HFMKV; HFMKV: $addr = trim($addr); goto jwhxe; vZrVW: if (!($to_name == null)) { goto wKPW9; } goto kdvjj; kdvjj: $to_name = $addr; goto rhq47; jwhxe: if (Validate::isEmail($addr)) { goto uwe89; } goto Jrlkk; iv7Q_: if (!is_array($to_name)) { goto Xrvof; } goto sh1EV; Jrlkk: Tools::dieOrLog(Tools::displayError("Error: invalid e-mail address"), $die); goto nds71; GRHp1: $to_name = $to_name[$key]; goto PeYF3; fGwmB: $to_list->addTo($addr, "=?UTF-8?B?" . base64_encode($to_name) . "?="); goto ydKmJ; PeYF3: jN0dE: goto Uc16J; Uc16J: Xrvof: goto vZrVW; rhq47: wKPW9: goto fGwmB; Vk3Ud: uwe89: goto iv7Q_; ydKmJ: nqOUQ: goto uJKH8; nds71: return false; goto Vk3Ud; uJKH8: } goto Trc7q; zLLmZ: return false; goto g23LZ; HMdwA: $to = new Swift_Address($to, "=?UTF-8?B?" . base64_encode($to_name) . "?="); goto wMGCS; O7Eoo: $to_plugin = $to[0]; goto kqgI3; nFNBR: $theme_name = $shop->getTheme(); goto Wb3YY; cZ3gr: if (isset($configuration["PS_MAIL_SMTP_ENCRYPTION"])) { goto mL_gc; } goto zLXnh; zLXnh: $configuration["PS_MAIL_SMTP_ENCRYPTION"] = "off"; goto jD17q; bXT7p: if (isset($configuration["PS_MAIL_SMTP_PORT"])) { goto OrwOr; } goto icFGo; gPJad: try { goto cI3bg; HY6_M: if (!file_exists($template_path . $template . ".txt") && ($configuration["PS_MAIL_TYPE"] == Mail::TYPE_BOTH || $configuration["PS_MAIL_TYPE"] == Mail::TYPE_TEXT)) { goto w8UWQ; } goto Ui6TP; PlFrf: $template_vars["{my_account_url}"] = Context::getContext()->link->getPageLink("my-account", true, Context::getContext()->language->id); goto iVanK; S0lYP: if ($iso) { goto dABu3; } goto ANAL4; o0XR3: if (!version_compare(_PS_VERSION_, "1.6.0.0", ">=")) { goto W_fNI; } goto QkXRc; ngQ_b: $swift = new Swift($connection, Configuration::get("PS_MAIL_DOMAIN"), null, null, $id_shop); goto AvKDV; wxK0m: $template_vars["{shop_url}"] = Tools::getShopDomain(true, true) . __PS_BASE_URI__ . "index.php"; goto PlFrf; Z3OSa: if ($connection) { goto qHJ9x; } goto f74Ez; iVanK: $template_vars["{guest_tracking_url}"] = Context::getContext()->link->getPageLink("guest-tracking", true, Context::getContext()->language->id); goto T9PV6; USqPl: $message = new Swift_Message("[" . Configuration::get("PS_SHOP_NAME", null, null, $id_shop) . "] " . $subject); goto v2vOd; jYB80: W_fNI: goto cPO9P; aF0XD: ayGoW: goto jeV1U; eyRdp: S82SG: goto Z3OSa; L6Bev: $override_mail = true; goto KBMvG; G4yLJ: $logo = _PS_IMG_DIR_ . Configuration::get("PS_LOGO_MAIL", null, null, $id_shop); goto lrpDB; QkXRc: $template_vars = array_map(array("Tools", "htmlentitiesDecodeUTF8"), $template_vars); goto VYejC; eL5I6: y6G6l: goto sM5kZ; m_6sF: $message->attach(new Swift_Message_Part($template_txt, "text/plain", "8bit", "utf-8")); goto agGkm; c_5jd: GYDTI: goto rFR6g; FGO5m: return false; goto RACid; KzkHo: if (is_array(current($file_attachment))) { goto VfBo7; } goto p8aaA; EEmFh: $connection = new Swift_Connection_NativeMail(); goto wSyes; XNDMx: XPLwV: goto zBEZu; c6S0j: $template_path = $theme_path . "modules/" . $module_name . "/mails/"; goto v2sMG; P0LN6: Wey33: goto msTTw; FkcNQ: goto q58C9; goto gZTB5; T0QZg: return false; goto MAWko; DsHQ8: $module_name = $res[1]; goto wa60R; aYyg4: $send = $swift->send($message, $to, new Swift_Address($from, $from_name)); goto bcxOI; VeW7w: kcXNo: goto eyRdp; msTTw: if (empty($configuration["PS_MAIL_PASSWD"])) { goto kcXNo; } goto le7cg; FlOWl: $message->setId(SCI::generateId()); goto XNDMx; pqcjD: $module_name = false; goto vYHOm; P_dcd: if (!(preg_match("#" . __PS_BASE_URI__ . "modules/#", $template_path) && preg_match("#modules/([a-z0-9_-]+)/#ui", $template_path, $res))) { goto TKbc4; } goto DsHQ8; wKDPf: return false; goto rdLEf; FcT2_: if (empty($configuration["PS_MAIL_USER"])) { goto Wey33; } goto ehUN5; cI3bg: if ($configuration["PS_MAIL_METHOD"] == 2) { goto tZ7b3; } goto EEmFh; zVoOy: if ($override_mail && file_exists($template_path . $iso . "/lang.php")) { goto y6G6l; } goto ogK0J; yYWGe: $logo = _PS_IMG_DIR_ . Configuration::get("PS_LOGO", null, null, $id_shop); goto sCYnA; G8rIj: xwTUe: goto Lrka4; nKgMj: bwCRv: goto Tq3N6; oRxgY: if ($connection) { goto OLNlf; } goto A2gqT; T9PV6: $template_vars["{history_url}"] = Context::getContext()->link->getPageLink("history", true, Context::getContext()->language->id); goto gvy1p; vYHOm: $override_mail = false; goto P_dcd; uo8On: goto dg03j; goto gvwla; YMuQH: $swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $template_vars)), "decorator"); goto AZ_WD; HtIUM: goto er6Hx; goto FUboR; ANAL4: Tools::dieOrLog(Tools::displayError("Error - No ISO code for email"), $die); goto FGO5m; UT2EA: if (file_exists(_PS_IMG_DIR_ . Configuration::get("PS_LOGO", null, null, $id_shop))) { goto rNKGm; } goto T_Jic; v40qT: if (!(empty($configuration["PS_MAIL_SERVER"]) || empty($configuration["PS_MAIL_SMTP_PORT"]))) { goto WzQ8x; } goto YTEsZ; mMMPr: ht5sf: goto aYyg4; MAWko: kXc54: goto uo8On; v2vOd: if (version_compare(_PS_VERSION_, "1.5.0.0", ">=")) { goto CXVb6; } goto L3JEU; agGkm: QBN0r: goto awnOu; AvKDV: $iso = Language::getIsoById((int) $id_lang); goto S0lYP; sM5kZ: include_once $template_path . $iso . "/lang.php"; goto NvBdk; T_Jic: $template_vars["{shop_logo}"] = ''; goto FkcNQ; AZ_WD: if (!($configuration["PS_MAIL_TYPE"] == Mail::TYPE_BOTH || $configuration["PS_MAIL_TYPE"] == Mail::TYPE_TEXT)) { goto QBN0r; } goto m_6sF; zBEZu: $message->headers->setEncoding("Q"); goto o0XR3; bcxOI: $swift->disconnect(); goto XMVV4; GOz3c: return false; goto JYOSv; rdLEf: nVkU9: goto wUgKp; RACid: dABu3: goto x7tvF; l9XgS: CXVb6: goto FlOWl; cPO9P: if (Configuration::get("PS_LOGO_MAIL", null, null, $id_shop) !== false && file_exists(_PS_IMG_DIR_ . Configuration::get("PS_LOGO_MAIL", null, null, $id_shop))) { goto hpbyL; } goto UT2EA; Tq3N6: if (!($file_attachment && !empty($file_attachment))) { goto ht5sf; } goto KzkHo; FUboR: hpbyL: goto G4yLJ; NvBdk: cWuMB: goto USqPl; YTEsZ: Tools::dieOrLog(Tools::displayError("Error: invalid SMTP server or SMTP port"), $die); goto TO84d; ehUN5: $connection->setUsername($configuration["PS_MAIL_USER"]); goto P0LN6; A2gqT: return false; goto pdtdS; ldbvy: if ($module_name !== false && (file_exists($theme_path . "modules/" . $module_name . "/mails/" . $template . ".txt") || file_exists($theme_path . "modules/" . $module_name . "/mails/" . $template . ".html"))) { goto vXZIY; } goto nX3bf; W5hvB: VfBo7: goto qlFD1; pdtdS: OLNlf: goto FcT2_; p8aaA: $file_attachment = array($file_attachment); goto W5hvB; Lrka4: $template_vars["{shop_name}"] = Tools::safeOutput(Configuration::get("PS_SHOP_NAME", null, null, $id_shop)); goto wxK0m; qDdDg: goto XPLwV; goto l9XgS; L3JEU: $message->setId(Mail::generateId()); goto qDdDg; f7uwq: $connection = new Swift_Connection_SMTP($configuration["PS_MAIL_SERVER"], $configuration["PS_MAIL_SMTP_PORT"], $configuration["PS_MAIL_SMTP_ENCRYPTION"] == "ssl" ? Swift_Connection_SMTP::ENC_SSL : ($configuration["PS_MAIL_SMTP_ENCRYPTION"] == "tls" ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_OFF)); goto jQiJF; w1_6A: qHJ9x: goto ngQ_b; qY08L: goto mBcaR; goto OzCis; OzCis: vXZIY: goto c6S0j; nX3bf: if (file_exists($theme_path . "mails/" . $template . ".txt") || file_exists($theme_path . "mails/" . $template . ".html")) { goto Cg9qr; } goto HY6_M; Ui6TP: if (!(!file_exists($template_path . $template . ".html") && ($configuration["PS_MAIL_TYPE"] == Mail::TYPE_BOTH || $configuration["PS_MAIL_TYPE"] == Mail::TYPE_HTML))) { goto UHiH_; } goto Ox51w; rFR6g: include_once _PS_MAIL_DIR_ . $iso . "/lang.php"; goto Wop_M; TO84d: return false; goto p8TEJ; jeV1U: goto cWuMB; goto eL5I6; Wop_M: WSZt8: goto ZHnlf; heMKb: Logger::addLog(Tools::displayError("Error - The lang file is missing for :") . " " . $iso, 3); goto wKDPf; gvy1p: $template_vars["{color}"] = Tools::safeOutput(Configuration::get("PS_MAIL_COLOR", null, null, $id_shop)); goto YMuQH; wUgKp: goto WSZt8; goto c_5jd; jQiJF: $connection->setTimeout(4); goto oRxgY; blhyY: $template_vars["{shop_logo}"] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); goto G8rIj; VYejC: $template_vars = array_map(array("Tools", "stripslashes"), $template_vars); goto jYB80; ogK0J: if ($module_name && file_exists($theme_path . "mails/" . $iso . "/lang.php")) { goto xV0VK; } goto AJmYq; MMN9J: if (!isset($logo)) { goto xwTUe; } goto blhyY; MvN1A: goto kXc54; goto n7ECt; XMVV4: return $send; goto Xs8D4; QICyU: if (!version_compare(_PS_VERSION_, "1.4.0.0", ">=")) { goto nVkU9; } goto heMKb; U8nrT: MJ2kQ: goto mMMPr; le7cg: $connection->setPassword($configuration["PS_MAIL_PASSWD"]); goto VeW7w; lrpDB: er6Hx: goto MMN9J; v2sMG: mBcaR: goto eOipu; Ox51w: Tools::dieOrLog(Tools::displayError("Error - The following e-mail template is missing:") . " " . $template_path . $template . ".html", $die); goto GOz3c; gvwla: Cg9qr: goto jRvqK; x7tvF: $template = $iso . "/" . $template; goto pqcjD; eOipu: $template_html = file_get_contents($template_path . $template . ".html"); goto UPEQ6; K0gPy: Tools::dieOrLog(Tools::displayError("Error - The following e-mail template is missing:") . " " . $template_path . $template . ".txt", $die); goto T0QZg; ooDo1: tZ7b3: goto v40qT; jRvqK: $template_path = $theme_path . "mails/"; goto L6Bev; gZTB5: rNKGm: goto yYWGe; f74Ez: return false; goto w1_6A; qlFD1: foreach ($file_attachment as $attachment) { goto EHXRc; EHXRc: if (!(isset($attachment["content"]) && isset($attachment["name"]) && isset($attachment["mime"]))) { goto ixYgh; } goto eGTZK; M693V: PzEK8: goto xCPcl; dqfF9: ixYgh: goto M693V; eGTZK: $message->attach(new Swift_Message_Attachment($attachment["content"], $attachment["name"], $attachment["mime"])); goto dqfF9; xCPcl: } goto U8nrT; JYOSv: UHiH_: goto MvN1A; ZHnlf: goto ayGoW; goto G02Vv; wSyes: goto S82SG; goto ooDo1; n7ECt: w8UWQ: goto K0gPy; wa60R: TKbc4: goto ldbvy; p8TEJ: WzQ8x: goto f7uwq; yqEmm: include_once $theme_path . "mails/" . $iso . "/lang.php"; goto aF0XD; ONJqL: $message->attach(new Swift_Message_Part ?>

Did this file decode correctly?

Original Code

<?php goto HTuFg; HTuFg: $cache_shop_by_product = array(); goto n8X1e; bmUMD: $cache_tax = array(); goto Yqo6j; n8X1e: $cache_warehouse_by_product = array(); goto bmUMD; Yqo6j: class SCI { public $ps_vers; public static function getDefaultCountryId() { goto CwoW8; CwoW8: $return = 0; goto YA1cc; x6dcQ: if (version_compare(_PS_VERSION_, "\x31\x2e\x35\56\x30\x2e\x30", "\74")) { goto PvBnJ; } goto CSYES; plzY2: PvBnJ: goto TNZ9g; FxW0y: define("\123\x43\x5f\103\101\x43\110\105\137\104\105\x46\x41\125\114\124\137\103\117\125\x4e\x54\122\131\137\111\x44", $return); goto knTE3; P_upg: GSSHD: goto FxW0y; hgg3T: ElBlo: goto x6dcQ; knTE3: tRER_: goto YVRaJ; dLz1h: $return = SC_CACHE_DEFAULT_COUNTRY_ID; goto avj6M; avj6M: goto tRER_; goto hgg3T; YA1cc: if (!defined("\123\x43\137\103\x41\x43\x48\x45\x5f\x44\105\106\x41\125\114\x54\137\103\117\x55\x4e\x54\122\131\137\111\x44")) { goto ElBlo; } goto dLz1h; eKQlv: goto GSSHD; goto plzY2; YVRaJ: return $return; goto CKDES; TNZ9g: $return = (int) Country::getDefaultCountryId(); goto P_upg; CSYES: $return = (int) SCI::getConfigurationValue("\120\x53\137\103\x4f\x55\116\124\x52\x59\137\104\x45\106\101\125\x4c\124", null, 0, (int) SCI::getSelectedShop()); goto eKQlv; CKDES: } public static function hookExec($hook_name, $hookArgs = array(), $id_module = null) { goto NKVlV; yUEZP: if (!($hook_name == "\x75\x70\x64\141\x74\x65\x50\x72\x6f\x64\165\143\x74")) { goto GmrnV; } goto x1S3C; k2Yh2: if (!($hook_name == "\x75\160\144\141\x74\145\120\162\x6f\x64\x75\143\x74")) { goto hSjg2; } goto InZvb; InZvb: SCI::updateConfigurationValue("\x50\x53\137\x53\x4d\101\122\124\x59\x5f\x43\114\105\x41\x52\137\x43\x41\x43\110\x45", $old_value); goto clvgW; clvgW: hSjg2: goto JY_Y5; OISML: gFHGF: goto Ho4G9; qZpBS: dwsFQ: goto XqDBe; XqDBe: $result = Hook::exec(sc_array_key_exists(strtolower($hook_name), $alias) ? $alias[strtolower($hook_name)] : $hook_name, $hookArgs, $id_module, false, true, false, (int) SCI::getSelectedShop()); goto n1WOa; XIatb: $result = Hook::exec(sc_array_key_exists(strtolower($hook_name), $alias) ? $alias[strtolower($hook_name)] : $hook_name, $hookArgs, $id_module); goto O60eo; JY_Y5: return $result; goto GufuF; n0JCZ: GmrnV: goto YJImT; RSWQR: SCI::updateConfigurationValue("\x50\123\x5f\123\115\101\x52\124\131\x5f\103\x4c\x45\x41\x52\x5f\103\101\103\110\x45", "\156\145\166\x65\162"); goto n0JCZ; VcDO2: return; goto e0y_k; mQXhm: return Module::hookExec($hook_name, $hookArgs, $id_module); goto OISML; GufuF: goto gFHGF; goto aPvUZ; n1WOa: uQKN2: goto k2Yh2; O60eo: goto uQKN2; goto qZpBS; NKVlV: if (!(!_s("\x41\120\120\x5f\x43\x4f\115\x50\x41\x54\x5f\x48\x4f\x4f\113") && !SCI::checkUsedHook($hook_name))) { goto jYJD3; } goto VcDO2; x1S3C: $old_value = Configuration::get("\x50\x53\x5f\123\x4d\x41\122\124\x59\x5f\103\x4c\105\x41\122\x5f\103\x41\x43\x48\105"); goto RSWQR; kcQgd: if (version_compare(_PS_VERSION_, "\61\56\65\56\x30\x2e\60", "\74")) { goto c4r1k; } goto zIWbD; aPvUZ: c4r1k: goto mQXhm; e0y_k: jYJD3: goto kcQgd; YJImT: if (SCMS) { goto dwsFQ; } goto XIatb; zIWbD: $alias = Hook::getHookAliasList(); goto yUEZP; Ho4G9: } public static function checkUsedHook($hook_name) { goto BULAD; GySEr: QlW6O: goto fFn9u; GIEqa: iOjnw: goto IBbXW; BULAD: $hook_list = unserialize(Configuration::get("\x53\x43\x5f\x48\117\117\113\137\115\117\x44\125\114\x45")); goto aienC; A44Ft: if (!empty($hook_list)) { goto QlW6O; } goto QGRsA; tISOy: goto hebz6; goto GySEr; Sd70V: goto dSPDY; goto GIEqa; QGRsA: return true; goto tISOy; fFn9u: return sc_array_key_exists(strtolower($hook_name), $hook_list_by_shop); goto gaD8q; UnNNK: dSPDY: goto A44Ft; aienC: if (SCMS) { goto iOjnw; } goto Rfqai; Rfqai: $hook_list_by_shop = $hook_list; goto Sd70V; IBbXW: $hook_list_by_shop = $hook_list[SCI::getSelectedShop()]; goto UnNNK; gaD8q: hebz6: goto omtca; omtca: } public static function addToShops($objectTableName, $objects_id = array(), $shops = array()) { goto n0fl5; IG8_D: U7q6o: goto WwlUm; OEHpM: foreach ($shops as $id_shop) { goto tEdVi; uAA5l: Xmn_l: goto Qjwvm; uhHdX: pX8tw: goto uAA5l; tEdVi: foreach ($objects_id as $id_object) { $newRelations[] = "\50" . (int) $id_shop . "\x2c" . (int) $id_object . "\51"; Xxfj_: } goto uhHdX; Qjwvm: } goto rUeH2; Tu3SK: $newRelations = arrayDiffEmulation($newRelations, $relationsArray); goto x4KHp; iH1YJ: $relationsArray = array(); goto Ht52Y; L51s3: $sql = "\111\116\x53\x45\x52\x54\40\111\116\124\117\40" . _DB_PREFIX_ . $objectTableName . "\137\x73\150\x6f\160\40\50\151\144\x5f\163\150\x6f\x70\54\x69\144\137" . $objectTableName . "\51\x20\126\101\114\x55\105\123\40" . join("\x2c", $newRelations); goto UF9Bs; kCGAb: nNM93: goto EYPXl; x4KHp: if (!count($newRelations)) { goto U7q6o; } goto L51s3; Yqmfn: if (!(is_array($shops) && count($shops) == 0)) { goto wCcDt; } goto DoSzo; n0fl5: if (!(version_compare(_PS_VERSION_, "\x31\56\x35\56\60\x2e\x30", "\74") || count($objects_id) == 0)) { goto XG0ZB; } goto wykzK; EYPXl: $newRelations = array(); goto OEHpM; wykzK: return; goto jSEBq; jSEBq: XG0ZB: goto Yqmfn; DoSzo: $shops = Shop::getShops(true, null, true); goto WXFgH; UF9Bs: Db::getInstance()->Execute($sql); goto IG8_D; WXFgH: wCcDt: goto CGV9V; rUeH2: Pd9Po: goto Tu3SK; CGV9V: $relations = Db::getInstance()->ExecuteS("\123\105\114\x45\x43\124\40\x69\144\x5f\x73\x68\x6f\x70\54\151\144\137" . $objectTableName . "\x20\x46\x52\x4f\115\x20" . _DB_PREFIX_ . $objectTableName . "\x5f\x73\150\x6f\x70"); goto iH1YJ; Ht52Y: foreach ($relations as $v) { $relationsArray[] = "\x28" . $v["\x69\144\x5f\163\x68\x6f\x70"] . "\54" . $v["\151\144\137" . $objectTableName] . "\51"; Gbj7s: } goto kCGAb; WwlUm: } public static function duplicateImageToShops($object_id, $actual_shop_id, $shops = array()) { goto TMpes; Lzh72: foreach ($shops as $shop) { $other_shops[] = "\50" . (int) $shop . "\54" . (int) $image_actual_shop["\151\144\x5f\x69\x6d\141\147\145"] . "\54" . $image_actual_shop["\143\x6f\166\x65\162"] . "\51"; iSuws: } goto Mbnal; fykgf: xFI1G: goto zx09P; Mbnal: m3Pie: goto jLX_6; JIJHe: $image_actual_shop = Db::getInstance()->getRow("\123\105\114\x45\x43\124\40\151\x6d\x67\137\x73\x2e\151\x64\x5f\163\150\x6f\x70\54\151\155\147\x5f\163\x2e\151\144\x5f\x69\155\141\147\145\54\x69\155\x67\x5f\163\56\143\157\x76\x65\162\x2c\x20\151\56\x69\x64\137\x70\162\157\144\x75\x63\x74\xa\40\x20\40\40\x20\x20\40\x20\40\40\40\40\x46\122\x4f\x4d\x20" . _DB_PREFIX_ . "\151\155\141\x67\145\x5f\x73\150\x6f\x70\x20\151\x6d\147\137\x73\xa\40\x20\x20\x20\x20\40\x20\x20\40\x20\x20\40\40\40\x20\40\x49\116\x4e\x45\122\x20\x4a\x4f\111\x4e\x20" . _DB_PREFIX_ . "\151\x6d\141\x67\145\x20\151\x20\117\116\40\50\151\x6d\x67\137\x73\x2e\151\144\137\151\x6d\141\147\145\75\x69\x2e\151\144\x5f\x69\155\141\147\145\x29\12\x20\x20\40\40\x20\40\x20\x20\40\40\40\x20\127\x48\x45\122\105\x20\151\x6d\x67\137\163\56\151\x64\137\x69\155\x61\x67\145\40\75\x20\47" . (int) $object_id . "\47\40\x41\116\x44\x20\151\155\x67\137\163\56\x69\144\137\x73\x68\157\160\75\x27" . (int) $actual_shop_id . "\47"); goto RvdQQ; jLX_6: goto xFI1G; goto WdFBv; e7NW4: foreach ($shops as $shop) { goto SPC2I; KJWDw: zLJkH: goto owIgd; SPC2I: if (!empty($image_actual_shop["\x63\x6f\x76\x65\162"])) { goto WHelo; } goto u_dlp; u_dlp: $image_actual_shop["\143\x6f\166\145\x72"] = "\x4e\x55\x4c\114"; goto bfeLE; IKHVL: $other_shops[] = "\50" . (int) $shop . "\x2c" . (int) $image_actual_shop["\151\144\x5f\151\x6d\141\147\145"] . "\54" . (int) $image_actual_shop["\151\x64\x5f\160\162\x6f\x64\165\143\164"] . "\x2c" . $image_actual_shop["\x63\157\166\x65\x72"] . "\51"; goto KJWDw; bfeLE: WHelo: goto IKHVL; owIgd: } goto qr5_U; RvdQQ: $other_shops = array(); goto e7NW4; zx09P: if (!count($other_shops)) { goto VoEIa; } goto LyfkC; dQFCw: $other_shops = array(); goto Lzh72; LyfkC: $sql = "\111\116\x53\x45\122\x54\40\x49\x4e\124\117\x20" . _DB_PREFIX_ . "\x69\155\141\x67\x65\x5f\163\150\157\x70\40\50\151\144\x5f\163\x68\x6f\160\54\151\x64\137\151\155\141\x67\145" . (version_compare(_PS_VERSION_, "\61\56\66\56\x31\x2e\x30", "\x3e\75") ? "\54\151\144\137\160\162\157\x64\165\x63\x74" : '') . "\54\x63\x6f\166\145\x72\51\40\126\101\114\x55\x45\x53\x20" . join("\54", $other_shops); goto lXsfD; lXsfD: Db::getInstance()->Execute($sql); goto sUJ2f; f9rE8: if (version_compare(_PS_VERSION_, "\x31\x2e\x36\56\61\x2e\x30", "\x3e\x3d")) { goto BLOFV; } goto lKLk3; WdFBv: BLOFV: goto JIJHe; sUJ2f: VoEIa: goto rkgcZ; RETkI: return; goto O7xm6; qr5_U: l3XBv: goto fykgf; lKLk3: $image_actual_shop = Db::getInstance()->getRow("\123\105\114\x45\x43\x54\x20\x69\x64\137\x73\150\157\160\x2c\151\x64\x5f\151\155\x61\x67\145\54\143\x6f\166\x65\x72\40\x46\x52\117\x4d\40" . _DB_PREFIX_ . "\x69\x6d\141\x67\145\137\163\x68\x6f\160\40\x57\110\x45\122\105\40\151\144\137\151\155\141\147\x65\40\75\x20\47" . (int) $object_id . "\47\x20\101\116\104\x20\x69\x64\137\x73\x68\x6f\160\75\47" . (int) $actual_shop_id . "\x27"); goto dQFCw; TMpes: if (!(version_compare(_PS_VERSION_, "\61\x2e\x35\56\x30\x2e\x30", "\x3c") || empty($object_id) || empty($actual_shop_id) || empty($shops))) { goto wkfZn; } goto RETkI; xxeKx: Db::getInstance()->execute("\x44\105\114\x45\124\x45\x20\x46\122\117\x4d\40" . _DB_PREFIX_ . "\151\155\x61\147\145\x5f\x73\x68\157\x70\40\x57\110\x45\x52\x45\40\x69\x64\x5f\151\x6d\141\x67\145\40\x3d\40\x27" . (int) $object_id . "\x27\x20\x41\x4e\104\40\151\144\x5f\163\x68\157\160\40\111\x4e\x20\x28" . join("\54", $shops) . "\51"); goto f9rE8; O7xm6: wkfZn: goto xxeKx; rkgcZ: } public static function getLastPositionFromCategory($id_category, $id_shop = 1) { goto cE9PK; fPyEb: return Category::getLastPosition($id_category); goto UgQET; amCoe: return Category::getLastPosition($id_category, $id_shop); goto w1IiY; w1IiY: goto GgO_7; goto ct3cq; ct3cq: VsqQk: goto fPyEb; cE9PK: if (version_compare(_PS_VERSION_, "\61\x2e\x35\56\60\56\60", "\74")) { goto VsqQk; } goto amCoe; UgQET: GgO_7: goto c_ht1; c_ht1: } public static function imageResize($sourceFile, $destFile, $destWidth = null, $destHeight = null, $fileType = "\x6a\x70\x67") { goto Qp_Cy; rbRpI: QdSwY: goto gRVM1; tSzpV: ui0Ka: goto VhzOy; TpM_8: return @ImageManager::resize($sourceFile, $destFile, $destWidth, $destHeight, $fileType); goto BIpyf; BIpyf: goto ui0Ka; goto rbRpI; gRVM1: return imageResize($sourceFile, $destFile, $destWidth, $destHeight, $fileType); goto tSzpV; Qp_Cy: if (version_compare(_PS_VERSION_, "\61\x2e\65\x2e\x30\56\x30", "\74")) { goto QdSwY; } goto TpM_8; VhzOy: } public static function updateConfigurationValue($key, $values, $html = false, $id_shop_group = 0, $id_shop = 0) { goto TdAx4; SLTKA: AvGtI: goto Enq8i; psn7L: goto AvGtI; goto z8uaL; z8uaL: QEAsr: goto EAzCv; TdAx4: if (version_compare(_PS_VERSION_, "\x31\x2e\65\56\x30\x2e\60", "\74")) { goto QEAsr; } goto xZ18B; xZ18B: return Configuration::updateValue($key, $values, $html, $id_shop_group, $id_shop); goto psn7L; EAzCv: return Configuration::updateValue($key, $values, $html); goto SLTKA; Enq8i: } public static function getConfigurationValue($key, $id_lang = null, $id_shop_group = 0, $id_shop = 0) { goto L9Y0K; LbSqD: return Configuration::get($key, $id_lang, $id_shop_group, $id_shop); goto B01Ki; d8_M3: pKmO4: goto KUCAo; mWJ4y: return Configuration::get($key, $id_lang); goto d8_M3; B01Ki: goto pKmO4; goto nDZDn; L9Y0K: if (version_compare(_PS_VERSION_, "\x31\x2e\65\x2e\60\x2e\x30", "\x3c")) { goto he5J1; } goto LbSqD; nDZDn: he5J1: goto mWJ4y; KUCAo: } public static function getEcotaxTaxRate() { goto kt0fL; bILfq: DLyIN: goto xY3ug; xY3ug: $return = Tax::getProductEcotaxRate() / 100 + 1; goto Ba_Ob; gbi0P: $tax_manager = TaxManagerFactory::getManager($address, (int) Configuration::get("\x50\x53\x5f\x45\103\117\x54\x41\x58\137\124\x41\x58\x5f\122\x55\x4c\x45\x53\137\x47\x52\117\125\120\137\111\x44", null, 0, (int) SCI::getSelectedShop())); goto rLxEK; cOVyS: goto w2UjU; goto bILfq; Kt0Ot: mbOTA: goto N2hEu; Ba_Ob: goto w2UjU; goto U_tUR; NTulv: PJ07c: goto DZWo3; rLxEK: $tax_calculator = $tax_manager->getTaxCalculator(); goto DxNyA; g4bsj: goto w2UjU; goto Kt0Ot; dtQX1: if (version_compare(_PS_VERSION_, "\61\56\64\x2e\60\x2e\x30", "\76\75")) { goto DLyIN; } goto TCCbp; mEpve: goto w2UjU; goto NTulv; HpTEW: $tax = new Tax((int) Configuration::get("\x50\x53\x5f\105\x43\x4f\x54\x41\130\137\124\101\x58\x5f\111\x44")); goto HWx0w; jKmXR: yCKYu: goto alF3i; DxNyA: $return = $tax_calculator->getTotalRate() / 100 + 1; goto cOVyS; N2hEu: $return = 1; goto mEpve; FvV1Z: goto yCKYu; goto nCbcR; YdG5R: w2UjU: goto HS2JV; kDWdr: if (version_compare(_PS_VERSION_, "\x31\56\64\x2e\60\56\x30", "\x3e\x3d") && version_compare(_PS_VERSION_, "\x31\56\x35\56\60\x2e\x30", "\74") && (int) SCI::getConfigurationValue("\x50\x53\x5f\x55\x53\105\137\105\x43\x4f\124\101\130") == 0 || version_compare(_PS_VERSION_, "\61\56\65\x2e\60\56\60", "\x3e\x3d") && (int) SCI::getConfigurationValue("\x50\x53\x5f\x55\x53\x45\137\105\x43\x4f\x54\101\x58", null, 0, (int) SCI::getSelectedShop()) == 0) { goto mbOTA; } goto T8pcj; UMZ2S: $return = 1; goto g4bsj; utYH7: if (!defined("\x53\103\x5f\x43\101\103\110\x45\137\105\103\x4f\124\101\130\137\x52\101\x54\x45")) { goto qYSa7; } goto iEcyZ; kt0fL: $return = 100; goto utYH7; nCbcR: qYSa7: goto kDWdr; U_tUR: xG5EP: goto HpTEW; TCCbp: if (version_compare(_PS_VERSION_, "\61\56\x33\x2e\60\56\60", "\x3e\75")) { goto xG5EP; } goto UMZ2S; T8pcj: if (version_compare(_PS_VERSION_, "\61\56\65\56\x30\x2e\x30", "\x3e\x3d")) { goto PJ07c; } goto dtQX1; HS2JV: define("\123\x43\137\x43\x41\103\110\x45\x5f\x45\x43\x4f\x54\101\130\137\122\101\x54\x45", $return); goto jKmXR; DZWo3: $address = Address::initialize(null); goto gbi0P; alF3i: return $return; goto oq14l; HWx0w: $return = (double) $tax->rate / 100 + 1; goto YdG5R; iEcyZ: $return = SC_CACHE_ECOTAX_RATE; goto FvV1Z; oq14l: } public static function getSelectedShopActionList($string = false, $id_product = null) { goto sOPmw; tCDuv: $list = array(SCI::getSelectedShop()); goto kHwIg; D3lbJ: $list = explode("\54", $_COOKIE["\163\143\137\163\150\x6f\x70\x5f\x6c\x69\163\164"]); goto Gb_jp; O4MpF: $list = $list_temp; goto RZgQ_; Gb_jp: Vhu94: goto yrs8_; vyAVy: $list_temp = array(); goto E1H2F; sOPmw: $list = array(); goto muULK; muULK: if (!empty($_COOKIE["\163\x63\x5f\x73\150\157\160\137\x6c\x69\x73\164"])) { goto MIyz9; } goto tCDuv; e_ql8: $list = $string ? implode("\x2c", $list) : $list; goto zQxeQ; t5nga: MIyz9: goto D3lbJ; DCz2V: foreach ($shops as $shop_id) { goto KDZ_p; PDUZQ: lk3H3: goto ezd7Z; b79x9: u40YS: goto PDUZQ; KDZ_p: if (!sc_in_array($shop_id, $list, "\123\x43\111\123\x65\154\x65\143\164\123\150\157\160\120\162\x6f\144\x75\x63\x74")) { goto u40YS; } goto ZtSWq; ZtSWq: $list_temp[] = $shop_id; goto b79x9; ezd7Z: } goto L1OLy; E1H2F: $shops = self::getShopsByProduct($id_product); goto DCz2V; zQxeQ: return $list; goto h80OT; RZgQ_: QfiS9: goto e_ql8; L1OLy: Cb8xQ: goto O4MpF; kHwIg: goto Vhu94; goto t5nga; yrs8_: if (empty($id_product)) { goto QfiS9; } goto vyAVy; h80OT: } public static function getSelectedShop() { goto mfTv3; LWABs: if (version_compare(_PS_VERSION_, "\61\x2e\65\x2e\x30\x2e\x30", "\x3e\75")) { goto B7rQE; } goto Dha_P; AujdZ: a9seY: goto Pn785; U5o0N: goto a9seY; goto cuDht; T0s00: BS5ES: goto KzjpQ; od9gG: goto a9seY; goto T0s00; cuDht: B7rQE: goto cJRHX; Dha_P: return 0; goto od9gG; KzjpQ: return isset($_COOKIE["\163\x63\x5f\x73\x68\157\160\137\163\145\154\145\x63\164\145\144"]) ? (int) $_COOKIE["\163\143\137\x73\150\157\x70\137\163\x65\154\145\x63\164\145\144"] : 0; goto U5o0N; cJRHX: return (int) Configuration::get("\120\123\x5f\x53\x48\x4f\120\x5f\104\105\106\x41\x55\x4c\124"); goto AujdZ; mfTv3: if (SCMS) { goto BS5ES; } goto LWABs; Pn785: } public static function getAllShops() { goto hNXCl; hNXCl: $sql = "\x53\105\114\105\103\x54\x20\x73\x2e\x2a\xa\11\11\x9\11\106\122\117\115\x20" . _DB_PREFIX_ . "\163\x68\x6f\160\x20\163\xa\x9\11\x9\11\127\x48\105\x52\x45\x20\163\x2e\144\x65\154\145\x74\145\144\x20\75\40\60"; goto gdrhJ; DTb0A: return count($results); goto k0jJF; gdrhJ: $results = Db::getInstance()->executeS($sql); goto DTb0A; k0jJF: } public static function getShopsByProduct($id_product) { goto K5ty9; AgUGf: return $list; goto QOzt1; K5ty9: global $cache_shop_by_product; goto vjHvX; mGbxH: $list = array(); goto V1AQh; O_21Q: YmgXq: goto mGbxH; vFO8a: if (empty($cache)) { goto YmgXq; } goto wjOKT; Ri9bo: fdhIe: goto cifGd; Dr5rW: gNWxH: goto vFO8a; uls96: $cache = $cache_shop_by_product[$id_product]; goto Dr5rW; wj8Oh: if (!(!empty($res) && count($res) > 0)) { goto zQ73h; } goto cgBZv; cgBZv: foreach ($res as $value) { $list[] = $value["\x69\x64\137\163\150\x6f\160"]; HJQQy: } goto Ri9bo; cifGd: zQ73h: goto ssqaK; Egnwy: goto n6_Kv; goto O_21Q; sIVcD: if (!sc_array_key_exists($id_product, $cache_shop_by_product)) { goto gNWxH; } goto uls96; V1AQh: $res = Db::getInstance()->executeS("\12\11\11\x9\11\123\105\114\105\x43\x54\x20\140\151\x64\137\163\150\x6f\160\140\12\11\11\x9\x9\x46\x52\x4f\115\40\x60" . _DB_PREFIX_ . "\x70\162\x6f\144\x75\143\x74\137\x73\150\x6f\160\140\xa\x9\11\x9\x9\x57\110\105\122\105\40\x60\x69\144\137\160\x72\x6f\x64\x75\143\x74\140\x20\75\40" . (int) $id_product); goto wj8Oh; wjOKT: $list = $cache; goto Egnwy; vjHvX: $cache = array(); goto sIVcD; ssqaK: $cache_shop_by_product[$id_product] = $list; goto xziK7; xziK7: n6_Kv: goto AgUGf; QOzt1: } public static function getShopsByCategory($id_category) { goto Vs5jC; STHCS: $cache = array(); goto TeRKL; F0Cw_: tuGcG: goto GSE0C; NOBWU: $list = $cache; goto wQJKA; hUR2G: $cache_shop_by_category[$id_category] = $list; goto Xx8MY; cl1UN: $cache = $cache_shop_by_category[$id_category]; goto F0Cw_; grXmT: IZMpR: goto hUR2G; Xx8MY: hIAhB: goto AQFUz; TeRKL: if (!(is_array($cache_shop_by_category) && sc_array_key_exists($id_category, $cache_shop_by_category))) { goto tuGcG; } goto cl1UN; Vs5jC: global $cache_shop_by_category; goto STHCS; wQJKA: goto hIAhB; goto pyY63; AQFUz: return $list; goto FOEee; pQKzY: $list = array(); goto ORUoR; iTSiv: NHjWa: goto grXmT; eHmH2: if (!(!empty($res) && count($res) > 0)) { goto IZMpR; } goto H1aHQ; GSE0C: if (empty($cache)) { goto f7DG8; } goto NOBWU; H1aHQ: foreach ($res as $value) { $list[] = $value["\x69\144\137\163\150\157\160"]; MbPjX: } goto iTSiv; ORUoR: $res = Db::getInstance()->executeS("\xa\11\x9\x9\11\123\105\114\105\x43\124\40\x60\151\x64\x5f\163\x68\157\x70\x60\xa\11\x9\11\x9\x46\122\117\x4d\x20\x60" . _DB_PREFIX_ . "\143\x61\164\x65\x67\157\x72\171\137\163\150\x6f\x70\x60\12\11\11\x9\11\x57\110\105\122\105\40\140\x69\144\137\143\x61\x74\x65\147\157\162\171\x60\40\x3d\40" . (int) $id_category); goto eHmH2; pyY63: f7DG8: goto pQKzY; FOEee: } public static function qtySumStockAvailable($id_product) { goto a4C7f; nhW32: WC_Vj: goto VgIeJ; Jm7tD: foreach ($shops as $shop_id) { goto d1LPZ; Nz391: $query->where("\x69\144\137\x70\162\157\144\x75\x63\x74\40\75\40" . (int) $id_product); goto sCzrI; asukO: $new_qty = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto DkAyE; KQiY3: $query->select("\123\x55\115\50\x71\x75\x61\156\164\151\x74\x79\51"); goto lA6gV; d1LPZ: $query = new DbQuery(); goto KQiY3; qxtOM: $query = StockAvailable::addSqlShopRestriction($query, $shop_id); goto asukO; DkAyE: SCI::setQuantity($id_product, 0, $new_qty, $shop_id); goto X2YfN; lA6gV: $query->from("\163\164\x6f\143\153\137\x61\x76\141\151\154\x61\x62\x6c\145"); goto Nz391; X2YfN: N01fv: goto iOhiL; sCzrI: $query->where("\151\x64\137\x70\x72\157\144\165\x63\164\x5f\141\x74\x74\162\151\142\165\164\145\40\41\75\x20\60\x20"); goto qxtOM; iOhiL: } goto nhW32; a4C7f: $shops = self::getShopsByProduct($id_product); goto Jm7tD; VgIeJ: } public static function getSelectedWarehouseActionList($string = false, $id_product = null) { goto HPOMw; OPBBY: goto xN6eg; goto DKFmS; dsert: $list_temp = array(); goto dXW65; XJKAq: wRata: goto hCCsM; hCCsM: $list = $string ? implode("\54", $list) : $list; goto TNn8J; TNn8J: return $list; goto i2RRy; C8xvJ: $list = explode("\54", $_COOKIE["\x73\x63\x5f\x77\141\162\145\x68\x6f\165\163\145\137\154\151\163\x74"]); goto d5Ivz; voWho: if (empty($id_product)) { goto wRata; } goto dsert; dXW65: $warehouses = Warehouse::getProductWarehouseList($id_product, 0, self::getSelectedShop()); goto P7UFm; mdqf1: $list = array(SCI::getSelectedWarehouse()); goto OPBBY; HPOMw: $list = array(); goto ccTe6; P7UFm: foreach ($warehouses as $warehouse) { goto XnIRh; XnIRh: $warehouse_id = $warehouse["\151\144\x5f\167\141\x72\x65\150\157\165\163\x65"]; goto gNfCW; X7otb: f0Ng7: goto j9hLd; ahM8F: $list_temp[] = $warehouse_id; goto X7otb; j9hLd: KpfBc: goto n4XO2; gNfCW: if (!sc_in_array($warehouse_id, $list, "\123\x43\111\x53\145\x6c\x65\143\164\x65\144\x57\141\162\x65\x68\157\x75\163\x65\x50\x72\x6f\x64\x75\x63\164")) { goto f0Ng7; } goto ahM8F; n4XO2: } goto M47v4; d5Ivz: xN6eg: goto voWho; M47v4: D1SI2: goto MoALp; DKFmS: pnbkY: goto C8xvJ; ccTe6: if (!empty($_COOKIE["\x73\x63\137\167\x61\162\145\x68\157\165\x73\145\x5f\x6c\x69\163\164"])) { goto pnbkY; } goto mdqf1; MoALp: $list = $list_temp; goto XJKAq; i2RRy: } public static function getSelectedWarehouse() { goto hEtAK; hEtAK: if (SCAS) { goto dvEaO; } goto Ea6kg; Ea6kg: return 0; goto O6327; SUdY5: return isset($_COOKIE["\x73\143\x5f\167\x61\x72\x65\x68\157\165\163\x65\137\x73\x65\154\145\x63\x74\x65\144"]) ? (int) $_COOKIE["\163\143\x5f\167\x61\162\145\150\157\x75\163\x65\137\163\145\x6c\x65\x63\164\145\144"] : 0; goto uDPuC; O6327: goto VcXs_; goto JjSqI; uDPuC: VcXs_: goto oa_Ws; JjSqI: dvEaO: goto SUdY5; oa_Ws: } public static function getProductRealQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false, $has_combination = false) { goto MBBvz; RKktg: $query->select("\x6f\144\56\160\x72\157\144\165\143\164\x5f\x71\x75\x61\156\x74\151\x74\171\x2c\40\x6f\x64\x2e\160\x72\157\144\165\143\x74\x5f\161\165\141\x6e\164\151\x74\x79\x5f\x72\x65\x66\165\156\x64\x65\144"); goto H9GjZ; Q7APi: $query->where("\x73\x6f\x64\x2e\x69\x64\x5f\160\162\x6f\x64\165\143\164\x20\x3d\40" . (int) $id_product . "\40\x41\x4e\x44\40\163\157\144\56\151\x64\137\160\162\x6f\144\165\143\164\137\141\x74\164\162\x69\142\x75\x74\145\40\x3d\x20" . (int) $id_product_attribute); goto stDPX; qaRv3: foreach ($supply_orders_qties as $qty) { goto JGEIA; DqoV0: MqXZi: goto sMHUX; sMHUX: hhNp8: goto BTQWu; JGEIA: if (!($qty["\x71\165\141\x6e\x74\x69\x74\x79\137\x65\x78\160\x65\143\164\145\144"] > $qty["\161\165\141\156\164\151\164\171\x5f\162\x65\143\145\x69\x76\145\144"])) { goto MqXZi; } goto d7JJY; d7JJY: $supply_orders_qty += $qty["\x71\x75\141\x6e\164\151\164\x79\137\145\170\160\x65\x63\x74\x65\144"] - $qty["\161\x75\x61\156\164\151\164\171\x5f\x72\x65\143\x65\x69\166\x65\x64"]; goto DqoV0; BTQWu: } goto pgyT1; stDPX: if (!(!is_null($ids_warehouse) && count($ids_warehouse))) { goto qVZTz; } goto nPBPX; Npu8B: if ($has_combination) { goto m3uiQ; } goto iUpTn; iUpTn: $temp_ids_warehouse = array(); goto ooBUJ; yu8Z4: $query->where("\157\x64\56\x69\x64\137\x77\x61\x72\145\150\x6f\x75\x73\x65\x20\x49\116\x28" . implode("\54\x20", $ids_warehouse) . "\51"); goto KQCak; iBm6U: vyVEn: goto Npu8B; chvqu: Xx_Jw: goto UEXBh; KQCak: aUWdK: goto CvUhh; SH1Xi: $client_orders_qty = 0; goto o3jTf; ujEMB: $query->select("\x73\x6f\144\56\x71\165\x61\156\164\x69\x74\171\x5f\145\170\x70\x65\143\164\x65\x64\54\40\163\157\144\x2e\x71\x75\141\156\164\151\x74\x79\x5f\162\145\143\145\x69\x76\x65\x64"); goto Ci0KV; fp4Fo: $query->leftjoin("\x73\x75\x70\x70\154\171\x5f\157\x72\x64\145\162\x5f\163\x74\x61\164\x65", "\163\157\x73", "\x73\157\163\x2e\151\144\x5f\163\x75\x70\x70\x6c\x79\137\x6f\x72\144\x65\x72\137\x73\x74\x61\164\x65\40\x3d\40\x73\x6f\x2e\151\x64\137\163\165\160\160\x6c\171\137\157\162\x64\145\162\x5f\x73\164\x61\x74\x65"); goto x7uxJ; OYCMl: foreach ($res as $row) { $client_orders_qty += $row["\160\x72\x6f\x64\165\143\164\137\161\165\141\156\164\151\164\x79"] - $row["\160\x72\x6f\144\x75\x63\164\137\x71\x75\x61\x6e\x74\151\x74\x79\x5f\x72\145\146\165\156\144\145\x64"]; t5IsB: } goto E0Wjc; CvUhh: $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); goto SH1Xi; HFkDM: qVZTz: goto sq_BQ; GtDio: $qty = self::getProductPhysicalQuantities($id_product, $id_product_attribute, $ids_warehouse, $usable, $has_combination); goto t9IUL; H9GjZ: $query->from("\157\x72\x64\x65\x72\x5f\144\x65\x74\141\151\x6c", "\x6f\x64"); goto nCzRS; tCGB4: mYCIn: goto LwG36; Ci0KV: $query->from("\163\165\160\x70\154\x79\137\157\162\x64\145\x72", "\163\x6f"); goto oOdFl; E0Wjc: D_fd5: goto rtoKF; o3jTf: if (!count($res)) { goto edZpk; } goto OYCMl; iGAps: m3uiQ: goto scyvc; U_p6d: $query->leftJoin("\157\162\x64\145\162\137\x73\x74\141\164\x65", "\x6f\x73", "\157\163\x2e\151\x64\x5f\157\x72\144\x65\162\x5f\x73\x74\141\164\145\x20\x3d\x20\157\150\56\151\144\x5f\157\x72\x64\x65\162\x5f\163\164\x61\164\145"); goto l2Ioa; x7uxJ: $query->where("\163\x6f\163\56\x70\x65\x6e\x64\x69\x6e\147\x5f\162\145\143\145\151\160\x74\x20\x3d\x20\x31"); goto Q7APi; pgyT1: eDshD: goto GtDio; nCzRS: $query->leftjoin("\x6f\162\x64\145\162\163", "\157", "\157\56\151\x64\137\x6f\162\x64\145\162\40\75\40\157\x64\56\x69\144\137\157\162\144\x65\x72"); goto rPG_O; QE22p: $ids_warehouse = array($ids_warehouse); goto GLzvz; rPG_O: $query->where("\157\x64\x2e\160\x72\157\144\x75\x63\x74\x5f\151\144\40\x3d\x20" . (int) $id_product); goto kEgw_; oOdFl: $query->leftjoin("\x73\165\x70\160\154\171\x5f\157\x72\144\145\162\137\144\145\x74\141\151\x6c", "\163\157\144", "\x73\x6f\144\x2e\x69\x64\x5f\x73\x75\x70\160\x6c\x79\x5f\157\162\x64\x65\x72\40\75\40\x73\x6f\x2e\x69\x64\x5f\163\165\x70\160\154\171\x5f\x6f\x72\144\x65\x72"); goto fp4Fo; t9IUL: return $qty - $client_orders_qty + $supply_orders_qty; goto yavHw; GLzvz: cYhiW: goto BJuyG; kEgw_: if (!(0 != $id_product_attribute)) { goto YSTUC; } goto X_1XV; rtoKF: edZpk: goto ND3xt; IkJ45: $supply_orders_qty = 0; goto qaRv3; X_1XV: $query->where("\157\x64\x2e\x70\x72\x6f\x64\x75\x63\164\137\141\x74\164\162\x69\142\165\x74\145\137\x69\x64\x20\75\40" . (int) $id_product_attribute); goto up_Ny; fVWac: $query->where("\x6f\x2e\166\141\154\151\144\x20\x3d\40\x31\40\117\122\40\x28\157\x73\x2e\151\x64\x5f\157\x72\144\145\x72\x5f\x73\164\141\164\145\40\x21\75\x20" . (int) Configuration::get("\x50\123\137\117\x53\137\x45\122\122\117\x52") . "\xa\11\x9\x9\x9\x9\x20\x20\40\x41\116\x44\40\x6f\x73\x2e\x69\144\x5f\x6f\x72\144\145\162\137\163\164\141\164\145\x20\41\75\x20" . (int) Configuration::get("\120\x53\x5f\x4f\123\x5f\103\101\116\x43\x45\x4c\105\104") . "\51"); goto fSS4Z; nPBPX: $query->where("\163\x6f\56\151\x64\137\167\141\x72\x65\x68\x6f\165\x73\145\x20\111\116\x28" . implode("\54\x20", $ids_warehouse) . "\51"); goto HFkDM; l2Ioa: $query->where("\x6f\x73\56\163\150\x69\160\x70\145\144\40\41\x3d\x20\61"); goto fVWac; Dk9S0: return Product::getRealQuantity((int) $id_product, (int) $id_product_attribute, $ids_warehouse, (int) SCI::getSelectedShop()); goto tCGB4; MBBvz: if (!version_compare(_PS_VERSION_, "\x31\x2e\66\56\61\x2e\60", "\x3e\x3d")) { goto mYCIn; } goto Dk9S0; ND3xt: $query = new DbQuery(); goto ujEMB; BJuyG: $ids_warehouse = array_map("\151\x6e\x74\x76\x61\x6c", $ids_warehouse); goto iBm6U; UEXBh: $ids_warehouse = $temp_ids_warehouse; goto iGAps; ooBUJ: foreach ($ids_warehouse as $id_warehouse) { goto WfDJ2; S9IGW: Gb5Ui: goto gu1ti; QWNzN: if (empty($temp_check_in_warehouse)) { goto C4tuT; } goto GSHZt; GSHZt: $temp_ids_warehouse[] = $id_warehouse; goto RWyX0; WfDJ2: $temp_check_in_warehouse = WarehouseProductLocation::getIdByProductAndWarehouse((int) $id_product, (int) $id_product_attribute, (int) $id_warehouse); goto QWNzN; RWyX0: C4tuT: goto S9IGW; gu1ti: } goto chvqu; up_Ny: YSTUC: goto OGLLQ; LwG36: if (is_null($ids_warehouse)) { goto vyVEn; } goto eLk_x; sq_BQ: $supply_orders_qties = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); goto IkJ45; eLk_x: if (is_array($ids_warehouse)) { goto cYhiW; } goto QE22p; scyvc: $query = new DbQuery(); goto RKktg; OGLLQ: $query->leftJoin("\157\x72\144\x65\x72\x5f\150\151\x73\x74\157\162\171", "\157\x68", "\x6f\x68\x2e\x69\x64\x5f\x6f\162\x64\145\162\x20\x3d\40\157\56\151\144\x5f\157\162\144\x65\162\x20\x41\x4e\104\x20\157\150\56\151\144\137\x6f\162\144\x65\x72\x5f\150\x69\163\164\x6f\162\171\x20\x3d\40\50\x53\105\114\x45\x43\x54\40\x4d\101\130\50\157\x68\62\x2e\x69\x64\137\x6f\162\144\145\x72\x5f\150\x69\x73\x74\157\x72\x79\x29\40\106\122\x4f\115\x20" . _DB_PREFIX_ . "\157\162\x64\145\162\137\150\x69\x73\x74\x6f\162\171\40\157\150\x32\40\x57\110\105\x52\105\x20\157\x68\62\x2e\x69\x64\137\x6f\x72\144\x65\162\40\75\40\157\x2e\x69\144\137\x6f\162\x64\145\162\51"); goto U_p6d; xCeOb: if (!count($ids_warehouse)) { goto aUWdK; } goto yu8Z4; fSS4Z: $query->groupBy("\x6f\144\56\151\x64\137\x6f\x72\144\x65\162\x5f\x64\x65\164\141\151\154"); goto xCeOb; yavHw: } public static function getProductPhysicalQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false, $has_combination = false) { goto XKOJS; czf_b: $ids_warehouse = array($ids_warehouse); goto GWRkG; OD_Gz: if (!(0 != $id_product_attribute)) { goto PLGcP; } goto XwCbE; Dh6s4: if (!$has_combination) { goto OZovy; } goto wRu9i; TJevt: if (is_array($ids_warehouse)) { goto UUoOa; } goto czf_b; nEdZc: $ids_warehouse = array(); goto iEVQk; znQi6: N2W2C: goto GrSGx; GrSGx: bUxWR: goto gsEsH; rRUAd: $query->where("\163\56\151\144\x5f\160\x72\x6f\x64\165\x63\x74\x20\75\40" . (int) $id_product); goto OD_Gz; u6vdn: LC6If: goto TJevt; wRu9i: $query->where("\163\56\x69\144\137\160\x72\x6f\144\x75\143\164\137\x61\x74\164\162\151\x62\x75\164\145\x20\41\75\40\x30"); goto s8R8F; ikO2J: if (count($ids_warehouse)) { goto N2W2C; } goto fkA6J; fkA6J: return 0; goto znQi6; emqtQ: $query->select("\123\x55\115\x28" . ($usable ? "\163\x2e\165\x73\141\x62\154\145\x5f\161\165\x61\156\164\151\x74\x79" : "\163\56\160\x68\171\163\151\143\x61\x6c\137\161\165\x61\x6e\164\x69\x74\x79") . "\x29"); goto e1Jxa; GWRkG: UUoOa: goto XZ2ev; mplxF: if (!count($ids_warehouse)) { goto UAX1X; } goto C7Zv_; gsEsH: $query = new DbQuery(); goto emqtQ; cV6ft: UAX1X: goto Dh6s4; XKOJS: if (!is_null($ids_warehouse)) { goto LC6If; } goto nEdZc; ZbQKu: if (!$has_combination) { goto PXnCm; } goto wjnKh; XwCbE: $query->where("\x73\x2e\151\144\x5f\160\x72\157\x64\165\x63\164\x5f\141\x74\x74\x72\x69\142\x75\x74\x65\40\x3d\x20" . (int) $id_product_attribute); goto cLPPF; Sxqx3: PXnCm: goto rRUAd; s8R8F: OZovy: goto dFUN1; cLPPF: PLGcP: goto mplxF; C7Zv_: $query->where("\163\x2e\x69\x64\137\x77\141\x72\x65\150\157\165\x73\145\40\x49\116\x28" . implode("\54\x20", $ids_warehouse) . "\51"); goto cV6ft; dFUN1: return (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto QtvCk; XZ2ev: $ids_warehouse = array_map("\151\x6e\x74\166\x61\154", $ids_warehouse); goto ikO2J; wjnKh: $query->innerJoin("\x77\x61\162\145\x68\x6f\x75\x73\145\137\160\x72\157\x64\x75\x63\x74\137\x6c\x6f\143\x61\x74\151\157\156", "\167\160\154", "\50\167\x70\154\56\x69\144\x5f\160\162\157\144\x75\x63\x74\x20\75\x20\x73\x2e\151\144\137\x70\162\157\144\x75\143\x74\40\101\x4e\x44\x20\x77\x70\x6c\x2e\x69\144\x5f\x70\x72\x6f\x64\x75\143\x74\x5f\x61\x74\164\x72\151\x62\165\x74\145\x20\75\40\x73\56\151\x64\137\160\162\157\x64\x75\x63\164\x5f\x61\164\x74\162\151\142\165\x74\x65" . (count($ids_warehouse) ? "\40\101\116\x44\x20\x77\x70\x6c\x2e\x69\144\x5f\167\141\162\x65\150\x6f\x75\163\x65\40\x49\x4e\x28" . implode("\x2c\x20", $ids_warehouse) . "\x29" : '') . "\51"); goto Sxqx3; iEVQk: goto bUxWR; goto u6vdn; e1Jxa: $query->from("\163\x74\x6f\143\153", "\x73"); goto ZbQKu; QtvCk: } public static function getCustomerCartRules($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null, $free_shipping_only = false, $highlight_only = false) { goto U7vtg; fdIoM: goto BwW1I; goto g9vWP; U7vtg: if (version_compare(_PS_VERSION_, "\x31\x2e\x37\56\60\x2e\60", "\76\x3d")) { goto jECCA; } goto uIovd; uIovd: return self::_getCustomerCartRules($id_lang, $id_customer, $active, $includeGeneric, $inStock, $cart); goto fdIoM; VMw7s: BwW1I: goto jjYZb; GvUJs: return self::_getCustomerCartRules_17($id_lang, $id_customer, $active, $includeGeneric, $inStock, $cart, $free_shipping_only, $highlight_only); goto VMw7s; g9vWP: jECCA: goto GvUJs; jjYZb: } public static function _getCustomerCartRules_17($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null, $free_shipping_only = false, $highlight_only = false) { goto vAQkO; Ma8Kw: tiOW4: goto bJbkz; PkOAd: $sql_part1 = "\52\40\106\x52\x4f\115\40\140" . _DB_PREFIX_ . "\143\141\x72\164\x5f\162\x75\x6c\145\140\x20\x63\x72\12\x9\x9\x9\x9\114\x45\106\x54\40\x4a\x4f\111\116\40\x60" . _DB_PREFIX_ . "\x63\x61\162\x74\137\162\165\154\x65\137\x6c\x61\156\147\140\x20\143\162\x6c\x20\117\x4e\40\50\143\162\56\x60\x69\144\x5f\x63\x61\162\164\x5f\x72\x75\154\x65\x60\x20\x3d\40\x63\x72\x6c\56\140\151\144\x5f\x63\x61\162\164\137\162\x75\x6c\145\x60\x20\x41\116\104\40\143\162\154\56\140\151\144\137\x6c\141\156\147\x60\40\75\x20" . (int) $id_lang . "\x29"; goto tZm6f; wy_3C: qT1HV: goto z1pj6; smZNw: return array(); goto bv3_S; JuhNw: $sql_part2 .= "\40\x41\x4e\x44\40\x66\x72\145\145\x5f\x73\x68\151\x70\160\151\x6e\x67\x20\75\x20\x31\40\101\116\104\x20\143\141\162\x72\x69\145\x72\x5f\162\145\163\164\x72\151\x63\164\151\157\x6e\x20\75\40\x31"; goto IIpMa; goI2G: $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql, true, false); goto DwwNd; vwZzY: $sql .= "\40\x55\x4e\x49\117\116\40\50\x53\x45\114\105\103\x54\40" . $sql_part1 . "\40\x57\x48\x45\122\x45\40\143\x72\56\140\x67\x72\157\x75\x70\137\x72\145\163\164\162\151\143\x74\x69\x6f\156\x60\40\x3d\x20\x31\x20" . $sql_part2 . "\51"; goto BRZoa; bJbkz: vJePV: goto tYXGa; VLIV_: foreach ($result as $key => $cart_rule) { goto po3vN; HAfH1: unset($result[$key]); goto JV21v; R5TeF: pCUe0: goto HAfH1; mrI_1: $cr = new CartRule((int) $cart_rule["\x69\x64\x5f\143\x61\x72\x74\137\162\165\154\x65"]); goto MTstW; oFNm7: ijShG: goto YfmBm; po3vN: if (!$cart_rule["\x70\x72\x6f\x64\x75\x63\164\x5f\x72\145\x73\164\x72\x69\x63\x74\x69\x6f\x6e"]) { goto ooM8c; } goto mrI_1; tZp_s: if (!($r !== false)) { goto pCUe0; } goto k4bZf; MTstW: $r = $cr->checkProductRestrictions(Context::getContext(), false, false); goto tZp_s; JV21v: ooM8c: goto oFNm7; k4bZf: goto ijShG; goto R5TeF; YfmBm: } goto Ma8Kw; ljwdM: if (!(isset($cart) && isset($cart->id))) { goto vJePV; } goto VLIV_; l6MGg: $result = $result_bak; goto CG7Uh; pwJwG: $sql = "\50\123\x45\114\105\103\124\x20\x53\121\114\137\116\x4f\x5f\x43\101\x43\x48\105\x20" . $sql_part1 . "\x20\127\110\105\122\105\40\x63\162\x2e\140\151\144\x5f\143\165\x73\x74\157\155\x65\162\140\40\x3d\40" . (int) $id_customer . "\x20" . $sql_part2 . "\x29"; goto vwZzY; CG7Uh: cSRKy: goto Vl7H6; oQ5YT: foreach ($result as $key => $cart_rule) { goto D32eJ; VZWc9: foreach ($cartRuleShops as $cartRuleShop) { goto nxeBX; D2K5x: goto J5oiG; goto TtSyk; nxeBX: if (!(Shop::isFeatureActive() && $cartRuleShop["\151\144\x5f\x73\x68\x6f\160"] == (int) SCI::getSelectedShop())) { goto zZBoZ; } goto D2K5x; TtSyk: zZBoZ: goto OkLdh; OkLdh: XdmHD: goto pC7_1; pC7_1: } goto jFifX; WJSXN: P6RHt: goto oEklD; D32eJ: if (!$cart_rule["\163\150\157\160\x5f\x72\x65\163\x74\x72\x69\143\x74\151\157\156"]) { goto P6RHt; } goto iwqSN; iwqSN: $cartRuleShops = Db::getInstance()->executeS("\123\105\114\x45\x43\124\40\x69\x64\137\163\150\x6f\160\x20\106\122\117\115\40" . _DB_PREFIX_ . "\143\141\x72\164\137\162\x75\154\145\x5f\163\x68\x6f\x70\x20\127\x48\x45\x52\105\x20\x69\x64\x5f\143\x61\162\164\x5f\162\165\x6c\145\x20\x3d\x20" . (int) $cart_rule["\x69\144\137\143\141\162\x74\x5f\x72\165\154\145"]); goto VZWc9; jFifX: H1tSp: goto SjlL3; oEklD: J5oiG: goto aNTxz; SjlL3: unset($result[$key]); goto WJSXN; aNTxz: } goto si_1W; jDTil: drCkm: goto gexiH; M4GKW: Irnoh: goto goI2G; sRQ30: foreach ($result as $key => $cart_rule) { goto WA2yo; GdANI: RhbWB: goto iN5tf; SeK7a: foreach ($cartRuleGroups as $cartRuleGroup) { goto w3iLQ; h1MXd: WpGwQ: goto e4czr; w3iLQ: if (!in_array($cartRuleGroup["\151\x64\x5f\147\x72\x6f\x75\160"], $customerGroups)) { goto W7Pcd; } goto K9_B1; K9_B1: goto RhbWB; goto X85yZ; X85yZ: W7Pcd: goto h1MXd; e4czr: } goto yJtkX; WA2yo: if (!$cart_rule["\x67\162\x6f\165\x70\137\x72\145\163\x74\162\x69\143\x74\151\157\x6e"]) { goto ZuBww; } goto Tlw4G; QZuv_: unset($result[$key]); goto Aei3K; Aei3K: ZuBww: goto GdANI; Tlw4G: $cartRuleGroups = Db::getInstance()->executeS("\123\x45\114\x45\x43\x54\x20\x69\144\137\147\162\x6f\x75\160\40\x46\x52\x4f\115\40" . _DB_PREFIX_ . "\143\x61\x72\164\137\x72\x75\154\145\137\147\x72\x6f\165\160\x20\x57\110\105\122\x45\x20\x69\x64\x5f\x63\141\162\x74\137\x72\x75\154\145\40\75\x20" . (int) $cart_rule["\151\144\137\143\141\162\164\137\162\165\154\x65"]); goto SeK7a; yJtkX: hvoqU: goto QZuv_; iN5tf: } goto ppcls; gexiH: unset($cart_rule); goto oQ5YT; lb2X5: $result = array(); goto G4i3H; z1pj6: if ($country_restriction) { goto cSRKy; } goto l6MGg; bv3_S: WV_ky: goto PkOAd; vAQkO: if (CartRule::isFeatureActive()) { goto WV_ky; } goto smZNw; BRZoa: if (!($includeGeneric && (int) $id_customer != 0)) { goto Irnoh; } goto w10iK; BkFZx: $sql_part2 .= "\40\101\x4e\104\40\x68\x69\147\x68\x6c\151\x67\x68\x74\x20\75\x20\x31\40\101\116\104\x20\x63\157\144\145\x20\116\117\x54\x20\x4c\111\113\x45\40\x22" . pSQL(CartRule::BO_ORDER_CODE_PREFIX) . "\x25\42"; goto YDhBc; Tnh0l: $customerGroups = Customer::getGroupsStatic($id_customer); goto sRQ30; E26xJ: if (!$free_shipping_only) { goto ryJJE; } goto JuhNw; w10iK: $sql .= "\40\x55\x4e\111\x4f\116\x20\x28\x53\x45\x4c\105\x43\x54\40" . $sql_part1 . "\x20\x57\110\105\122\105\40\x63\162\56\x60\151\144\x5f\x63\x75\163\164\x6f\x6d\x65\162\x60\40\x3d\40\60\40" . $sql_part2 . "\x29"; goto M4GKW; rYfkX: if (!$highlight_only) { goto TgNrc; } goto BkFZx; Vl7H6: return $result; goto hTaJM; DSORD: foreach ($result_bak as $key => $cart_rule) { goto kmqK0; aaq9w: V1W4Y: goto AvWFr; UJcR7: $countries = Db::getInstance()->ExecuteS("\xa\40\40\x20\40\40\40\40\x20\40\40\40\x20\x20\x20\40\x20\40\x20\40\x20\x53\x45\x4c\x45\103\124\40\140\x69\x64\x5f\143\157\165\x6e\x74\x72\171\140\xa\40\40\40\x20\40\x20\40\40\x20\40\40\40\x20\40\x20\40\x20\40\40\40\x46\122\117\115\40\140" . _DB_PREFIX_ . "\x61\x64\x64\162\x65\163\x73\x60\xa\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\40\40\x20\40\40\x20\x20\40\x20\40\x57\110\x45\x52\x45\x20\x60\x69\144\x5f\143\165\x73\x74\157\x6d\145\162\x60\x20\75\x20" . (int) $id_customer . "\12\x20\x20\x20\40\x20\x20\40\x20\x20\x20\40\x20\x20\x20\x20\40\x20\40\x20\40\101\116\104\40\x60\144\145\x6c\x65\x74\145\144\x60\40\75\x20\60"); goto ktPZv; bD2qO: goto TpAdB; goto DSmff; RdthT: $country_restriction = true; goto UJcR7; swdqP: foreach ($countries as $country) { goto YJoJB; HbRTm: if (!$id_cart_rule) { goto nWtgs; } goto FFdqn; FFdqn: $result[] = $result_bak[$key]; goto yFaO7; rvRLV: d4lVC: goto siJt8; YJoJB: $id_cart_rule = (bool) Db::getInstance()->getValue("\12\x20\x20\x20\40\40\x20\40\x20\x20\x20\x20\40\x20\40\x20\x20\40\40\40\40\x20\x20\40\x20\x20\x20\x20\40\x53\105\x4c\x45\x43\x54\40\143\162\x63\56\151\x64\137\143\x61\x72\164\x5f\162\x75\x6c\x65\12\40\x20\x20\40\40\x20\40\x20\40\x20\x20\x20\x20\x20\x20\x20\40\x20\40\40\40\40\x20\x20\x20\x20\40\x20\106\x52\x4f\x4d\x20" . _DB_PREFIX_ . "\143\x61\162\164\137\162\165\x6c\x65\137\x63\x6f\165\156\x74\x72\171\40\143\x72\x63\xa\x20\x20\x20\x20\40\40\x20\40\40\40\x20\x20\x20\40\x20\40\40\40\40\x20\40\40\x20\x20\x20\x20\40\40\x57\110\105\x52\x45\40\143\x72\x63\56\151\144\x5f\143\141\162\x74\x5f\x72\165\154\145\x20\75\40" . (int) $cart_rule["\x69\144\137\143\141\162\x74\137\x72\165\154\145"] . "\xa\40\40\40\x20\40\40\40\x20\40\40\x20\40\40\x20\40\40\x20\40\x20\x20\x20\x20\x20\40\40\x20\x20\40\x41\116\x44\x20\x63\162\143\x2e\x69\x64\x5f\x63\157\x75\156\164\162\171\40\x3d\x20" . (int) $country["\151\144\137\x63\x6f\x75\156\164\162\171"]); goto HbRTm; yFaO7: goto Zhq0B; goto tiTBg; tiTBg: nWtgs: goto rvRLV; siJt8: } goto w0zTh; w0zTh: Zhq0B: goto aaq9w; dYfJR: mwdea: goto u4zBf; AvWFr: TpAdB: goto dYfJR; DSmff: Wjts6: goto RdthT; ktPZv: if (!(is_array($countries) && count($countries))) { goto V1W4Y; } goto swdqP; kmqK0: if ($cart_rule["\143\x6f\165\156\164\x72\x79\x5f\162\145\163\x74\x72\x69\x63\164\151\x6f\156"]) { goto Wjts6; } goto dsFdF; dsFdF: $result[] = $result_bak[$key]; goto bD2qO; u4zBf: } goto wy_3C; tYXGa: $result_bak = $result; goto lb2X5; YDhBc: TgNrc: goto pwJwG; Jgsv0: return array(); goto QIIdq; si_1W: rhTtY: goto ljwdM; G4i3H: $country_restriction = false; goto DSORD; DwwNd: if (!empty($result)) { goto s0La7; } goto Jgsv0; QIIdq: s0La7: goto Tnh0l; tZm6f: $sql_part2 = "\40\101\x4e\x44\x20\143\x72\x2e\x64\x61\x74\x65\137\x66\162\157\155\x20\74\40\x22" . date("\x59\55\155\x2d\144\x20\x48\72\x69\72\163") . "\x22\12\x9\x9\x9\x9\101\x4e\x44\x20\143\x72\56\x64\141\x74\145\x5f\x74\x6f\40\76\x20\x22" . date("\x59\x2d\155\55\144\x20\x48\72\151\72\163") . "\42\12\11\x9\x9\11" . ($active ? "\x41\116\104\40\143\x72\x2e\x60\141\x63\164\x69\166\145\140\x20\75\40\x31" : '') . "\12\x9\11\x9\11" . ($inStock ? "\101\116\x44\40\143\162\56\140\x71\x75\x61\156\164\151\164\x79\x60\x20\76\x20\x30" : ''); goto E26xJ; IIpMa: ryJJE: goto rYfkX; SFiwO: foreach ($result as &$cart_rule) { goto rNbNR; MkWtQ: $quantity_used += $cart->getDiscountsCustomer((int) $cart_rule["\151\144\137\x63\x61\162\164\x5f\162\165\x6c\145"]); goto pYIB9; YPMtz: UhqTp: goto zBm1V; XvRcB: $cart_rule["\x71\165\x61\x6e\x74\x69\x74\x79\x5f\146\x6f\162\x5f\x75\163\x65\162"] = 0; goto mVhIT; mVhIT: goto Hcabf; goto D6qos; D6qos: SDYqp: goto C4iD0; pYIB9: FQBGk: goto xjMOM; rNbNR: if ($cart_rule["\x71\x75\141\x6e\164\151\x74\x79\137\160\145\162\137\x75\x73\145\x72"]) { goto SDYqp; } goto XvRcB; C4iD0: $quantity_used = Order::getDiscountsCustomer((int) $id_customer, (int) $cart_rule["\x69\144\x5f\x63\x61\x72\164\x5f\162\x75\154\x65"]); goto Nw0OI; GRjDB: Hcabf: goto YPMtz; xjMOM: $cart_rule["\161\165\141\x6e\164\151\164\171\137\146\x6f\x72\137\x75\163\145\162"] = $cart_rule["\161\165\x61\x6e\x74\151\164\171\x5f\x70\x65\162\x5f\165\x73\x65\x72"] - $quantity_used; goto GRjDB; Nw0OI: if (!(isset($cart) && isset($cart->id))) { goto FQBGk; } goto MkWtQ; zBm1V: } goto jDTil; ppcls: zbhnp: goto SFiwO; hTaJM: } public static function _getCustomerCartRules($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null) { goto Zq5Ms; oixjF: unset($cart_rule); goto Uh1bk; ts424: foreach ($result as $cart_rule) { goto p7ncN; u4EE8: A9an3: goto lGP6m; qhhQe: if (!(isset($cart) && isset($cart->id))) { goto fhU7a; } goto cEqVB; iZEzs: goto G0rfS; goto u4EE8; jciM0: $cart_rule["\x71\x75\x61\x6e\x74\x69\x74\171\137\146\157\x72\137\165\163\145\162"] = $cart_rule["\161\x75\141\156\164\151\x74\171\137\160\145\162\x5f\x75\163\145\162"] - $quantity_used; goto ZwsnM; cEqVB: $quantity_used += $cart->getDiscountsCustomer((int) $cart_rule["\151\x64\x5f\143\x61\162\164\137\162\165\x6c\x65"]); goto UXLwb; XQqqD: $cart_rule["\x71\165\141\x6e\x74\151\x74\171\x5f\x66\157\x72\137\x75\x73\x65\x72"] = 0; goto iZEzs; lGP6m: $quantity_used = Order::getDiscountsCustomer((int) $id_customer, (int) $cart_rule["\x69\x64\x5f\x63\141\162\164\x5f\162\x75\x6c\x65"]); goto qhhQe; p7ncN: if ($cart_rule["\x71\x75\x61\x6e\164\x69\x74\x79\x5f\160\145\162\x5f\165\163\145\162"]) { goto A9an3; } goto XQqqD; B7Xsj: uTY4W: goto m__kn; UXLwb: fhU7a: goto jciM0; ZwsnM: G0rfS: goto B7Xsj; m__kn: } goto S2nta; mW1z2: VU9tR: goto IlLug; S2nta: YxAgt: goto jKfKt; M00V1: PaV9j: goto u4Lwy; hd_jR: Ugizz: goto Wr0By; u4Lwy: $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS("\12\11\11\x53\105\114\x45\x43\124\40\52\12\11\11\x46\122\117\115\x20\x60" . _DB_PREFIX_ . "\143\141\162\x74\137\x72\165\x6c\145\x60\40\143\162\xa\x9\11\x4c\x45\x46\x54\40\x4a\117\x49\116\40\x60" . _DB_PREFIX_ . "\143\x61\162\x74\x5f\x72\165\x6c\145\x5f\x6c\x61\156\x67\140\40\143\x72\154\40\117\x4e\x20\50\143\162\56\140\151\x64\137\x63\x61\x72\164\137\x72\165\x6c\x65\x60\x20\75\40\143\162\x6c\x2e\140\151\x64\137\143\x61\162\x74\137\x72\165\154\x65\140\40\101\x4e\x44\40\143\x72\x6c\x2e\140\151\x64\x5f\x6c\141\156\147\140\40\x3d\x20" . (int) $id_lang . "\51\12\11\x9\127\110\x45\x52\x45\x20\50\xa\x9\x9\x9\143\x72\56\x60\x69\144\x5f\x63\165\x73\x74\157\x6d\x65\162\140\x20\75\x20" . (int) $id_customer . "\xa\11\x9\11" . ($includeGeneric ? "\117\122\40\143\x72\56\140\151\144\137\143\165\x73\x74\x6f\x6d\145\162\x60\x20\75\40\x30" : '') . "\xa\x9\11\51\xa\11\11" . ($active ? "\x41\x4e\x44\x20\x63\162\56\x60\x61\x63\164\151\166\145\140\x20\75\x20\x31" : '') . "\xa\11\11" . ($inStock ? "\x41\x4e\x44\40\x63\162\x2e\x60\x71\165\x61\156\x74\151\164\171\x60\x20\76\x20\60" : '')); goto Ze9vp; ictXK: MEwiM: goto HB8Bp; HB8Bp: uTmSA: goto Ube_p; IlLug: return $result; goto R8Mw4; Zq5Ms: if (CartRule::isFeatureActive()) { goto PaV9j; } goto CaIk4; Wr0By: LUUX9: goto ts424; Ze9vp: if (!$includeGeneric) { goto LUUX9; } goto kYYIw; SPUs1: foreach ($result as $key => $cart_rule) { goto drTNN; drTNN: if (!$cart_rule["\147\x72\157\165\x70\x5f\x72\x65\163\x74\x72\151\143\164\x69\x6f\156"]) { goto FtDIi; } goto ZIy0z; QG3lK: uR1yK: goto Hu64F; WiOQq: unset($result[$key]); goto CouXT; timkI: YcU6h: goto WiOQq; ZIy0z: $cartRuleGroups = Db::getInstance()->executeS("\123\x45\114\105\x43\124\40\x69\144\x5f\147\162\157\x75\160\40\x46\122\x4f\115\x20" . _DB_PREFIX_ . "\x63\141\x72\164\137\x72\x75\154\145\137\x67\x72\157\165\160\x20\x57\110\x45\122\105\x20\x69\144\137\x63\x61\162\164\137\162\165\154\145\40\75\x20" . (int) $cart_rule["\x69\144\x5f\x63\x61\x72\164\x5f\162\x75\154\x65"]); goto yOpmR; yOpmR: foreach ($cartRuleGroups as $cartRuleGroup) { goto IVvH6; FxgH8: goto uR1yK; goto KPpdA; IVvH6: if (!in_array($cartRuleGroup["\151\144\x5f\x67\x72\x6f\165\x70"], $customerGroups)) { goto rKCqf; } goto FxgH8; bG43j: Fiytp: goto rDgWR; KPpdA: rKCqf: goto bG43j; rDgWR: } goto timkI; CouXT: FtDIi: goto QG3lK; Hu64F: } goto hd_jR; Ube_p: foreach ($result as $cart_rule) { goto Eh9HZ; UDJZP: Yo8AB: goto ss18W; yvDdZ: $cart_rule["\155\151\156\151\155\x61\x6c"] = $cart_rule["\155\151\x6e\x69\155\165\x6d\x5f\x61\x6d\x6f\165\x6e\x74"]; goto sS_8W; h_jYX: goto qB5T8; goto yKbhU; vMVB8: SXzMd: goto W6h8V; R6UPO: if ($cart_rule["\x72\145\144\165\143\x74\x69\x6f\x6e\x5f\x61\155\157\165\156\x74"] > 0) { goto CZiNS; } goto bphUy; yKbhU: CZiNS: goto Scu6C; sS_8W: $cart_rule["\x63\x75\155\165\x6c\x61\142\x6c\145"] = !$cart_rule["\x63\x61\162\x74\x5f\162\x75\x6c\x65\x5f\162\145\x73\x74\x72\151\143\164\x69\157\156"]; goto qR8gG; ibFyd: THp7v: goto Fu3Xe; bphUy: goto qB5T8; goto ibFyd; Fu3Xe: $cart_rule["\151\144\x5f\144\x69\163\x63\157\165\x6e\x74\x5f\x74\171\x70\145"] = Discount::FREE_SHIPPING; goto hrqo0; Scu6C: $cart_rule["\151\x64\137\x64\x69\163\x63\157\x75\x6e\x74\x5f\x74\171\x70\x65"] = Discount::AMOUNT; goto iSjZ4; iSjZ4: $cart_rule["\x76\x61\x6c\x75\x65"] = $cart_rule["\162\x65\x64\165\x63\x74\151\x6f\156\137\141\x6d\157\x75\x6e\x74"]; goto QA6ci; Eh9HZ: $cart_rule["\166\141\x6c\165\x65"] = 0; goto yvDdZ; QA6ci: qB5T8: goto vMVB8; ufpr1: if ($cart_rule["\x66\162\145\145\137\x73\150\x69\160\x70\x69\x6e\147"]) { goto THp7v; } goto i6VSM; i6VSM: if ($cart_rule["\162\x65\x64\165\143\x74\151\x6f\156\x5f\x70\145\162\x63\x65\x6e\x74"] > 0) { goto Yo8AB; } goto R6UPO; qR8gG: $cart_rule["\151\144\137\144\x69\163\x63\x6f\x75\x6e\x74\x5f\164\171\x70\145"] = false; goto ufpr1; XpTV4: $cart_rule["\166\x61\x6c\165\x65"] = $cart_rule["\x72\145\144\165\x63\164\151\157\x6e\137\x70\145\162\x63\145\x6e\164"]; goto h_jYX; ss18W: $cart_rule["\151\144\x5f\x64\151\x73\x63\x6f\x75\156\x74\137\x74\171\x70\145"] = Discount::PERCENT; goto XpTV4; hrqo0: goto qB5T8; goto UDJZP; W6h8V: } goto mW1z2; CaIk4: return array(); goto M00V1; Uh1bk: foreach ($result as $cart_rule) { goto aXuE2; arXen: $cartRuleShops = Db::getInstance()->executeS("\123\x45\x4c\105\103\124\x20\x69\x64\137\x73\x68\157\x70\40\x46\122\117\x4d\40" . _DB_PREFIX_ . "\x63\141\x72\164\137\x72\165\x6c\145\137\x73\x68\x6f\x70\x20\127\110\x45\x52\x45\40\151\x64\137\143\x61\162\x74\137\x72\165\x6c\145\40\x3d\40" . (int) $cart_rule["\x69\x64\x5f\x63\141\x72\164\x5f\162\165\x6c\145"]); goto YPeHO; T575p: unset($result[$key]); goto A1VUc; aXuE2: if (!$cart_rule["\x73\x68\157\x70\137\162\x65\x73\164\x72\151\143\x74\x69\157\156"]) { goto ihwNQ; } goto arXen; A1VUc: ihwNQ: goto AkgHO; YPeHO: foreach ($cartRuleShops as $cartRuleShop) { goto HJnLs; HJnLs: if (!(Shop::isFeatureActive() && $cartRuleShop["\151\x64\x5f\163\x68\157\x70"] == (int) SCI::getSelectedShop())) { goto n0VJE; } goto ah0rs; ah0rs: goto R016j; goto VcKxV; t1ty6: FfO_Y: goto VQtLd; VcKxV: n0VJE: goto t1ty6; VQtLd: } goto GuWH2; AkgHO: R016j: goto tan8S; GuWH2: ovE1M: goto T575p; tan8S: } goto ictXK; kYYIw: $customerGroups = Customer::getGroupsStatic($id_customer); goto SPUs1; jKfKt: if (!version_compare(_PS_VERSION_, "\61\56\66\x2e\x30\56\x30", "\76\75")) { goto uTmSA; } goto oixjF; R8Mw4: } public static function days_in_month($month, $year) { return $month == 2 ? $year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29)) : (($month - 1) % 7 % 2 ? 30 : 31); } public static function getProductQty($id_product, $id_product_attribute = null, $id_warehouse = null, $id_shop = null) { goto LGS3a; cqVRm: return $return; goto YFx5n; LGS3a: $return = 0; goto J89C_; R3CyK: PIAkp: goto qQF9B; J89C_: if (!empty($id_product)) { goto iidPq; } goto cqVRm; knY6Q: TsXhn: goto gmboX; qQF9B: return $return; goto ozeUW; YFx5n: iidPq: goto jmGrc; pdd9K: $return = self::_getProductQty($id_product, $id_product_attribute, $id_warehouse, $id_shop); goto L35Yu; gmboX: $return = self::_getProductAttributeQty($id_product, $id_product_attribute, $id_warehouse, $id_shop); goto R3CyK; jmGrc: if (!empty($id_product_attribute)) { goto TsXhn; } goto pdd9K; L35Yu: goto PIAkp; goto knY6Q; ozeUW: } public static function _getProductQty($id_product, $id_product_attribute = null, $id_warehouse = null, $id_shop = null) { goto dDVwp; H_6lY: $product = new Product($id_product); goto IrkdD; Thbr2: ggcP_: goto V4R4_; khbIX: goto xL3cp; goto xolwm; V4R4_: return $return; goto wxGso; JlLxt: goto xL3cp; goto gSruH; EVLB2: $usable_quantity = 0; goto Rnban; ACA9F: $type_advanced_stock_management = 3; goto mqZsX; FBup6: alZGp: goto lD0EC; zJV1a: $has_combination = false; goto cWqUR; Xd81w: $type_advanced_stock_management = 2; goto C_tbX; Pk7Cm: y5w6u: goto qV9Q4; aexp_: $query->where("\151\144\x5f\x77\x61\162\145\x68\157\x75\x73\x65\40\75\40" . (int) $id_warehouse . ''); goto WP93O; NNRg1: $query->select("\123\x55\x4d\50\165\163\141\142\154\145\x5f\161\x75\141\x6e\164\x69\x74\171\51\40\x61\x73\40\165\x73\x61\142\154\145\137\161\165\x61\x6e\x74\151\x74\171"); goto XsYHt; WP93O: $quantities = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); goto xWXms; mqZsX: t8gq2: goto R1aR8; dDVwp: $return = 0; goto Hb9WR; ptLK6: if (SCAS && $type_advanced_stock_management == 2 && $has_combination && !$not_in_warehouse) { goto Bu7sk; } goto uCRZq; rH2K7: $is_advanced_stock_management = true; goto Xd81w; X9YNM: if (!($product->advanced_stock_management == 1)) { goto Xz9tA; } goto rH2K7; A3vG5: goto xL3cp; goto p_doj; xhwSA: $quantities = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); goto LDGQT; x95u_: $query->from("\x73\164\157\143\x6b\x5f\x61\166\x61\151\x6c\141\142\154\x65"); goto eFjap; rh7N2: aTMjL: goto itHYT; trGru: goto xL3cp; goto Gl1Bv; z5OjZ: $query = StockAvailable::addSqlShopRestriction($query, (int) $id_shop); goto OdqCn; m0moR: $query->where("\163\164\56\151\x64\137\167\141\x72\x65\x68\x6f\165\x73\x65\x20\75\40" . (int) $id_warehouse . ''); goto Qm9T5; YUpVV: if (!empty($id_shop)) { goto frm5T; } goto VYB7i; RKGK6: $sql = "\123\x45\114\x45\103\124\x20\x53\125\x4d\50\x71\165\141\156\x74\x69\164\171\x29\x20\x61\163\x20\x71\165\x61\156\164\151\164\x79\40\x46\x52\x4f\115\x20" . _DB_PREFIX_ . "\160\162\x6f\144\165\x63\x74\137\x61\164\164\162\151\x62\x75\x74\145\x20\127\x48\105\122\105\40\151\x64\137\160\x72\x6f\144\165\143\x74\40\75\40" . (int) $id_product . "\x20\x41\x4e\104\x20\x69\x64\137\x70\x72\157\x64\x75\x63\x74\x5f\x61\164\x74\x72\151\x62\x75\164\x65\40\x21\x3d\40\x30"; goto veTJT; LphdC: return $return; goto FBup6; veTJT: $ret = Db::getInstance()->ExecuteS($sql); goto j1lYl; qaCzB: if (version_compare(_PS_VERSION_, "\61\x2e\x35\x2e\x30\x2e\x30", "\76\x3d") && !$has_combination) { goto maIHS; } goto PrXua; ST5Qm: frm5T: goto W3foJ; zKAId: xL3cp: goto Sgs4u; Hb9WR: if (!empty($id_product)) { goto alZGp; } goto LphdC; R1aR8: Xz9tA: goto rh7N2; jHRQO: $query = new DbQuery(); goto p9iKt; XvCJU: if (!SCMS) { goto ZzvxR; } goto z5OjZ; Sgs4u: if (!empty($return)) { goto ggcP_; } goto vdSni; itHYT: if (!$product->hasAttributes()) { goto I6Tsp; } goto o513C; vdSni: $return = 0; goto Thbr2; DU30G: $not_in_warehouse = false; goto aO2ml; Gl1Bv: Bu7sk: goto S3Ax0; fmC0Y: kfa1z: goto RKGK6; uCRZq: if (SCAS && $type_advanced_stock_management == 2 && !$has_combination && !$not_in_warehouse) { goto D32Xj; } goto WXS0c; W3foJ: SVlNj: goto lyGnC; YdeAq: $query->select("\x53\125\115\50\x73\x74\x2e\165\163\x61\x62\154\x65\x5f\x71\165\x61\x6e\x74\x69\164\x79\51\x20\141\163\x20\x75\163\x61\142\x6c\x65\x5f\161\165\x61\x6e\x74\x69\164\x79"); goto H0mu2; OdqCn: ZzvxR: goto wIute; VYB7i: $id_shop = SCI::getSelectedShop(); goto ST5Qm; PPqN6: if (StockAvailable::dependsOnStock((int) $id_product, (int) SCI::getSelectedShop())) { goto t8gq2; } goto ACA9F; j1lYl: if (empty($ret[0]["\x71\165\141\x6e\164\151\x74\x79"])) { goto p36yk; } goto HJwfe; LDGQT: $return = $quantities["\165\x73\x61\142\154\145\x5f\161\165\x61\x6e\164\x69\164\x79"]; goto A3vG5; XAmcU: $type_advanced_stock_management = 1; goto H4HVl; lyGnC: if (version_compare(_PS_VERSION_, "\61\56\x35\56\60\56\x30", "\76\75")) { goto lTcr6; } goto H_6lY; C3WU4: $query->where("\x69\144\137\160\162\157\144\x75\x63\164\x20\75\40" . (int) $id_product); goto CQYH7; TUxdv: $query->where("\151\x64\137\x70\x72\x6f\144\x75\143\x74\137\x61\164\x74\162\x69\x62\x75\x74\145\40\x21\75\40\x30"); goto XvCJU; XsYHt: $query->from("\163\x74\157\143\x6b"); goto Rbq1L; gSruH: T_wP1: goto zk0n9; GEl7C: $query = StockAvailable::addSqlShopRestriction($query, (int) $id_shop); goto Pk7Cm; eFjap: $query->where("\x69\x64\137\x70\162\x6f\144\x75\x63\x74\x20\75\x20" . (int) $id_product); goto TUxdv; HJwfe: $return = $ret[0]["\161\165\x61\x6e\x74\151\164\171"]; goto xyacM; xWXms: $return = $quantities["\165\163\141\x62\154\x65\x5f\161\165\x61\156\164\x69\164\171"]; goto JlLxt; gjq66: $product = new Product($id_product, false, null, (int) $id_shop); goto d3Ex1; o513C: $has_combination = true; goto gfSTH; Qm9T5: $query->where("\163\x74\56\151\x64\x5f\160\162\157\x64\x75\x63\164\x5f\141\x74\x74\162\x69\142\165\x74\x65\x20\41\75\40\x30"); goto xhwSA; WXS0c: if (SCAS && $type_advanced_stock_management == 2 && $not_in_warehouse) { goto T_wP1; } goto z7DSo; y0R7Y: goto xL3cp; goto Ri1hE; xolwm: maIHS: goto jHRQO; Rbq1L: $query->where("\x69\144\x5f\x70\162\157\x64\x75\143\x74\40\x3d\x20" . (int) $id_product . ''); goto aexp_; xyacM: p36yk: goto zKAId; S0BPP: lTcr6: goto gjq66; cf5q4: $id_warehouse = (int) SCI::getSelectedWarehouse(); goto zveN3; p_doj: D32Xj: goto ChyhU; z7DSo: if (version_compare(_PS_VERSION_, "\x31\x2e\x35\x2e\60\56\60", "\76\75") && $has_combination) { goto OiVmm; } goto qaCzB; C_tbX: $temp_check_in_warehouse = WarehouseProductLocation::getIdByProductAndWarehouse((int) $id_product, 0, (int) $id_warehouse); goto LgOzi; p9iKt: $query->select("\161\x75\x61\156\x74\151\164\x79"); goto eIBA9; lD0EC: if (!SCMS) { goto SVlNj; } goto YUpVV; d3Ex1: Q_kNg: goto ZgLWh; qV9Q4: $return = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto oXeVr; LgOzi: if (empty($temp_check_in_warehouse)) { goto cD4Gi; } goto DU30G; Rnban: if (!SCAS) { goto aTMjL; } goto X9YNM; IrkdD: goto Q_kNg; goto S0BPP; CRlfj: if (!SCMS) { goto y5w6u; } goto GEl7C; cWqUR: $not_in_warehouse = true; goto Uut9j; wIute: $return = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto khbIX; ZgLWh: if (!(SCAS && empty($id_warehouse))) { goto PnGMA; } goto cf5q4; YFJYp: $return = $product->quantity; goto trGru; UWgKM: $query = new DbQuery(); goto hCBvd; hCBvd: $query->select("\x53\x55\x4d\50\161\x75\141\156\164\151\x74\x79\51"); goto x95u_; oXeVr: goto xL3cp; goto fmC0Y; zveN3: PnGMA: goto XAmcU; Uut9j: $without_warehouse = true; goto EVLB2; aO2ml: cD4Gi: goto PPqN6; oDYoh: $query->where("\163\x74\56\151\144\137\x70\162\157\144\x75\x63\x74\x20\x3d\x20" . (int) $id_product . ''); goto m0moR; gfSTH: I6Tsp: goto ptLK6; H4HVl: $is_advanced_stock_management = false; goto zJV1a; Ri1hE: OiVmm: goto UWgKM; H0mu2: $query->from("\163\164\157\x63\153", "\x73\x74"); goto oDYoh; PrXua: if (version_compare(_PS_VERSION_, "\x31\56\x35\56\60\x2e\60", "\x3c") && $has_combination) { goto kfa1z; } goto YFJYp; zk0n9: $return = 0; goto y0R7Y; eIBA9: $query->from("\x73\x74\x6f\143\153\x5f\x61\166\141\151\154\141\142\x6c\145"); goto C3WU4; ChyhU: $query = new DbQuery(); goto NNRg1; CQYH7: $query->where("\x69\144\137\160\162\x6f\x64\x75\143\164\x5f\x61\x74\164\162\x69\142\x75\x74\x65\40\x3d\40\60"); goto CRlfj; S3Ax0: $query = new DbQuery(); goto YdeAq; wxGso: } public static function _getProductAttributeQty($id_product, $id_product_attribute = null, $id_warehouse = null, $id_shop = null) { goto UTPIf; G59EY: Znny7: goto nJAHF; EqV3C: if (!SCMS) { goto Znny7; } goto zStE3; aNQcX: MLaKz: goto GoqA1; ugue0: $id_shop = SCI::getSelectedShop(); goto Uo0E9; We7St: $query = StockAvailable::addSqlShopRestriction($query, (int) $id_shop); goto qPHPr; uvgp5: $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS("\xa\x9\x9\11\x9\x53\105\114\x45\x43\x54\40\161\x75\x61\x6e\x74\x69\x74\171\12\x9\x9\11\x9\x46\x52\117\115\x20\x60" . _DB_PREFIX_ . "\x70\162\157\x64\165\x63\x74\x5f\x61\x74\x74\162\x69\x62\165\x74\145\x60\12\x9\x9\11\11\127\x48\105\122\x45\x20\151\144\137\x70\162\157\144\x75\143\164\x5f\x61\x74\x74\162\151\x62\x75\164\x65\x20\x3d\x20\x22" . (int) $id_product_attribute . "\x22"); goto vk_J8; qrF5U: Meu6O: goto H0KzN; oNrYa: tslkJ: goto K6bQK; lA0VY: $query->where("\x69\144\137\160\162\x6f\x64\165\143\x74\137\x61\164\164\162\151\142\165\164\x65\x20\x3d\40" . (int) $id_product_attribute); goto EqV3C; RGUox: if (!(SCAS && empty($id_warehouse))) { goto wyGRx; } goto hftN2; qPHPr: F4Xuo: goto Emi0o; vLUNv: RaKnZ: goto olzMh; A6HjZ: $temp_check_in_warehouse = WarehouseProductLocation::getIdByProductAndWarehouse((int) $id_product, (int) $id_product_attribute, (int) $id_warehouse); goto Wb6co; cEIJz: rVCSO: goto k2I1n; UTPIf: $return = 0; goto qznkQ; kBxx8: $quantities = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); goto cMvfd; H0KzN: if (SCAS && $type_advanced_stock_management == 2 && !$not_in_warehouse) { goto p8dPD; } goto sD278; GAooi: $combination->quantity = 0; goto Rw5sm; XqiK_: if (version_compare(_PS_VERSION_, "\x31\56\65\x2e\x30\x2e\60", "\76\x3d")) { goto F9Z7l; } goto uvgp5; GoqA1: if (!empty($return)) { goto Ni9Ad; } goto fyGHh; EmaGf: $is_advanced_stock_management = false; goto wXKkS; qznkQ: if (!empty($id_product)) { goto g0X9h; } goto LVRMC; nkK0V: return $return; goto Utn_D; OTXWi: $return = $combination->quantity; goto CXUz4; LVRMC: return $return; goto iPIUW; GZb5_: if (!SCAS) { goto Meu6O; } goto sXg5T; ONn7P: goto MLaKz; goto cEIJz; VnSY1: tbTLS: goto qrF5U; efh7B: $type_advanced_stock_management = 3; goto pCIec; sD278: if (SCAS && $type_advanced_stock_management == 2 && $not_in_warehouse) { goto i3JU4; } goto V3EBS; HjH3q: $combination->quantity = (int) $result[0]["\161\165\141\156\x74\151\164\x79"]; goto NH77u; suSNt: $query->from("\x73\164\157\x63\153", "\163\164"); goto Jno6N; d_M4x: Ni9Ad: goto nkK0V; DhziG: F9Z7l: goto OiE6R; zStE3: $query = StockAvailable::addSqlShopRestriction($query, (int) $id_shop); goto G59EY; toDRX: jvVnQ: goto HjH3q; Ds9cH: $query->where("\151\144\x5f\160\162\x6f\144\165\143\x74\x20\75\40" . (int) $id_product); goto lA0VY; V3EBS: if ((!SCAS || SCAS && $type_advanced_stock_management == 1) && version_compare(_PS_VERSION_, "\x31\x2e\65\x2e\x30\56\x30", "\76\75")) { goto rVCSO; } goto XqiK_; fkLGn: p8dPD: goto JYMj0; u_A6R: wyGRx: goto EmaGf; VAflk: $is_advanced_stock_management = true; goto kZEwM; k2I1n: $query = new DbQuery(); goto EvStt; ZneHY: $query->where("\x69\x64\x5f\160\162\157\x64\165\143\164\x20\75\x20" . (int) $id_product); goto UfR1F; aOEdX: if (!SCMS) { goto F4Xuo; } goto We7St; sXg5T: if (!($product->advanced_stock_management == 1)) { goto GDJ01; } goto VAflk; RpH1k: goto Arpd7; goto vLUNv; Wb6co: if (empty($temp_check_in_warehouse)) { goto tbTLS; } goto ocxmB; ocxmB: $not_in_warehouse = false; goto FZvp2; Oy1jx: if (!empty($result[0]["\x71\165\x61\156\164\x69\164\x79"]) && is_numeric($result[0]["\x71\165\141\156\164\x69\x74\x79"])) { goto jvVnQ; } goto GAooi; vk_J8: $combination = new stdClass(); goto Oy1jx; nGm1F: i3JU4: goto qzoDg; qzoDg: $return = 0; goto ONn7P; EvStt: $query->select("\123\125\115\x28\x71\x75\141\156\164\x69\164\171\x29"); goto eZyMr; hftN2: $id_warehouse = (int) SCI::getSelectedWarehouse(); goto u_A6R; cZ7vC: $without_warehouse = true; goto GZb5_; Uo0E9: TTyYy: goto yUxsc; OiE6R: $query = new DbQuery(); goto F6psI; iMqqB: if (StockAvailable::dependsOnStock((int) $id_product, (int) $id_shop)) { goto d6LKM; } goto efh7B; K6bQK: goto MLaKz; goto fkLGn; CXUz4: goto tslkJ; goto DhziG; KNHXP: Arpd7: goto RGUox; NH77u: TUm5y: goto OTXWi; kZEwM: $type_advanced_stock_management = 2; goto iMqqB; wXKkS: $type_advanced_stock_management = 1; goto h1zWb; F6psI: $query->select("\x71\165\x61\x6e\164\x69\x74\171"); goto j4UuQ; AtCFB: if (!SCMS) { goto mTQMp; } goto u8_a3; Rw5sm: goto TUm5y; goto toDRX; lMona: if (version_compare(_PS_VERSION_, "\x31\56\65\56\x30\x2e\x30", "\x3e\x3d")) { goto RaKnZ; } goto Kun7_; cMvfd: $return = $quantities["\x75\x73\141\x62\154\145\137\161\x75\x61\156\164\151\x74\171"]; goto D0Sjq; OF7wI: $query->where("\x73\x74\x2e\151\x64\x5f\x77\141\x72\145\150\157\x75\163\x65\40\75\40" . (int) $id_warehouse . ''); goto xVRaI; u8_a3: if (!empty($id_shop)) { goto TTyYy; } goto ugue0; nJAHF: $return = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto oNrYa; olzMh: $product = new Product($id_product, false, null, (int) $id_shop); goto KNHXP; Kun7_: $product = new Product($id_product); goto RpH1k; fyGHh: $return = 0; goto d_M4x; JYMj0: $query = new DbQuery(); goto kHk4U; nhPBk: GDJ01: goto A6HjZ; kHk4U: $query->select("\x53\125\x4d\x28\163\x74\56\165\x73\141\142\x6c\145\x5f\x71\165\x61\x6e\164\x69\164\171\51\x20\x61\163\40\x75\163\141\x62\x6c\145\137\x71\x75\141\156\x74\x69\164\x79"); goto suSNt; Emi0o: $return = (int) Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); goto aNQcX; j4UuQ: $query->from("\x73\164\x6f\143\153\x5f\141\166\x61\x69\x6c\x61\142\x6c\145"); goto Ds9cH; xVRaI: $query->where("\x73\x74\x2e\151\x64\137\160\x72\x6f\144\165\x63\x74\x5f\141\164\164\162\151\x62\x75\164\145\x20\75\40" . (int) $id_product_attribute . ''); goto kBxx8; eZyMr: $query->from("\163\x74\x6f\x63\153\137\141\x76\141\x69\x6c\x61\142\154\145"); goto ZneHY; Jno6N: $query->where("\163\164\x2e\x69\144\x5f\x70\x72\x6f\144\x75\x63\x74\40\x3d\x20" . (int) $id_product . ''); goto OF7wI; D0Sjq: goto MLaKz; goto nGm1F; FZvp2: $without_warehouse = false; goto VnSY1; UfR1F: $query->where("\151\144\x5f\x70\x72\157\144\x75\x63\164\x5f\141\164\x74\x72\151\x62\x75\164\145\x20\x3d\40" . (int) $id_product_attribute); goto aOEdX; pCIec: d6LKM: goto nhPBk; yUxsc: mTQMp: goto lMona; h1zWb: $not_in_warehouse = true; goto cZ7vC; iPIUW: g0X9h: goto AtCFB; Utn_D: } static function roundPrice($price, $modif_type) { goto zHXb_; wsfEL: if ($modif_type == "\x36") { goto knSfT; } goto WoIaH; uvN7W: qiWYE: goto OPR4m; Bj2Hc: AqwOz: goto vEbz2; RFfh4: if ($modif_type == "\x31") { goto XQUdo; } goto pVZeE; NSbK4: if ($decimal >= 0 && $decimal <= 49) { goto BMdpf; } goto CpmR1; CondM: YTvvw: goto ZY0Wg; FjISD: if ($round_type == "\61") { goto pPHQW; } goto FBMwG; f9IYt: if ($round_type == "\x31") { goto MLE1A; } goto rHdVA; fKPDN: $return = $unite; goto bTEjq; KUTC4: goto OrYT_; goto BLnad; BaYJF: goto fTTAL; goto KzbcY; eaz2c: goto u3LrH; goto SAfVs; qKd9Y: list($return, $decimal_part) = explode("\x2e", $return); goto Kvuau; EUsLx: goto I1jiw; goto Ej1QU; tA2kF: $return -= 1; goto x4J7T; p4ynK: goto yXaP_; goto ILRJh; M_Sb8: $return = $return / 10; goto kTUOl; cmsDc: list($unite, $decimal) = explode("\56", $return); goto UufRM; ZY0Wg: $return = ceil($return); goto GubK8; LjA0F: TNen8: goto x6ETc; Kvuau: list($other, $chiffre) = explode("\56", $return / 100); goto LYJUu; bgCrl: if (!($return >= 100)) { goto Qrrcb; } goto MjLNf; CpmR1: if ($decimal >= 50 && $decimal <= 99) { goto e3CTY; } goto i4eqy; iBFM8: if (empty($round_type)) { goto wua7e; } goto D7w6m; eeQ0P: if (empty($round_type)) { goto ACgZw; } goto kYZLU; zDD1g: if (empty($round_type)) { goto Etcjj; } goto u9uE9; V9AuG: HzdGK: goto hRR1b; oEmuF: list($unite, $decimal) = explode("\56", $return); goto dN7xi; Y18Wk: $decimal = 0; goto SQH52; qzkFc: BMdpf: goto lYRGQ; bHMIM: $return = floor($return); goto UYUVZ; PGQPt: goto UhYSD; goto ghnpw; LYJUu: if (!(strlen($chiffre) == 1)) { goto l6f5a; } goto xW0oC; ch79a: $return = round($return); goto xLUY_; dtjaF: if ($decimal >= 1 && $decimal <= 4) { goto rywv5; } goto b7Zze; v1z_r: if (!($round_type == "\x31")) { goto BlE8X; } goto YuZca; SMMwg: goto AqwOz; goto wj_Xh; Vd1zI: if (empty($round_type)) { goto Ek3wk; } goto Y5Uav; YuZca: $return = str_replace("\54", "\56", $return * 1000000); goto Qos7w; ZS9gb: $return = round($return); goto zBC7n; XcYwO: $return = round($return); goto lweKC; hq23k: $decimalReturn = 95; goto UyHSg; KuH5Q: pVjBR: goto LZlaL; Q5qtL: if (!($round_type == "\61")) { goto KOBKG; } goto C0tHk; l5sdN: goto UikEm; goto yzoCP; Nip3I: $decimal = 0; goto yP9C3; py7vy: SU1sz: goto hL5sL; sWK8n: if ($decimal >= 0 && $decimal <= 24) { goto E9Jll; } goto fa1YQ; pRe0K: $decimal = 0; goto xUN8U; oTJfd: Ejh6I: goto HV8EL; xpKCj: $decimal = 0; goto bhn_p; Ux1X6: $decimal = 0; goto l5sdN; izilA: if ($round_type == "\x32") { goto rxnhg; } goto s_tRb; hwe14: $decimal = 0; goto Zid3T; U3Bm1: nauyC: goto E7NrQ; SZln2: rywv5: goto IBUdF; B0vYI: if ($round_type == "\x32") { goto R5Ozp; } goto sdERU; gN6Hx: $decimal = $decimal . "\60"; goto hAjsi; usCEd: goto KqF0s; goto gSXbL; lKI6O: goto VH1YJ; goto g2AYj; LcyjF: if (!($round_type == "\61")) { goto vFHeb; } goto sd00q; V5D0i: goto KqF0s; goto y0D1g; Ew4ke: goto iOCF9; goto yETa8; hJpN0: $return = $unite + 2; goto bKOUa; JjgiM: pysPb: goto evIIw; X71_K: goto yPtR8; goto TvOqQ; YoFAI: $decimal = 0; goto eYYRg; HV8EL: $unite += 1; goto bqEVx; FI2lq: ObmiO: goto U99TF; eSwVi: goto AqwOz; goto EIF0F; JU54w: Y44bl: goto fzvGa; o2c9p: RVDIt: goto hbz8S; BRcLp: if ($decimal >= 6 && $decimal <= 9) { goto wSrJD; } goto SwFPp; x6ETc: if ($realDecimal > 95 && $realDecimal <= 99) { goto Hpfk9; } goto uVqpL; PTp9M: xmZDQ: goto n5wSu; sd00q: $return = str_replace("\54", "\x2e", $return * 1000000); goto CAd40; g1dy8: UikEm: goto hzxAO; MjLNf: $return = str_replace("\54", "\x2e", $return); goto qKd9Y; Kz283: TOjLs: goto yNl1J; kTxsQ: $return = round($return); goto jkSNk; lOS6w: goto AqwOz; goto V9AuG; awbGR: goto OrYT_; goto lSF5L; ND89m: goto ObmiO; goto SGmJj; iGpJK: $return = str_replace("\x2c", "\56", $return * 1000000); goto Ol5yp; Sucbv: J0wRF: goto pRe0K; P_fXi: $return = $return / 100; goto CFmk8; q4_2U: goto SU1sz; goto CJqGk; mHAcg: if ($chiffre >= 5 && $chiffre <= 9.999999999) { goto zEVMx; } goto Q3l3T; J7EGD: J7RbH: goto EIsNd; hQxrA: jbqwh: goto O4O8Q; vSHYi: $return = $unite + 1; goto oI1KA; Z5_8u: if (empty($round_type)) { goto qn6t_; } goto lxMhF; idnUR: g2ntT: goto tI0vb; fxxD0: sb_cn: goto fmO1C; OMjTo: $return = floor($return); goto X10AH; yCfSR: LxD4r: goto I9kke; xgE5C: list($unite, $decimal) = explode("\x2e", $return); goto iBFM8; vRV6t: goto KEfjD; goto QtW5Y; yP9C3: OrYT_: goto RvN2D; Z3Lbq: goto BRwsY; goto BL1Xu; sZXui: PTGQ5: goto NSbK4; YXDF7: iOCF9: goto Vaj1n; j4RZC: if ($round_type == "\61") { goto l9OlP; } goto sew1J; oI1KA: goto pHh0R; goto iAJUf; DjAn7: goto lRxe4; goto oTJfd; BD3N8: $decimal = 0; goto EUaGU; beS2n: ACgZw: goto jgstz; DXu94: $return = ceil($return); goto IzUd5; ncZqc: if ($decimal >= 1 && $decimal <= 5) { goto nauyC; } goto BRcLp; KFO8w: q_iVD: goto Nzo0N; b_Tk6: $return -= 1; goto BApps; dQmLy: aMVy7: goto QLra0; V7ZnQ: if ($modif_type == "\64") { goto MoMNq; } goto qLby3; IJlxJ: Utv3N: goto atiAa; Q_jpz: goto JLuPz; goto gI6rU; pVZeE: if ($modif_type == "\62") { goto A2YrN; } goto u4_3Z; uELyc: $decimalReturn = "\x30" . $decimalReturn; goto JeNxm; UkIqh: if ($round_type == 1) { goto TNen8; } goto a6qmS; fa1YQ: if ($decimal >= 25 && $decimal <= 74) { goto IqmHX; } goto ko8NA; x0rOW: goto iOCF9; goto QF0oQ; atiAa: $decimalReturn = 0; goto s8Ad_; rDlSh: $decimal = 0; goto agsao; Q2xQe: e3CTY: goto yvCjL; n04nd: goto cLVGt; goto LjA0F; KzbcY: M1b5S: goto iUNRe; zm68F: $chiffre = ($chiffre . "\56" . $decimal_part) * 1; goto ZalFu; E_xgM: if ($round_type == "\61") { goto sb_cn; } goto B0vYI; lHLU1: I4qJC: goto Gm9rZ; xc6Wx: $return = str_replace("\x2c", "\x2e", $return * 100); goto ksLa2; n_fmA: KOBKG: goto X3mSC; jLH2w: goto yXaP_; goto SSSEI; AGTvE: goto AqwOz; goto IJlxJ; yvCjL: $unite += 1; goto j2Ixp; D7w6m: if ($round_type == "\x31") { goto RVDIt; } goto zIz8i; n824Q: pvdx9: goto EDG9t; aPBYr: $return = $unite / 1000000; goto qio0V; g2AYj: DVbHl: goto BD3N8; G7Lqy: SR8Xo: goto XcYwO; Zid3T: UhYSD: goto S9RYt; Gm9rZ: if ($decimal >= 0 && $decimal <= 48) { goto DVbHl; } goto fyfyG; eCb7i: l6f5a: goto zm68F; cWD7H: if ($decimal >= 50) { goto Y44bl; } goto TlvA7; j_enA: F2KiR: goto omYGH; x4J7T: Qrrcb: goto AGTvE; evIIw: $return = floor($return); goto Teetq; UufRM: if (!(strlen($decimal) == 1)) { goto NJMw4; } goto ZmtIp; KV8q9: goto BRwsY; goto SZln2; WD3on: $return = ($unite . "\x2e" . $decimal) * 1 / 10; goto fzp7g; j0I1h: $decimalReturn = 5; goto EK1Ni; iAJUf: dZ24F: goto hJpN0; lSF5L: NiUNw: goto Y18Wk; tCxNl: BRwsY: goto hQxrA; fzp7g: goto AqwOz; goto fI2Ig; uOkJ8: knSfT: goto LcyjF; COurn: if ($decimal >= 5 && $decimal <= 9) { goto fSZ6b; } goto n6xzt; Ko7_d: $decimal = 0; goto vRV6t; tqyq2: if (!($round_type == "\61")) { goto Lb2Ui; } goto iGpJK; TRvG_: $return = $return * 10; goto b91Os; UyHSg: jtYad: goto n04nd; dwnL6: wyzWH: goto E5Tjc; lt0px: $decimal = 5; goto mrnqw; uYKwT: if ($round_type == "\x31") { goto TOjLs; } goto OmMWW; jvHpI: TYs0x: goto sJlZG; LZlaL: if ($decimal >= 50) { goto yVvi2; } goto qiKm2; s_tRb: goto aMVy7; goto KFO8w; ORTlg: goto aMVy7; goto X1ATb; WoIaH: if ($modif_type == "\x37") { goto UhYRq; } goto LXOuq; RvN2D: goto jbqwh; goto s2hNA; NFoEK: $return = $unite / 1000000; goto DGndj; yNl1J: $return = ceil($return); goto q4_2U; kagZ8: nJyxj: goto ch79a; eZ536: $return = str_replace("\54", "\x2e", $return * 1000000); goto R7ZwS; b91Os: if (empty($round_type)) { goto CytsB; } goto Ts4nB; U99TF: JLuPz: goto eJ4Vr; PWrTx: if ($decimal >= 8 && $decimal <= 9) { goto MvxJ1; } goto awbGR; qz_Ht: KEfjD: goto E5xtA; mk5Z0: $return = $unite + 1; goto H9M5u; ZGOsM: $decimalReturn = 5; goto lOZGI; S9RYt: goto jbqwh; goto EfFnM; GGQZo: goto lRxe4; goto i39Pm; eeEW7: ti6ur: goto KR54_; lsTAI: $decimalReturn = 5; goto uELyc; VPdJb: pPHQW: goto mk5Z0; LXOuq: if ($modif_type == "\x38") { goto HzdGK; } goto ucm1x; j7d3y: $return = str_replace("\x2c", "\x2e", $return * 10); goto sX8Rx; tYld0: vFHeb: goto xc6Wx; DdvuS: lRxe4: goto XWnQw; Ygjy0: $unite = 1; goto ohATk; VzZsD: $return = $unite / 1000000; goto pYBJz; nRBeq: $decimal = 0; goto X71_K; KrSQO: if ($round_type == "\x32") { goto ZHG2T; } goto WSlFw; Qos7w: list($unite, $decimal) = explode("\x2e", $return); goto SRoHS; lt4xk: $return = floor($return); goto cTGsV; zIz8i: if ($round_type == "\x32") { goto ti6ur; } goto EUsLx; tWj36: goto u3LrH; goto lHLU1; E5xtA: I1jiw: goto WD3on; uVqpL: $decimalReturn = 95; goto pgjIG; sszhV: $unite += 1; goto hwe14; cTGsV: H1qsn: goto BeLVq; oOqJL: if ($decimal == 99) { goto dlotz; } goto lKI6O; u7pW6: $decimal = 5; goto tCxNl; yUKWb: if ($round_type == "\x32") { goto gZsNs; } goto pb3TU; ToFpP: if (!(strlen($decimal) == 1)) { goto Ow7MK; } goto gN6Hx; KR54_: if ($decimal >= 1 && $decimal <= 4) { goto VG14F; } goto COurn; n6xzt: goto KEfjD; goto Jq5Cd; iRFWe: A2YrN: goto v1z_r; rp24w: if ($chiffre >= 50 && $chiffre <= 99.999999999) { goto zC4UV; } goto iInFk; ggQGg: $return -= 1; goto DSWTO; nIbEt: if (empty($round_type)) { goto RLHJo; } goto uYKwT; ypKgR: list($unite, $decimal) = explode("\56", $return); goto ToFpP; hbz8S: if ($decimal >= 1 && $decimal <= 5) { goto OCi8I; } goto LQHH_; QtW5Y: fSZ6b: goto onND7; E1DnY: $decimal = $decimal . "\60"; goto aF15P; sQPvr: $return = round($return); goto jLH2w; lwyyX: $decimal = 0; goto yCfSR; MlS6E: $decimal = 5; goto waJRu; lweKC: goto fTTAL; goto cqcIA; n5wSu: goto JLuPz; goto VPdJb; pb3TU: goto iOCF9; goto KuH5Q; g8jWY: Xu19V: goto AdKcp; R7ZwS: list($unite, $decimal) = explode("\x2e", $return); goto aPBYr; yzoCP: UXMV4: goto lt0px; EUaGU: goto VH1YJ; goto NzR_R; c21Ys: if ($round_type == "\62") { goto Mfz4e; } goto Cs3ZW; rlgZr: if ($decimal > 90) { goto dZ24F; } goto vSHYi; hzxAO: goto I1jiw; goto o2c9p; fsZfF: yPtR8: goto O2Fjr; ghnpw: wSrJD: goto sszhV; cDyFS: if ($round_type == "\61") { goto EBOyR; } goto yUKWb; QzIJQ: $unite = 1; goto xpKCj; vEbz2: ebZGM: goto DNCpa; j2Ixp: $decimal = 0; goto Evuh7; sE_H3: yVvi2: goto ZJwJT; qhgKB: UhYRq: goto afseC; A4OjW: $return = round($return); goto ytXPJ; ko8NA: if ($decimal >= 75 && $decimal <= 99) { goto Ejh6I; } goto GGQZo; uP43s: $return = str_replace("\54", "\x2e", $return * 1000000); goto oEmuF; ThoaK: if (!(!empty($price) && !empty($modif_type))) { goto ebZGM; } goto x2Lyv; EIF0F: W4e6a: goto qRYOK; fhTVQ: goto lRxe4; goto w5aZy; yWJ7I: $chiffre = ($chiffre . "\x2e" . $decimal_part) * 1; goto Vd1zI; xW0oC: $chiffre = $chiffre . "\60"; goto eCb7i; UC6JI: list($return, $decimal_part) = explode("\56", $return); goto o2Tf8; BApps: goto AqwOz; goto g5_7F; SAfVs: Etcjj: goto sWK8n; x2Lyv: $round_type = _s("\x43\x41\x54\137\122\117\125\116\x44\137\120\122\x49\103\x45"); goto RFfh4; wj_Xh: sp8PJ: goto Q5qtL; waJRu: goto VH1YJ; goto RuGhf; sdERU: goto yPtR8; goto uvN7W; hL5sL: goto AqwOz; goto iRFWe; NGltZ: if ($decimal >= 3 && $decimal <= 7) { goto ABUqA; } goto PWrTx; hhbCC: $decimal = 5; goto KUTC4; PfUxQ: ZHG2T: goto MW41T; I9kke: goto I1jiw; goto eeEW7; qiKm2: $return = $unite; goto S4s5r; RVYK7: TJqub: goto s7jWG; RuGhf: dlotz: goto fpNEn; lOZGI: $decimalReturn = "\60" . $decimalReturn; goto VQcrc; S7SaC: if ($round_type == "\62") { goto FXVUm; } goto V5D0i; rJ9zh: if ($round_type == "\62") { goto FUKNI; } goto tyFq7; fpNEn: $unite += 1; goto Zw3XL; Qrv9c: if ($decimal >= 8 && $decimal <= 9) { goto TYs0x; } goto CkIrh; CCqBR: if ($round_type == "\62") { goto hrdsA; } goto p4ynK; a6qmS: if ($round_type == 2) { goto g2ntT; } goto gs66l; UYUVZ: KqF0s: goto tvFn_; Zw3XL: $decimal = 0; goto AXkxX; lwFRs: $realDecimal = substr($decimal, 0, 2); goto Ulwre; FBMwG: if ($round_type == "\62") { goto F2KiR; } goto Q_jpz; iInFk: goto rt6C0; goto RVYK7; AdKcp: $unite += 1; goto lwyyX; sX8Rx: if (empty($round_type)) { goto UUgIL; } goto KfphS; GubK8: goto H1qsn; goto i2Yl0; fmO1C: $unite = 1; goto nRBeq; k0uqU: if ($modif_type == "\x31\x30") { goto Utv3N; } goto e85e2; Solwc: hrdsA: goto OMjTo; i4eqy: goto LUBr8; goto qzkFc; Re29Y: if (!($round_type == "\61")) { goto n_gIr; } goto uP43s; EfFnM: FUKNI: goto dtjaF; SGmJj: YKOLA: goto yWEdp; fbFOX: AjKvh: goto Ux1X6; mrnqw: goto UikEm; goto jvHpI; EDG9t: cLVGt: goto Ajipu; w5aZy: IqmHX: goto hPr0k; dDRmK: $return = $return / 100; goto ypKgR; l1eTs: $unite = 1; goto YoFAI; Mu2Zk: rxnhg: goto J6iQk; PTVnA: list($unite, $decimal) = explode("\56", $return); goto E3_LB; X1ATb: vzmrR: goto NZdpf; XWnQw: goto u3LrH; goto sZXui; KTpPX: vRYDL: goto hq23k; Cg54G: n_gIr: goto nIbEt; H9M5u: goto JLuPz; goto j_enA; SRoHS: $return = $unite / 1000000; goto Axwza; O4O8Q: $return = ($unite . "\56" . $decimal) * 1; goto SMMwg; ZNLPo: qao4P: goto aiwAH; X3mSC: $return = str_replace("\54", "\x2e", $return * 100); goto Z5_8u; aF15P: k2cXn: goto Vg6Xx; OOH7A: if (empty($round_type)) { goto nJyxj; } goto f9IYt; e85e2: goto AqwOz; goto qbNKa; W0kuX: Hpfk9: goto gKvIz; g5_7F: WehrF: goto YPYSV; KfphS: if ($round_type == "\61") { goto CGLyv; } goto CCqBR; CFmk8: $return = str_replace("\x2c", "\x2e", $return * 10); goto xgE5C; X10AH: yXaP_: goto M_Sb8; KUo4K: $return = ($unite . "\x2e" . $decimal) * 1; goto kz8xj; J6iQk: $return = floor($return); goto dQmLy; ksLa2: if (empty($round_type)) { goto q_iVD; } goto DkLxy; i3ula: l020U: goto x0rOW; jVFCo: $decimal = 0; goto g1dy8; BLnad: MvxJ1: goto PsK9E; E7NrQ: $decimal = 5; goto PGQPt; onND7: $decimal = 5; goto qz_Ht; fZU5M: $decimal = 0; goto fsZfF; NZdpf: $return = ceil($return); goto DIPpU; G_WO2: if ($decimal >= 0 && $decimal <= 2) { goto AjKvh; } goto TL7Yq; qbNKa: XQUdo: goto Re29Y; O2Fjr: $return = ($other + $unite . "\60\x30") * 1; goto tA2kF; y654n: Ek3wk: goto NX7vD; QLra0: $return = $return / 100; goto kptvk; EDo9P: goto xmZDQ; goto JU54w; ZalFu: if (empty($round_type)) { goto qiWYE; } goto E_xgM; TPzp0: yiGUM: goto Ygjy0; jgstz: if ($decimal >= 0 && $decimal <= 2) { goto NiUNw; } goto NGltZ; TUHXT: $decimal = 0; goto fhTVQ; xUN8U: goto GqtzO; goto bBJS7; VQcrc: goto pvdx9; goto noMwD; ytXPJ: goto H1qsn; goto CondM; bTEjq: goto a9w0E; goto J7EGD; kptvk: list($unite, $decimal) = explode("\x2e", $return); goto ZCohh; lxMhF: if ($round_type == "\61") { goto YTvvw; } goto c21Ys; R3DDO: goto yPtR8; goto fxxD0; ms44S: goto fTTAL; goto G7Lqy; kYZLU: if ($round_type == "\61") { goto TKMgb; } goto rJ9zh; pYBJz: Lb2Ui: goto j7d3y; ZmtIp: $decimal = $decimal . "\x30"; goto I9PJ0; Y5Uav: if ($round_type == "\61") { goto yiGUM; } goto KrSQO; DNCpa: return $return; goto BHygx; hRR1b: $unite = 0; goto rDlSh; DGndj: fu0di: goto yVKjT; iUNRe: $return = floor($return); goto SmtKV; AWwdE: OCi8I: goto FvPmT; jA10P: goto AqwOz; goto uOkJ8; Axwza: BlE8X: goto TRvG_; uXBw6: list($unite, $decimal) = explode("\56", $return); goto NFoEK; WSlFw: goto wyzWH; goto y654n; kTUOl: $return = str_replace("\x2c", "\56", $return); goto fVey_; l8PpD: goto nh5rQ; goto JjgiM; xLUY_: goto nh5rQ; goto m45Oz; gKvIz: $return += 1; goto j0I1h; fVey_: list($unite, $decimal) = explode("\56", $return); goto eeQ0P; DSWTO: $decimalReturn = 95; goto n824Q; CkIrh: goto UikEm; goto fbFOX; EIsNd: $return = $unite + 1; goto RBZ1E; s8Ad_: $return = str_replace("\x2c", "\56", $return); goto FSGXq; eJ4Vr: $return -= 0.01; goto hmh2m; zHXb_: $return = $price; goto ThoaK; Ew_BW: u3LrH: goto KUo4K; qLby3: if ($modif_type == "\65") { goto sp8PJ; } goto wsfEL; eI3FA: $return = $unite; goto ND89m; hAjsi: Ow7MK: goto zDD1g; qRYOK: if (!($round_type == "\61")) { goto fu0di; } goto m78go; C0tHk: $return = str_replace("\54", "\x2e", $return * 1000000); goto PTVnA; p1cdj: goto LxD4r; goto AWwdE; m45Oz: MLE1A: goto yjK0d; EguyM: if (empty($round_type)) { goto SR8Xo; } goto j4RZC; fI2Ig: MoMNq: goto tqyq2; jkSNk: goto SU1sz; goto Kz283; QF0oQ: EBOyR: goto rlgZr; AXkxX: VH1YJ: goto Ew_BW; s7jWG: $decimal = 0; goto L27N3; bBJS7: zEVMx: goto QzIJQ; bhn_p: GqtzO: goto U0_jp; OPR4m: if ($chiffre >= 0 && $chiffre < 50) { goto TJqub; } goto rp24w; Nzo0N: $return = round($return); goto ORTlg; NzR_R: as41F: goto MlS6E; BeLVq: $return = $return / 100; goto cmsDc; gWzrM: goto LxD4r; goto g8jWY; afseC: if (!($round_type == "\x31")) { goto Tff1D; } goto eZ536; qio0V: Tff1D: goto nurab; bqEVx: $decimal = 0; goto DdvuS; TlvA7: $return = $unite; goto EDo9P; TL7Yq: if ($decimal >= 3 && $decimal <= 7) { goto UXMV4; } goto Qrv9c; FhDmP: ABUqA: goto hhbCC; DIPpU: goto aMVy7; goto Mu2Zk; ZCohh: if (!(strlen($decimal) == 1)) { goto k2cXn; } goto E1DnY; jk6CP: $return = ceil($return); goto BaYJF; Teetq: nh5rQ: goto P_fXi; ZJwJT: $return = $unite + 1; goto i3ula; hPr0k: $decimal = 5; goto DjAn7; FvPmT: $decimal = 5; goto gWzrM; eXCAM: if ($decimal >= 90) { goto J7RbH; } goto fKPDN; o2Tf8: list($other, $chiffre) = explode("\x2e", $return / 10); goto yWJ7I; gI6rU: jXRft: goto cWD7H; kz8xj: $return -= 0.01; goto lOS6w; MW41T: $decimal = 0; goto dwnL6; TvOqQ: R5Ozp: goto fZU5M; ILRJh: UUgIL: goto sQPvr; RBZ1E: a9w0E: goto YXDF7; u9uE9: if ($round_type == "\x31") { goto PTGQ5; } goto M3_Wo; lYRGQ: $decimal = 5; goto hPc_x; L27N3: goto rt6C0; goto UhqId; eYYRg: rt6C0: goto R3DDO; Kudhb: goto nh5rQ; goto kagZ8; YPYSV: $unite = 0; goto sMPLq; s2hNA: TKMgb: goto ncZqc; yjK0d: $return = ceil($return); goto l8PpD; cqcIA: l9OlP: goto jk6CP; SQH52: goto OrYT_; goto FhDmP; FSGXq: list($return, $decimal) = explode("\56", $return); goto lwFRs; bKOUa: pHh0R: goto Ew4ke; E3_LB: $return = $unite / 1000000; goto n_fmA; tI0vb: if ($realDecimal < 5 && $realDecimal >= 0) { goto wLTGT; } goto ZGOsM; z4EXw: XvBcx: goto e41sE; CAd40: list($unite, $decimal) = explode("\56", $return); goto me12k; CPPsx: qn6t_: goto A4OjW; zBC7n: goto KqF0s; goto n5dw6; U0_jp: goto wyzWH; goto TPzp0; Q3l3T: goto GqtzO; goto Sucbv; sMPLq: $decimal = 0; goto bgCrl; agsao: $return = str_replace("\54", "\x2e", $return); goto UC6JI; yETa8: gZsNs: goto eXCAM; fzvGa: $return = $unite + 1; goto PTp9M; fyfyG: if ($decimal >= 49 && $decimal <= 98) { goto as41F; } goto oOqJL; i2Yl0: Mfz4e: goto lt4xk; DkLxy: if ($round_type == "\x31") { goto vzmrR; } goto izilA; Rd5PK: if (empty($round_type)) { goto pVjBR; } goto cDyFS; SwFPp: goto UhYSD; goto U3Bm1; pgjIG: goto XvBcx; goto W0kuX; y0D1g: CytsB: goto ZS9gb; hmh2m: goto AqwOz; goto qhgKB; Ajipu: $return = ($return . "\x2e" . $decimalReturn) * 1; goto Bj2Hc; n5dw6: mVwnZ: goto g1paU; sew1J: if ($round_type == "\x32") { goto M1b5S; } goto ms44S; UhqId: zC4UV: goto l1eTs; Vg6Xx: if (empty($round_type)) { goto jXRft; } goto FjISD; ucm1x: if ($modif_type == "\71") { goto WehrF; } goto k0uqU; gSXbL: FXVUm: goto bHMIM; Ej1QU: wua7e: goto G_WO2; EfoB_: goto wyzWH; goto PfUxQ; u4_3Z: if ($modif_type == "\63") { goto W4e6a; } goto V7ZnQ; OmMWW: if ($round_type == "\62") { goto VUbuK; } goto OGoB3; NX7vD: if ($chiffre >= 0 && $chiffre < 5) { goto J0wRF; } goto mHAcg; Vaj1n: $return -= 0.1; goto jA10P; b7Zze: if ($decimal >= 5 && $decimal <= 9) { goto oBbCQ; } goto KV8q9; yWEdp: $return = $unite + 1; goto FI2lq; me12k: $return = $unite / 1000000; goto tYld0; yVKjT: $return = str_replace("\x2c", "\x2e", $return * 100); goto OOH7A; OGoB3: goto SU1sz; goto IoUd4; PsK9E: $unite += 1; goto Nip3I; SSSEI: CGLyv: goto DXu94; IoUd4: RLHJo: goto kTxsQ; sbiVm: $return = floor($return); goto py7vy; CJqGk: VUbuK: goto sbiVm; tyFq7: goto jbqwh; goto beS2n; Ts4nB: if ($round_type == "\61") { goto mVwnZ; } goto S7SaC; m78go: $return = str_replace("\x2c", "\x2e", $return * 1000000); goto uXBw6; IBUdF: $decimal = 0; goto Z3Lbq; M3_Wo: if ($round_type == "\x32") { goto I4qJC; } goto eaz2c; Evuh7: LUBr8: goto tWj36; JeNxm: goto jtYad; goto KTpPX; gs66l: goto cLVGt; goto ZNLPo; i39Pm: E9Jll: goto TUHXT; S4s5r: goto l020U; goto sE_H3; SmtKV: fTTAL: goto dDRmK; E5Tjc: $return = ($other + $unite . $decimal) * 1; goto b_Tk6; Cs3ZW: goto H1qsn; goto CPPsx; tvFn_: $return = $return / 10; goto eSwVi; g1paU: $return = ceil($return); goto usCEd; rHdVA: if ($round_type == "\x32") { goto pysPb; } goto Kudhb; dN7xi: $return = $unite / 1000000; goto Cg54G; I9PJ0: NJMw4: goto Rd5PK; nurab: $return = str_replace("\54", "\56", $return * 100); goto EguyM; LQHH_: if ($decimal >= 6 && $decimal <= 9) { goto Xu19V; } goto p1cdj; EK1Ni: $decimalReturn = "\x30" . $decimalReturn; goto z4EXw; Ol5yp: list($unite, $decimal) = explode("\56", $return); goto VzZsD; omYGH: if ($decimal == 99) { goto YKOLA; } goto eI3FA; sJlZG: $unite += 1; goto jVFCo; ohATk: $decimal = 0; goto EfoB_; noMwD: wLTGT: goto ggQGg; IzUd5: goto yXaP_; goto Solwc; Jq5Cd: VG14F: goto Ko7_d; hPc_x: goto LUBr8; goto Q2xQe; e41sE: goto cLVGt; goto idnUR; aiwAH: if ($realDecimal > 50 && $realDecimal <= 99) { goto vRYDL; } goto lsTAI; Ulwre: if ($round_type == 0) { goto qao4P; } goto UkIqh; BL1Xu: oBbCQ: goto u7pW6; BHygx: } public static function usesAdvancedStockManagement($id_product, $id_shop = null) { goto ChfFE; YtalS: $id_shop = SCI::getSelectedShop(); goto G0i2v; ChfFE: if (!empty($id_shop)) { goto ndyJB; } goto YtalS; qLqVj: $query = "\123\105\114\105\103\x54\40\160\x72\157\144\165\143\x74\x5f\x73\x68\157\x70\56\141\x64\166\x61\x6e\x63\x65\x64\137\x73\x74\x6f\143\153\137\x6d\x61\156\x61\x67\145\155\x65\x6e\164\12\x9\x9\x46\122\x4f\115\x20\x60" . _DB_PREFIX_ . "\160\x72\x6f\144\x75\x63\164\140\x20\160\12\x9\x9\x20\x49\x4e\x4e\x45\x52\40\112\117\x49\x4e\40" . _DB_PREFIX_ . "\x70\x72\157\144\165\143\x74\137\x73\150\157\160\40\x70\x72\x6f\144\x75\x63\x74\137\163\150\157\x70\12\11\11\11\11\117\x4e\x20\x28\160\x72\x6f\x64\x75\x63\164\x5f\x73\150\x6f\160\x2e\x69\144\x5f\x70\162\x6f\x64\x75\143\x74\x20\75\x20\x70\56\x69\144\137\x70\162\157\x64\165\143\x74\40\x41\x4e\104\40\x70\162\x6f\x64\x75\143\164\x5f\163\x68\x6f\x70\x2e\x69\144\137\163\150\x6f\160\x20\75\x20" . ($id_shop > 0 ? (int) $id_shop : "\160\x2e\x69\144\137\x73\x68\157\160\137\x64\x65\x66\x61\x75\x6c\x74") . "\x29\xa\x9\11\127\110\105\x52\105\x20\x28\x70\x2e\151\144\137\x70\x72\x6f\x64\x75\x63\x74\x20\75\x20" . (int) $id_product . "\51"; goto Mv_11; Mv_11: return (bool) Db::getInstance()->getValue($query); goto WIT19; G0i2v: ndyJB: goto qLqVj; WIT19: } public static function SendMail($id_lang, $template, $subject, $template_vars, $to, $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null) { goto XZx9m; R79P6: xNDPo: goto xX77Y; s9DOz: $to_list = new Swift_RecipientList(); goto WfcDq; pL1et: Tools::dieOrLog(Tools::displayError("\x45\x72\x72\157\162\x3a\x20\x69\x6e\166\141\154\151\144\x20\x65\x2d\x6d\141\x69\x6c\x20\x74\145\155\160\x6c\x61\x74\145"), $die); goto zLLmZ; KH6mr: $to_plugin = $to; goto JcBdX; icFGo: $configuration["\120\x53\137\115\101\111\114\x5f\123\115\124\x50\x5f\120\117\122\124"] = "\x64\145\x66\141\165\154\164"; goto iW3ta; ONz3y: $from_name = $configuration["\120\123\x5f\x53\x48\x4f\120\x5f\x4e\101\115\x45"]; goto wq9Nz; bZ3cG: if (Validate::isMailName($from_name)) { goto qMvud; } goto b62eO; pDcPt: jnsqG: goto Bj2jC; k1ctw: Tools::dieOrLog(Tools::displayError("\x45\162\x72\x6f\x72\x3a\40\x70\x61\162\141\x6d\x65\x74\145\x72\40\42\164\x6f\x22\40\x69\163\x20\143\157\162\x72\x75\160\x74\145\144"), $die); goto QpEXS; H9RrL: if (Validate::isEmail($from)) { goto Kh4nd; } goto mU1Eu; h5OKD: Jhp1a: goto HMdwA; Trc7q: FLMU5: goto O7Eoo; OLUpR: if (is_array($to) && isset($to)) { goto OQou7; } goto KH6mr; QpEXS: return false; goto Coziu; L3590: if (!(is_numeric($id_shop) && $id_shop)) { goto jnsqG; } goto stSwS; RWv02: $to_name = $to; goto h5OKD; Bj2jC: $configuration = Configuration::getMultiple(array("\120\123\137\x53\110\117\x50\137\105\115\x41\111\x4c", "\x50\123\137\x4d\101\x49\x4c\x5f\x4d\x45\124\x48\117\104", "\x50\x53\137\x4d\x41\x49\114\137\123\x45\122\x56\105\122", "\x50\x53\137\115\x41\111\x4c\x5f\x55\x53\105\x52", "\120\x53\x5f\x4d\x41\111\114\x5f\120\x41\x53\x53\127\x44", "\x50\123\137\123\110\117\x50\137\x4e\x41\x4d\x45", "\x50\123\137\115\x41\111\x4c\x5f\x53\115\124\120\x5f\x45\116\x43\122\x59\x50\124\x49\x4f\116", "\120\x53\x5f\x4d\x41\111\x4c\137\123\115\x54\120\137\x50\x4f\x52\124", "\x50\123\x5f\115\101\111\x4c\x5f\115\105\124\x48\x4f\104", "\x50\x53\137\x4d\101\111\x4c\137\124\x59\120\x45"), null, null, $id_shop); goto cZ3gr; XZx9m: $theme_path = _PS_THEME_DIR_; goto L3590; b62eO: $from_name = null; goto qAvUq; Coziu: Re3gy: goto MQMUu; g23LZ: ki4KX: goto hd23W; J3ZLI: g5KlB: goto H9RrL; w9wlz: $to_name = null; goto R79P6; LD8KR: tul0g: goto uwhnB; mU1Eu: $from = null; goto DP_BB; JcBdX: if (!($to_name == null)) { goto Jhp1a; } goto RWv02; kqgI3: $to = $to_list; goto zfuJe; jD17q: mL_gc: goto bXT7p; wq9Nz: N0H4x: goto bZ3cG; RaQ1F: Tools::dieOrLog(Tools::displayError("\x45\x72\162\157\x72\x3a\40\151\156\166\x61\154\151\144\40\x65\x2d\155\x61\x69\154\x20\x73\165\142\x6a\x65\143\x74"), $die); goto LgbYl; MQMUu: if (is_array($template_vars)) { goto tul0g; } goto GbdoB; CArdf: xXE0p: goto OLUpR; uwhnB: if (!(is_string($to_name) && !empty($to_name) && !Validate::isMailName($to_name))) { goto xNDPo; } goto w9wlz; r9jXp: if (!(!is_array($to) && !Validate::isEmail($to))) { goto Re3gy; } goto k1ctw; qTWP4: $theme_path = _PS_ROOT_DIR_ . "\x2f\x74\150\145\155\x65\163\57" . $theme_name . "\57"; goto swTGu; LgbYl: return false; goto CArdf; hd23W: if (Validate::isMailSubject($subject)) { goto xXE0p; } goto RaQ1F; swTGu: nIyf8: goto pDcPt; zfuJe: cIbLm: goto gPJad; stSwS: $shop = new Shop((int) $id_shop); goto nFNBR; wMGCS: goto cIbLm; goto XyfaV; WfcDq: foreach ($to as $key => $addr) { goto W8q2L; sh1EV: if (!($to_name && is_array($to_name) && Validate::isGenericName($to_name[$key]))) { goto jN0dE; } goto GRHp1; W8q2L: $to_name = null; goto HFMKV; HFMKV: $addr = trim($addr); goto jwhxe; vZrVW: if (!($to_name == null)) { goto wKPW9; } goto kdvjj; kdvjj: $to_name = $addr; goto rhq47; jwhxe: if (Validate::isEmail($addr)) { goto uwe89; } goto Jrlkk; iv7Q_: if (!is_array($to_name)) { goto Xrvof; } goto sh1EV; Jrlkk: Tools::dieOrLog(Tools::displayError("\105\162\162\x6f\162\72\40\x69\156\166\x61\x6c\x69\x64\x20\x65\55\155\141\x69\154\40\x61\x64\144\x72\145\x73\163"), $die); goto nds71; GRHp1: $to_name = $to_name[$key]; goto PeYF3; fGwmB: $to_list->addTo($addr, "\x3d\x3f\125\x54\x46\55\x38\x3f\102\77" . base64_encode($to_name) . "\77\x3d"); goto ydKmJ; PeYF3: jN0dE: goto Uc16J; Uc16J: Xrvof: goto vZrVW; rhq47: wKPW9: goto fGwmB; Vk3Ud: uwe89: goto iv7Q_; ydKmJ: nqOUQ: goto uJKH8; nds71: return false; goto Vk3Ud; uJKH8: } goto Trc7q; zLLmZ: return false; goto g23LZ; HMdwA: $to = new Swift_Address($to, "\x3d\77\x55\124\x46\x2d\x38\77\x42\77" . base64_encode($to_name) . "\77\x3d"); goto wMGCS; O7Eoo: $to_plugin = $to[0]; goto kqgI3; nFNBR: $theme_name = $shop->getTheme(); goto Wb3YY; cZ3gr: if (isset($configuration["\x50\123\137\x4d\101\x49\114\x5f\123\x4d\124\x50\x5f\105\116\103\x52\131\120\124\111\117\116"])) { goto mL_gc; } goto zLXnh; zLXnh: $configuration["\x50\123\x5f\115\101\111\x4c\137\x53\115\x54\x50\137\x45\116\x43\122\x59\x50\x54\111\x4f\x4e"] = "\157\x66\x66"; goto jD17q; bXT7p: if (isset($configuration["\120\x53\137\115\x41\111\114\x5f\x53\115\124\x50\137\120\117\x52\124"])) { goto OrwOr; } goto icFGo; gPJad: try { goto cI3bg; HY6_M: if (!file_exists($template_path . $template . "\56\164\170\164") && ($configuration["\120\x53\137\x4d\101\x49\114\x5f\124\x59\120\x45"] == Mail::TYPE_BOTH || $configuration["\x50\x53\x5f\115\101\x49\x4c\x5f\x54\x59\120\x45"] == Mail::TYPE_TEXT)) { goto w8UWQ; } goto Ui6TP; PlFrf: $template_vars["\x7b\x6d\x79\137\x61\x63\x63\157\165\156\x74\x5f\x75\x72\x6c\175"] = Context::getContext()->link->getPageLink("\155\171\55\141\143\143\x6f\165\x6e\164", true, Context::getContext()->language->id); goto iVanK; S0lYP: if ($iso) { goto dABu3; } goto ANAL4; o0XR3: if (!version_compare(_PS_VERSION_, "\61\x2e\x36\x2e\x30\56\60", "\x3e\x3d")) { goto W_fNI; } goto QkXRc; ngQ_b: $swift = new Swift($connection, Configuration::get("\x50\x53\137\115\101\x49\x4c\137\104\117\115\x41\x49\x4e"), null, null, $id_shop); goto AvKDV; wxK0m: $template_vars["\x7b\163\x68\157\160\137\x75\162\x6c\175"] = Tools::getShopDomain(true, true) . __PS_BASE_URI__ . "\x69\156\144\145\170\56\x70\x68\160"; goto PlFrf; Z3OSa: if ($connection) { goto qHJ9x; } goto f74Ez; iVanK: $template_vars["\173\147\165\x65\x73\164\x5f\164\162\141\143\x6b\x69\x6e\147\x5f\165\x72\154\175"] = Context::getContext()->link->getPageLink("\x67\165\x65\163\x74\55\164\162\141\x63\x6b\x69\x6e\147", true, Context::getContext()->language->id); goto T9PV6; USqPl: $message = new Swift_Message("\x5b" . Configuration::get("\x50\123\x5f\x53\x48\117\120\137\x4e\101\115\x45", null, null, $id_shop) . "\x5d\40" . $subject); goto v2vOd; jYB80: W_fNI: goto cPO9P; aF0XD: ayGoW: goto jeV1U; eyRdp: S82SG: goto Z3OSa; L6Bev: $override_mail = true; goto KBMvG; G4yLJ: $logo = _PS_IMG_DIR_ . Configuration::get("\x50\123\137\114\x4f\107\x4f\137\x4d\x41\x49\114", null, null, $id_shop); goto lrpDB; QkXRc: $template_vars = array_map(array("\124\x6f\157\x6c\163", "\150\164\x6d\154\145\x6e\164\151\164\x69\145\x73\104\x65\x63\x6f\144\x65\x55\124\x46\x38"), $template_vars); goto VYejC; eL5I6: y6G6l: goto sM5kZ; m_6sF: $message->attach(new Swift_Message_Part($template_txt, "\x74\145\170\x74\x2f\160\154\x61\x69\156", "\x38\142\151\x74", "\x75\164\146\x2d\x38")); goto agGkm; c_5jd: GYDTI: goto rFR6g; FGO5m: return false; goto RACid; KzkHo: if (is_array(current($file_attachment))) { goto VfBo7; } goto p8aaA; EEmFh: $connection = new Swift_Connection_NativeMail(); goto wSyes; XNDMx: XPLwV: goto zBEZu; c6S0j: $template_path = $theme_path . "\155\157\144\165\x6c\x65\163\x2f" . $module_name . "\x2f\155\141\151\x6c\163\x2f"; goto v2sMG; P0LN6: Wey33: goto msTTw; FkcNQ: goto q58C9; goto gZTB5; T0QZg: return false; goto MAWko; DsHQ8: $module_name = $res[1]; goto wa60R; aYyg4: $send = $swift->send($message, $to, new Swift_Address($from, $from_name)); goto bcxOI; VeW7w: kcXNo: goto eyRdp; msTTw: if (empty($configuration["\x50\x53\x5f\x4d\101\x49\114\x5f\x50\101\123\x53\x57\104"])) { goto kcXNo; } goto le7cg; FlOWl: $message->setId(SCI::generateId()); goto XNDMx; pqcjD: $module_name = false; goto vYHOm; P_dcd: if (!(preg_match("\43" . __PS_BASE_URI__ . "\x6d\x6f\x64\165\x6c\145\x73\x2f\43", $template_path) && preg_match("\x23\155\157\x64\x75\154\x65\163\57\x28\x5b\x61\55\x7a\60\55\x39\x5f\55\135\53\x29\x2f\43\x75\x69", $template_path, $res))) { goto TKbc4; } goto DsHQ8; wKDPf: return false; goto rdLEf; FcT2_: if (empty($configuration["\120\123\137\115\101\111\x4c\x5f\x55\123\x45\122"])) { goto Wey33; } goto ehUN5; cI3bg: if ($configuration["\x50\123\x5f\x4d\101\x49\114\137\x4d\105\124\x48\x4f\104"] == 2) { goto tZ7b3; } goto EEmFh; zVoOy: if ($override_mail && file_exists($template_path . $iso . "\x2f\x6c\x61\156\147\x2e\160\150\x70")) { goto y6G6l; } goto ogK0J; yYWGe: $logo = _PS_IMG_DIR_ . Configuration::get("\x50\x53\137\x4c\x4f\107\117", null, null, $id_shop); goto sCYnA; G8rIj: xwTUe: goto Lrka4; nKgMj: bwCRv: goto Tq3N6; oRxgY: if ($connection) { goto OLNlf; } goto A2gqT; T9PV6: $template_vars["\x7b\150\151\x73\x74\157\162\x79\137\x75\x72\154\x7d"] = Context::getContext()->link->getPageLink("\x68\151\163\164\157\162\x79", true, Context::getContext()->language->id); goto gvy1p; vYHOm: $override_mail = false; goto P_dcd; uo8On: goto dg03j; goto gvwla; YMuQH: $swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $template_vars)), "\x64\145\x63\x6f\x72\x61\x74\157\x72"); goto AZ_WD; HtIUM: goto er6Hx; goto FUboR; ANAL4: Tools::dieOrLog(Tools::displayError("\105\162\162\x6f\x72\40\x2d\40\x4e\x6f\40\111\123\x4f\x20\143\157\x64\x65\40\x66\157\162\x20\145\x6d\141\151\x6c"), $die); goto FGO5m; UT2EA: if (file_exists(_PS_IMG_DIR_ . Configuration::get("\x50\123\137\x4c\x4f\x47\117", null, null, $id_shop))) { goto rNKGm; } goto T_Jic; v40qT: if (!(empty($configuration["\x50\x53\137\115\101\111\x4c\x5f\123\105\x52\126\x45\122"]) || empty($configuration["\120\x53\x5f\x4d\x41\111\x4c\137\x53\x4d\x54\120\137\x50\117\x52\x54"]))) { goto WzQ8x; } goto YTEsZ; mMMPr: ht5sf: goto aYyg4; MAWko: kXc54: goto uo8On; v2vOd: if (version_compare(_PS_VERSION_, "\x31\56\x35\x2e\60\56\60", "\x3e\75")) { goto CXVb6; } goto L3JEU; agGkm: QBN0r: goto awnOu; AvKDV: $iso = Language::getIsoById((int) $id_lang); goto S0lYP; sM5kZ: include_once $template_path . $iso . "\57\x6c\x61\156\147\56\x70\150\x70"; goto NvBdk; T_Jic: $template_vars["\173\163\150\x6f\x70\137\154\157\147\x6f\x7d"] = ''; goto FkcNQ; AZ_WD: if (!($configuration["\120\x53\137\x4d\x41\111\x4c\137\124\x59\120\105"] == Mail::TYPE_BOTH || $configuration["\120\123\137\115\x41\111\114\137\x54\x59\x50\105"] == Mail::TYPE_TEXT)) { goto QBN0r; } goto m_6sF; zBEZu: $message->headers->setEncoding("\x51"); goto o0XR3; bcxOI: $swift->disconnect(); goto XMVV4; GOz3c: return false; goto JYOSv; rdLEf: nVkU9: goto wUgKp; RACid: dABu3: goto x7tvF; l9XgS: CXVb6: goto FlOWl; cPO9P: if (Configuration::get("\x50\123\x5f\114\117\107\117\x5f\x4d\x41\111\x4c", null, null, $id_shop) !== false && file_exists(_PS_IMG_DIR_ . Configuration::get("\120\x53\x5f\x4c\x4f\107\x4f\137\115\x41\111\x4c", null, null, $id_shop))) { goto hpbyL; } goto UT2EA; Tq3N6: if (!($file_attachment && !empty($file_attachment))) { goto ht5sf; } goto KzkHo; FUboR: hpbyL: goto G4yLJ; NvBdk: cWuMB: goto USqPl; YTEsZ: Tools::dieOrLog(Tools::displayError("\105\x72\162\157\162\72\x20\151\156\x76\141\x6c\x69\144\40\123\115\x54\120\40\163\x65\162\x76\145\162\x20\x6f\162\x20\x53\115\124\120\x20\160\x6f\x72\x74"), $die); goto TO84d; ehUN5: $connection->setUsername($configuration["\x50\x53\137\x4d\101\111\114\x5f\125\x53\105\122"]); goto P0LN6; A2gqT: return false; goto pdtdS; ldbvy: if ($module_name !== false && (file_exists($theme_path . "\x6d\x6f\144\165\x6c\x65\163\x2f" . $module_name . "\x2f\155\x61\x69\154\x73\57" . $template . "\56\x74\x78\164") || file_exists($theme_path . "\155\157\x64\165\154\x65\163\x2f" . $module_name . "\57\155\x61\x69\154\163\x2f" . $template . "\56\150\164\155\154"))) { goto vXZIY; } goto nX3bf; W5hvB: VfBo7: goto qlFD1; pdtdS: OLNlf: goto FcT2_; p8aaA: $file_attachment = array($file_attachment); goto W5hvB; Lrka4: $template_vars["\173\163\150\157\160\x5f\x6e\141\155\145\x7d"] = Tools::safeOutput(Configuration::get("\120\x53\137\123\x48\117\x50\x5f\116\x41\115\105", null, null, $id_shop)); goto wxK0m; qDdDg: goto XPLwV; goto l9XgS; L3JEU: $message->setId(Mail::generateId()); goto qDdDg; f7uwq: $connection = new Swift_Connection_SMTP($configuration["\120\x53\137\115\x41\x49\114\137\x53\105\122\126\105\122"], $configuration["\x50\123\137\x4d\101\111\x4c\137\x53\115\124\120\x5f\x50\117\x52\124"], $configuration["\x50\123\x5f\115\x41\111\x4c\x5f\123\115\x54\x50\x5f\105\116\103\122\x59\x50\124\x49\x4f\x4e"] == "\x73\x73\154" ? Swift_Connection_SMTP::ENC_SSL : ($configuration["\x50\x53\x5f\x4d\101\x49\114\137\123\x4d\x54\x50\137\x45\116\103\x52\x59\x50\124\111\117\x4e"] == "\164\x6c\x73" ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_OFF)); goto jQiJF; w1_6A: qHJ9x: goto ngQ_b; qY08L: goto mBcaR; goto OzCis; OzCis: vXZIY: goto c6S0j; nX3bf: if (file_exists($theme_path . "\155\141\x69\x6c\x73\57" . $template . "\56\164\170\x74") || file_exists($theme_path . "\x6d\141\151\154\163\x2f" . $template . "\x2e\x68\164\x6d\154")) { goto Cg9qr; } goto HY6_M; Ui6TP: if (!(!file_exists($template_path . $template . "\56\x68\x74\x6d\154") && ($configuration["\x50\123\x5f\x4d\x41\x49\114\137\x54\131\x50\105"] == Mail::TYPE_BOTH || $configuration["\120\123\x5f\115\101\111\114\137\124\131\120\105"] == Mail::TYPE_HTML))) { goto UHiH_; } goto Ox51w; rFR6g: include_once _PS_MAIL_DIR_ . $iso . "\57\x6c\x61\x6e\x67\56\160\150\160"; goto Wop_M; TO84d: return false; goto p8TEJ; jeV1U: goto cWuMB; goto eL5I6; Wop_M: WSZt8: goto ZHnlf; heMKb: Logger::addLog(Tools::displayError("\105\x72\x72\x6f\x72\x20\55\40\124\150\145\40\x6c\x61\156\x67\40\146\x69\x6c\145\x20\x69\163\40\155\151\x73\x73\151\156\x67\x20\x66\157\162\40\72") . "\x20" . $iso, 3); goto wKDPf; gvy1p: $template_vars["\x7b\143\157\154\157\162\175"] = Tools::safeOutput(Configuration::get("\x50\x53\137\115\101\x49\x4c\x5f\x43\x4f\114\x4f\122", null, null, $id_shop)); goto YMuQH; wUgKp: goto WSZt8; goto c_5jd; jQiJF: $connection->setTimeout(4); goto oRxgY; blhyY: $template_vars["\173\163\x68\157\160\x5f\x6c\157\x67\157\x7d"] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); goto G8rIj; VYejC: $template_vars = array_map(array("\x54\x6f\157\154\163", "\163\164\x72\x69\x70\163\x6c\x61\163\x68\145\163"), $template_vars); goto jYB80; ogK0J: if ($module_name && file_exists($theme_path . "\x6d\x61\x69\154\x73\x2f" . $iso . "\57\154\141\x6e\x67\x2e\x70\x68\160")) { goto xV0VK; } goto AJmYq; MMN9J: if (!isset($logo)) { goto xwTUe; } goto blhyY; MvN1A: goto kXc54; goto n7ECt; XMVV4: return $send; goto Xs8D4; QICyU: if (!version_compare(_PS_VERSION_, "\61\x2e\x34\56\x30\x2e\x30", "\x3e\x3d")) { goto nVkU9; } goto heMKb; U8nrT: MJ2kQ: goto mMMPr; le7cg: $connection->setPassword($configuration["\x50\x53\x5f\115\101\x49\114\x5f\x50\x41\x53\123\127\x44"]); goto VeW7w; lrpDB: er6Hx: goto MMN9J; v2sMG: mBcaR: goto eOipu; Ox51w: Tools::dieOrLog(Tools::displayError("\x45\162\162\157\162\40\55\40\124\150\x65\40\x66\157\154\154\157\167\151\x6e\147\40\145\55\155\141\151\x6c\40\x74\145\x6d\160\154\141\x74\x65\40\x69\163\40\155\151\x73\163\151\x6e\147\72") . "\40" . $template_path . $template . "\56\x68\x74\155\154", $die); goto GOz3c; gvwla: Cg9qr: goto jRvqK; x7tvF: $template = $iso . "\x2f" . $template; goto pqcjD; eOipu: $template_html = file_get_contents($template_path . $template . "\56\x68\x74\155\154"); goto UPEQ6; K0gPy: Tools::dieOrLog(Tools::displayError("\x45\162\162\x6f\162\40\x2d\x20\x54\x68\x65\40\x66\x6f\154\x6c\x6f\x77\151\x6e\147\40\x65\x2d\155\x61\151\x6c\40\x74\x65\155\160\154\x61\164\x65\40\x69\x73\40\x6d\151\x73\x73\151\156\147\x3a") . "\40" . $template_path . $template . "\56\x74\x78\x74", $die); goto T0QZg; ooDo1: tZ7b3: goto v40qT; jRvqK: $template_path = $theme_path . "\155\141\151\x6c\x73\57"; goto L6Bev; gZTB5: rNKGm: goto yYWGe; f74Ez: return false; goto w1_6A; qlFD1: foreach ($file_attachment as $attachment) { goto EHXRc; EHXRc: if (!(isset($attachment["\143\x6f\156\x74\145\x6e\x74"]) && isset($attachment["\156\x61\x6d\145"]) && isset($attachment["\155\x69\155\x65"]))) { goto ixYgh; } goto eGTZK; M693V: PzEK8: goto xCPcl; dqfF9: ixYgh: goto M693V; eGTZK: $message->attach(new Swift_Message_Attachment($attachment["\x63\x6f\x6e\164\x65\x6e\x74"], $attachment["\156\141\155\145"], $attachment["\155\x69\155\x65"])); goto dqfF9; xCPcl: } goto U8nrT; JYOSv: UHiH_: goto MvN1A; ZHnlf: goto ayGoW; goto G02Vv; wSyes: goto S82SG; goto ooDo1; n7ECt: w8UWQ: goto K0gPy; wa60R: TKbc4: goto ldbvy; p8TEJ: WzQ8x: goto f7uwq; yqEmm: include_once $theme_path . "\155\141\x69\154\163\x2f" . $iso . "\x2f\x6c\141\156\x67\56\x70\x68\x70"; goto aF0XD; ONJqL: $message->attach(new Swift_Message_Part

Function Calls

None

Variables

None

Stats

MD5 b5a4cc710a6c2a4e7aeb2891e09bd306
Eval Count 0
Decode Time 109 ms