false))); } foreach ($specificprice_list as $key => $specificprice) { $data[$key]['id_specific_price'] = $specificprice['id_specific_price']; $data[$key]['from'] = $specificprice['from']; $data[$key]['to'] = $specificprice['to']; $data[$key]['reduction_type'] = $specificprice['reduction_type']; if ($data[$key]['reduction_type'] != 'amount') { $data[$key]['reduction_type'] = '%'; } else { $data[$key]['reduction_type'] = 'amount'; } if ($specificprice['reduction_type'] != 'amount') { $data[$key]['reduction'] = round($specificprice['reduction'] * 100); } else { $data[$key]['reduction'] = round($specificprice['reduction']); } $data[$key]['reduction_tax'] = $specificprice['reduction_tax']; $data[$key]['status'] = DayDeal::checkEntity($data[$key]['id_specific_price']); } die(Tools::jsonEncode(array('status' => true, 'data' => $data))); } }