function html() { $ret = array(); // $mods = array('Ship_district','Ship_weight_local'); $mods = array('Ship_weight_local'); $submods = array('local', 'nacional'); // $submods = array('local','nacional','EMS','tradicional_1','tradicional_2'); $mod = new Ship_weight_local(); $ct = 0; foreach ($submods as $titlemod) { $chk = null; if ($ct == 0) { $chk = 'checked = true'; } $ct++; $ret[] = ' <div class="shipping shipping_' . $titlemod . '"> <div class="shipping_radio"> <input type="radio" name="shipping" value="' . $titlemod . '" ' . $chk . ' id="shipping-radio-' . $ct . '"> </div> ' . $mod->getbygroup($titlemod) . ' <div class="shipping_price"> <strong id="js_ship_weight_' . $titlemod . '">0.00</strong> </div> </div> '; } return $ret; }
function refresh_prices_shipping() { $district = @$_SESSION['conf']['order']['district']; // $model = new fpp_district_Model(); $model = new fpp_pay_per_weight_Model(); $md = new Ship_weight_local(); $orm = $model->db2cls($district); $_GET['id'] = $district; $ty = __($orm->type, false); $_SESSION['conf']['order']['district_name'] = $orm->name . "({$ty})"; $_SESSION['conf']['order']['district_price'] = $md->ajax_getmoney(false); $p = $_SESSION['conf']['order']['district_price']; Basic::currency($p); $_SESSION['conf']['order']['district_price_format'] = $p; }