您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程
ecshop购物车结算页面购买数量怎么加减按钮
书翠2023-11-24 21:59:52ecshop商城教程已有人查阅
导读方法一:1. 以下JS代码,添加到 js/common.js 的最后;方法二:在flow.dwt中找到购买数量的文本框,在他的前后分别加上
方法一:1. 以下JS代码,添加到 js/common.js 的最后
function cart_number(txt_id, type, num)
{ num = num || 1;
var txt = document.getElementByIdx_x_x(txt_id);
var source_num = parseInt(txt.value);
if (source_num == 1 && type == '-')
{
alert('请最少购买一个商品');
return;
}
var to_num = source_num;
if (type == '+')
{
to_num += num;
}
else if (type == '-')
{
to_num -= num;
}
txt.value = to_num;
showdiv(txt);
}
2.在flow.dwt中找到购买数量的文本框,在他的前后分别加上
<a href="javascript:cart_number('goods_number_{$goods.rec_id}', '-');">-</a>
<a href="javascript:cart_number('goods_number_{$goods.rec_id}', '+');">+</a>
方法二:在flow.dwt中找到购买数量的文本框,在他的前后分别加上
<IMG style="PADDING-LEFT: 0px; CURSOR: pointer"
onclick='if (document.getElementByIdx_x("number").value>1){document.getElementByIdx_x("number").value--;}'
src="images/down.gif" >;
<INPUT id=number style="WIDTH: 40px; TEXT-ALIGN: right" maxLength=4
value=1 name=cart_quantity>
;<IMG style="PADDING-RIGHT: 30px; MARGIN: 0px; WIDTH: 25px; CURSOR: pointer" onclick='document.getElementByIdx_x("number").value++;'
src="images/up.gif" >
本文标签:
很赞哦! ()
相关文章
随机图文
-
ecshop订单状态数据表字段说明
order_info 表刚下完订单order_status 0shipping_status 0pay_status 0取消order_status 2shipping_status 0pay_status 0 -
ecshop文章详情页怎么显示文章浏览次数
1)、首先需要修改一下数据库结构进ECSHOP后台 》 数据库管理 》SQL查询 ,输入下面SQL语句 -
ecshop销售排行榜自定义插件
由于ecshop很多功能都已经做好了,模式比较固定,比如销售排行榜,ecshop会根据你网店商品真实的成交率来为用户呈现真正的销售排行榜。 -
ecshop商城调用论坛新文章方法
JS调用的方法比较方便。:登陆论坛后台 工具---数据调用---设置----开启外部调用。 第二:添加---主题列表---获取外部调用的代码 第三:在EC
留言与评论 (共有 条评论) |