ecshop 批量上传(加入自定义属性)
下面是实现批量上传(加入自定义属性)思路以及实现的过程。
1.加入属性
之所以只能上传特定的属性,应该是批量上传的固定属性都来自于一张表。esc_goods表.
所以我们想假如自己的属性,必须要在esc_goods中加入自己的属性.比如这次加入的字段加
规格: goods_guige
代码:sql语句:alter table ecs_goods add goods_guige varchar(255) not null after goods_desc;
2.页面修改
位置: admin/templates/goods_info.htm按照其形式加入自定义字段
我这里是174行插入的:
3.添加读取和更新商品表的字段 (和批量上传无关但是便于查看)
位置:admin/goods.php
在更新位置上加入:
$sql="update ecs_goods set goods_guige='".$_POST['goods_guige']."' where goods_id= ".$_REQUEST['goods_id'];
$db->query($sql);
到此商品的属性就可以被更新掉了
4.批量上传添加字段
language/admin/goods_batch.php
添加字段:
//自定义批量上传字段
$_LANG['upload_goods']['goods_guige']='规格';
OK!至此,只要将商品的cvs导出,即可实现批量上传自定义的属性.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Mac version
God-level code editing software (SublimeText3)
