function _settingRates($_ModuleConfigID) { $smarty = new Smarty(); $Courier = new CourierShippingModule2($_ModuleConfigID); $Rates = array(); if (isset($_GET['delete_rate'])) { $Courier->_deleteRate($_GET['delete_rate']); Redirect(set_query('delete_rate=')); } if (isset($_POST['save'])) { $_Rates = array(); $_Amounts = array(); foreach ($_POST['fORDER_AMOUNTS'] as $_Ind => $_Amount) { if ((double) $_Amount <= 0 || (double) $_POST['fRATES'][$_Ind] <= 0 || in_array($_Amount, $_Amounts)) { continue; } $_Rate = array(); $_Rate['rate'] = preg_replace('/([0-9]+)\\%/', '$1', $_POST['fRATES'][$_Ind]); if ($_Rate['rate'] != $_POST['fRATES'][$_Ind]) { $_Rate['isPercent'] = 1; } else { $_Rate['isPercent'] = 0; } $_Rate['orderAmount'] = $_Amount; $_Amounts[] = $_Amount; $_Rates[] = $_Rate; } $Courier->_saveRates($_Rates); } if (!count($Rates)) { $Rates = $Courier->_getRates(); } $smarty->hassign('Rates', $Rates); return $smarty->fetch($Courier->TemplatesDir . 'courier2.tpl'); }
$smarty->assign('productID', $productID); } if (isset($_GET['currency'])) { $smarty->assign('currency', $_GET['currency']); } if (isset($_GET['user_details'])) { $smarty->assign('user_details', $_GET['user_details']); } if (isset($_GET['aux_page'])) { $smarty->assign('aux_page', $_GET['aux_page']); } if (isset($_GET['show_price'])) { $smarty->assign('show_price', $_GET['show_price']); } if (isset($_GET['searchstring'])) { $smarty->hassign('searchstring', $_GET['searchstring']); } if (isset($register)) { $smarty->assign('register', $register); } if (isset($order)) { $smarty->assign('order', $order); } if (isset($check_order)) { $smarty->assign('check_order', $check_order); } //set defualt main_content template to homepage $smarty->assign('main_content_template', 'home.tpl'); $cats = catGetCategoryCListMin(); //include all .php files from core/includes/ dir or from cache if ((int) CONF_SMARTY_FORCE_COMPILE) {