function get_priceReduction($ve078758e563f, $v35deb027c7ff, $v99b424f41e46, $va92811717d11) { global $cookie; $v2fba0bad421e = 1; $v0c695db2467f = DB::getInstance()->getRow('SELECT name FROM ' . _DB_PREFIX_ . 'attribute_lang WHERE id_attribute = ' . $ve078758e563f . ' AND id_lang = ' . (int) $cookie->id_lang); $vc0af74e65a93 = $v0c695db2467f['name']; $v0c695db2467f = DB::getInstance()->getRow('SELECT name FROM ' . _DB_PREFIX_ . 'attribute_lang WHERE id_attribute = ' . $v35deb027c7ff . ' AND id_lang = ' . (int) $cookie->id_lang); $v054cfdac2773 = $v0c695db2467f['name']; if ($v99b424f41e46 != '-1' && $v99b424f41e46 != '') { $v0c695db2467f = DB::getInstance()->getRow('SELECT name FROM ' . _DB_PREFIX_ . 'attribute_lang WHERE id_attribute = ' . $v99b424f41e46 . ' AND id_lang = ' . (int) $cookie->id_lang); if (count($v0c695db2467f)) { $v3065d56cf2dc = $v0c695db2467f['name']; } } $v60c30b26529d = scale_find($ve078758e563f); $v72e2e4d5c020 = scale_find($v35deb027c7ff); if ($v99b424f41e46 != '-1') { if ($v99b424f41e46 != '') { $ved38d50aa0d4 = scale_find($v99b424f41e46); } else { $ved38d50aa0d4 = ''; } } else { $v3065d56cf2dc = 1; $ved38d50aa0d4 = 1; } $vb642f4a1cb1a = $vc0af74e65a93 / $v60c30b26529d * ($v054cfdac2773 / $v72e2e4d5c020) * ($v3065d56cf2dc / $ved38d50aa0d4); $v2c8d537f3742 = (int) DB::getInstance()->getValue('SELECT aimd_format FROM ' . _DB_PREFIX_ . 'product WHERE id_product = ' . $va92811717d11); $v56518654595a = $GLOBALS['config_format'][$v2c8d537f3742]['surface_formula']; $vb642f4a1cb1a = str_replace('x', $vc0af74e65a93 / $v60c30b26529d, str_replace('y', $v054cfdac2773 / $v72e2e4d5c020, str_replace('z', $v3065d56cf2dc / $ved38d50aa0d4, $v56518654595a))); $vb642f4a1cb1a = eval('return ' . $vb642f4a1cb1a . ';'); $vef8c5366dd3a = DB::getInstance()->ExecuteS('SELECT ar_percent, ar_way FROM ' . _DB_PREFIX_ . 'aimultidimensions_reductions WHERE ar_product = ' . $va92811717d11 . ' AND ar_minimum_size <= ' . $vb642f4a1cb1a . ' ORDER BY ar_minimum_size DESC LIMIT 0,1'); if (isset($vef8c5366dd3a[0])) { if ($vef8c5366dd3a[0]['ar_way'] == '0') { $v2fba0bad421e = 1 - floatval($vef8c5366dd3a[0]['ar_percent']) / 100; } else { $v2fba0bad421e = 1 + floatval($vef8c5366dd3a[0]['ar_percent']) / 100; } } return $vb642f4a1cb1a . '|' . $v2fba0bad421e; }
if (count($result)) { $param3 = $result[0]['name']; } } // Product price (modified in version 1.5) //$result = DB::getInstance()->ExecuteS('SELECT price FROM ' . _DB_PREFIX_ . 'product WHERE id_product = ' . $request_product); //$product_price = $result[0]['price']; $product_price = (double) Product::getPriceStatic($request_product, false, false, 6, null, false, false); // Product price without taxes & without attributes // Parameters scales $scale1 = scale_find($attribute_id); $scale2 = scale_find((int) $request_attr_2); // Third parameter not set for two dimensions products if ($request_attr_3 != '-1') { if ($request_attr_3 != '') { $scale3 = scale_find((int) $request_attr_3); } else { $scale3 = ''; } } else { $param3 = 1; $scale3 = 1; } // If 3 parameters calculate only if the parameters is set if ($scale3 != '') { // If there are other attributes get intersection for them $array_0 = array(); foreach ($more_attributes as $more_attribute) { $result = DB::getInstance()->ExecuteS('SELECT id_product_attribute FROM ' . _DB_PREFIX_ . 'product_attribute_combination WHERE id_attribute = ' . $more_attribute); if (!count($array_0)) { $array_0 = make_array($result, 'id_product_attribute');