没有合适的资源?快使用搜索试试~ 我知道了~
ecshop添加“金额+积分”的兑换功能
4星 · 超过85%的资源 需积分: 9 171 下载量 155 浏览量
2012-08-22
21:35:07
上传
评论 10
收藏 5KB TXT 举报
温馨提示
试读
3页
ecshop添加“金额+积分”的兑换功能 积分兑换 ecshop
资源推荐
资源详情
资源评论
积分商城里添加个“金额+积分”的兑换功能,(高手略过)虽然没有在商品详情页的“金额+积分”功能那么实用,但是用这个应急一下下也是可以考虑考虑的。呵呵……
好吧,进入正题:
1、执行SQL语句:ALTERTABLE `ecs_exchange_goods` ADD `goods_price` DECIMAL (10,2) default0.00 NOT NULL
2、修改admin/templates/exchange_goods_info.htm页:找到
“<td><inputtype="text" name="exchange_integral" maxlength="60" size="20"value="{$goods.exchange_integral}"/>{$lang.require_field}
<span class="notice-span" {if$help_open}style="display:block" {else} style="display:none" {/if}id="noticepackagePrice">{$lang.notice_integral}</span></td>”
在下面添加:
<!--积分商城加上金额二次开发-->
<tr>
<tdclass="narrow-label"><ahref="javascript:showNotice('noticepackagePrice');"title="{$lang.form_notice}"><imgsrc="images/notice.gif" width="16" height="16" border="0"alt="{$lang.form_notice}"></a>{$lang.goods_price}</td>
<td><inputtype="text" name="goods_price" maxlength="60" size="20"value="{$goods.goods_price}"/>{$lang.require_field}
<span class="notice-span" {if$help_open}style="display:block" {else} style="display:none" {/if}id="noticepackagePrice">{$lang.notice_price}</span></td>
</tr>
<!--end-->
3、修改admin/templates/exchange_goods_info.htm页,找到:
<th><ahref="javascript:listTable.sort('exchange_integral');">{$lang.exchange_integral}</a>{$sort_exchange_integral}</th>
在下面添加:
<!--积分商城加上金额二次开发-->
<th><ahref="javascript:listTable.sort('exchange_price');">{$lang.goods_price}</a>{$sort_exchange_price}</th>
<!--end-->
再找到:
<tdalign="center"><spanonclick="listTable.edit(this, 'edit_exchange_integral',{$list.goods_id})">{$list.exchange_integral}</span></td>在它下面添加:
<!--积分商城加上金额二次开发-->
<tdalign="center"><spanonclick="listTable.edit(this, 'edit_exchange_price',{$list.goods_id})">{$list.goods_price}</span></td>
<!--end-->
4、修改admin/exchange_goods.php页:找到
$sql = "INSERT INTO".$ecs->table('exchange_goods')."(goods_id,exchange_integral,goods_price, is_exchange,is_hot) ".
"VALUES ('$_POST[goods_id]','$_POST[exchange_integral]', '$_POST[goods_price]','$_POST[is_exchange]', '$_POST[is_hot]')"
注意上面是添加了:goods_price, 和 '$_POST[goods_price]',的;
找到:$sql = "SELECT eg.goods_id, eg.exchange_integral,eg.is_exchange,eg.is_hot,eg.goods_price, g.goods_name ".
好吧,进入正题:
1、执行SQL语句:ALTERTABLE `ecs_exchange_goods` ADD `goods_price` DECIMAL (10,2) default0.00 NOT NULL
2、修改admin/templates/exchange_goods_info.htm页:找到
“<td><inputtype="text" name="exchange_integral" maxlength="60" size="20"value="{$goods.exchange_integral}"/>{$lang.require_field}
<span class="notice-span" {if$help_open}style="display:block" {else} style="display:none" {/if}id="noticepackagePrice">{$lang.notice_integral}</span></td>”
在下面添加:
<!--积分商城加上金额二次开发-->
<tr>
<tdclass="narrow-label"><ahref="javascript:showNotice('noticepackagePrice');"title="{$lang.form_notice}"><imgsrc="images/notice.gif" width="16" height="16" border="0"alt="{$lang.form_notice}"></a>{$lang.goods_price}</td>
<td><inputtype="text" name="goods_price" maxlength="60" size="20"value="{$goods.goods_price}"/>{$lang.require_field}
<span class="notice-span" {if$help_open}style="display:block" {else} style="display:none" {/if}id="noticepackagePrice">{$lang.notice_price}</span></td>
</tr>
<!--end-->
3、修改admin/templates/exchange_goods_info.htm页,找到:
<th><ahref="javascript:listTable.sort('exchange_integral');">{$lang.exchange_integral}</a>{$sort_exchange_integral}</th>
在下面添加:
<!--积分商城加上金额二次开发-->
<th><ahref="javascript:listTable.sort('exchange_price');">{$lang.goods_price}</a>{$sort_exchange_price}</th>
<!--end-->
再找到:
<tdalign="center"><spanonclick="listTable.edit(this, 'edit_exchange_integral',{$list.goods_id})">{$list.exchange_integral}</span></td>在它下面添加:
<!--积分商城加上金额二次开发-->
<tdalign="center"><spanonclick="listTable.edit(this, 'edit_exchange_price',{$list.goods_id})">{$list.goods_price}</span></td>
<!--end-->
4、修改admin/exchange_goods.php页:找到
$sql = "INSERT INTO".$ecs->table('exchange_goods')."(goods_id,exchange_integral,goods_price, is_exchange,is_hot) ".
"VALUES ('$_POST[goods_id]','$_POST[exchange_integral]', '$_POST[goods_price]','$_POST[is_exchange]', '$_POST[is_hot]')"
注意上面是添加了:goods_price, 和 '$_POST[goods_price]',的;
找到:$sql = "SELECT eg.goods_id, eg.exchange_integral,eg.is_exchange,eg.is_hot,eg.goods_price, g.goods_name ".
leikaixin
- 粉丝: 3
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页