$session_qty = $_SESSION['cart_qty']; /* --- TOTAL WEIGHT --- */ $total = 0; foreach($session_type as $key=>$type){ $weight = $_ajax->get_cart($type); $total += $weight->type_weight * $_SESSION['cart_qty'][$key]; } $total_weight = $total; if($ajx_country == 'Indonesia'){ $courier = $_ajax->get_rate($ajx_city); /* --- DATA --- */ echo '<select class="form-control" id="id-shipping" name="courier_service" onChange="setRate()" >'; echo '<option value="0">-- Select Shipping Method --</option>'; foreach($courier as $courier){ $name = $_ajax->get_courier($courier->courier_name); $ship_weight = ceil($total_weight / $courier->courier_weight); $active = $_ajax->get_active_shipping($courier->courier_name); if($active->active_status == 'Active'){ $active_class = ''; }else if($active->active_status == 'Inactive'){ $active_class = 'class="hidden"';