/** * method call when ajax request is made with the details row action * @see AdminController::postProcess() */ public function ajaxProcess() { /* PrestaShop demo mode */ if (_PS_MODE_DEMO_) { die(Tools::displayError('This functionality has been disabled.')); } if ($table = Tools::GetValue('table')) { $request_sql = new RequestSql(); $attributes = $request_sql->getAttributesByTable($table); foreach ($attributes as $key => $attribute) { unset($attributes[$key]['Null']); unset($attributes[$key]['Key']); unset($attributes[$key]['Default']); unset($attributes[$key]['Extra']); } die(Tools::jsonEncode($attributes)); } }
/** * method call when ajax request is made with the details row action * @see AdminController::postProcess() */ public function ajaxProcess() { if ($table = Tools::GetValue('table')) { $request_sql = new RequestSql(); $attributes = $request_sql->getAttributesByTable($table); foreach ($attributes as $key => $attribute) { unset($attributes[$key]['Null']); unset($attributes[$key]['Key']); unset($attributes[$key]['Default']); unset($attributes[$key]['Extra']); } die(Tools::jsonEncode($attributes)); } }