The ultimate effect is as above
Specific steps:
1. Manually or SQL Modify data table, add 2 fields
ALTER TABLE ADD VARCHAR - NULL DEFAULT "' ADD int (One notNULLDEFAULT'0';
2. Modify the admin/countries.php file, add the form Insert editing function, a total of 7, here ignore the specific code.
3. After that, two functions to get the country drop-down list are modified (one for the foreground background)
#includes/functions/functions_lookups.php
functionZen_get_countries ($countries _id= ",$with _iso_codes=false) { Global $db; $countries _array=Array(); if(Zen_not_null ($countries _id)) {~~ } Else { $countries= "Select countries_id, Countries_name, COUNTRIES_NAME_CN from" . Table_countries. "ORDER by order_by, Countries_name"; $countries _values=$db->execute ($countries); while(!$countries _values-EOF) { $countries _array[] =Array(' countries_id ' =$countries _values->fields[' countries_id '], ' countries_name ' =$countries _values->fields[' Countries_name ']. "-".$countries _values->fields[' COUNTRIES_NAME_CN ']); $countries _values-MoveNext (); } } return $countries _array; }
#admin/includes/functions/general.php
functionZen_get_countries ($default= ' ') { Global $db; $countries _array=Array(); if($default) { $countries _array[] =Array(' id ' = ' = ', ' text ' = =$default); } $countries=$db->execute ("Select countries_id, Countries_name,countries_name_cn from" . Table_countries. "ORDER by order_by, Countries_name"); while(!$countries-EOF) { $countries _array[] =Array(' id ' = =$countries->fields[' countries_id '], ' text ' = =$countries->fields[' Countries_name ']. "-".$countries->fields[' COUNTRIES_NAME_CN ']); $countries-MoveNext (); } return $countries _array; }
Final effect
Background functions are not modified if they are not specifically required.
Zencart National ranking and extension of Chinese names