First, in the database to add fields, will be handwritten in the background to add, will not enter the phpMyAdmin default on the line.
It's a generic notation.
ALTER TABLE ' ecs_goods ' ADD ' GOODS_SZ ' VARCHAR (+) not NULL after ' goods_weight ';
Copy Code
The table name can be modified.
Ii. Modification of admin/good.php
Found it
/* Process commodity data */
$shop _price =!empty ($_post[' Shop_price ')? $_post[' Shop_price ': 0;
Copy Code
Follow the gourd drawing scoop to add near their own field.
Found it
/* Warehousing */
if ($is _insert)
{
if ($code = = ")
Copy Code
Also according to gourd painting Scoop added near their own fields,
Found it
"Goods_weight = ' $goods _weight ',".
Copy Code
Also according to gourd painting scoop to add near their own field.
Third, modify the admin/templates/goods_info.htm
Add in the right place, if you want to add in the edit item-Other information, find
{if $code eq '}
<tr>
<TD class= "label" >{$lang .lab_goods_weight}</td>
<td><input type= "text" name= "Goods_weight" value= "{$goods. Goods_weight_by_unit}" size= "/> <select Name= "Weight_unit" >{html_options options= $unit _list selected= $weight _unit}</select></td>
</tr>
{/if}
Copy Code
Add to
<tr>
<TD class= "label" >{$lang .lab_goods_sz}</td>
<td><input type= "text" name= "GOODS_SZ" value= "{$goods. GOODS_SZ}" size= "/> </td>
</tr>
Copy Code
Iv. Modify the template in the appropriate place add: if you want to add a search under the weight of the product
{$goods. Goods_weight}
Copy Code
Add the following
{$lang. GOODS_SZ} {$goods. GOODS_SZ}
Copy Code
Modify the corresponding fields yourself.
Ecshop product page Add any field method