The following is the idea and implementation process of batch uploading (adding custom attributes).
1. Add attributes
The reason why only specific attributes can be uploaded is that the fixed attributes uploaded in batches all come from one table. esc_goods table.
So we think that if we have our own attributes, we must add our own attributes to esc_goods. For example, the field added this time adds
specifications: goods_guige
Code: sql statement: alter table ecs_goods add goods_guige varchar(255) not null after goods_desc;
2. Page modification
Location: admin/templates/goods_info.htm Add custom fields according to its form
Here I am Line 174 inserted:
3. Add fields for reading and updating the product table (not related to batch upload but easy to view)
Location: admin/goods.php
Add at the update location:
$sql=" update ecs_goods set goods_guige='".$_POST['goods_guige']."' where goods_id= ".$_REQUEST['goods_id'];
$db->query($sql);
Here The attributes of the product can be updated
4. Add fields for batch upload
language/admin/goods_batch.php
Add fields:
//Customized Batch upload field
$_LANG['upload_goods']['goods_guige']='Specification';
OK! At this point, as long as you export the cvs of the product, you can upload customized attributes in batches.