Ecshop product page Add any field method

Source: Internet
Author: User

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>
&LT;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>
&LT;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.