您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程

ecshop商品列表商品批量购买插件代码实例

灵雁2023-12-15 22:19:47ecshop商城教程已有人查阅

导读

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="{$keywords}" />
<meta name="Description" content="{$description}" />
<meta name="Description" content="{$description}" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>{$page_title}</title>
<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="{$ecs_css_path}" rel="stylesheet" type="text/css" />
{* 包含脚本文件 *}
{insert_scripts files='common.js'}
<!-- 购物车内容 -->
{* 包含脚本文件 *}
<SCRIPT src="js/common.js" type=text/javascript></SCRIPT>
<SCRIPT src="js/shopping_flow.js" type=text/javascript></SCRIPT>
<script type="text/javascript">
var process_request = "{$lang.process_request}";
</script>
{insert_scripts files='showdiv.js'}
{insert_scripts files='transport.js'}
<script type="text/javascript" charset="utf-8">
function collect_to_flow(goodsId,number)
{
var goods        = new Object();
var spec_arr     = new Array();
var fittings_arr = new Array();
// var numbernumber       = number;
goods.spec     = spec_arr;
goods.goods_id = goodsId;
goods.number   = number;
goods.parent   = 0;
Ajax.call('flow.php?step=add_to_cart', 'goods=' + goods.toJSONString(), collect_to_flow_response, 'POST', 'JSON');
}
function collect_to_flow_response(result)
{
if (result.error > 0)
{
// 如果需要缺货登记,跳转
if (result.error == 2)
{
if (confirm(result.message))
{
location.href = 'user.php?act=add_booking&id=' + result.goods_id;
}
}
// 没选规格,弹出属 选择框
else if (result.error == 6)
{
openSpeDiv(result.message, result.goods_id, result.parent);
}
else
{
alert(result.message);
}
}
else
{
var cartInfo = document.getElementById('ECS_CARTINFO');
var cart_url = 'flow.php?step=cart';
if (cartInfo)
{
cartInfo.innerHTML = result.content;
}
}
}
</script>
</head>
<body>
<!-- #BeginLibraryItem "/library/page_header.lbi" --><!-- #EndLibraryItem -->
<div id="main">
<!--当前位置 start-->
<div class="block box">
<div id="ur_here">
<!-- #BeginLibraryItem "/library/ur_here.lbi" --><!-- #EndLibraryItem -->
</div>
</div>
<!--当前位置 end-->
<div class="blank"></div>
<div class="block">
<div class="flowBox">
<h6><span>{$lang.print_quotation}</span></h6>
<form action="quotation.php" method="post" name="searchForm" target="_blank" class="quotation">
<!-- 分类 -->
<select name="cat_id"><option value="0">{$lang.all_category}</option>{$cat_list}</select>
<!-- 品牌 -->
<select name="brand_id"><option value="0">{$lang.all_brand}</option>{html_options options=$brand_list}</select>
<!-- 关键字 -->
{$lang.keywords} <input type="text" name="keyword" class="inputBg"/>
<!-- 搜索 -->
<input name="act" type="hidden" value="print_quotation" />
<input type="submit" name="
print_quotation" id="print_quotation" value="{$lang.print_quotation}" style="vertical-align:middle;" class="bnt_blue_1" />
</form>
</div>
​​​​​​​</div>
<title>{$lang.quotation} - {$shop_name}</title>
{literal}
<style type="text/css" media="all">
body,td,th {text-align:left;font-size:13px; padding:2px;}
table{border-top:1px solid #000;border-left:1px solid #000;}
table td,table th{border-right:1px solid #000;border-bottom:1px solid #000;}
</style>
<style type="text/css" media="print">
.print_btn{display:none;}
</style>
{/literal}
</head>
<body>
<script type="text/javascript">
//<![CDATA[
function calc_price(base_price, rank_price)
{
document.write((base_price * rank_price / 100).toFixed(2));
}
//]]>
</script>
<h3 align="center">{$shop_name} - {$lang.quotation}</h3>
<table width=" " cellspacing="0" cellpadding="0">
<tr>
<th>{$lang.goods_name}</th>
<th>{$lang.goods_category}</th>
<!--{if $cfg.use_storage and $cfg.show_goodsnumber}-->
<th>{$lang.goods_inventory}</th>
<!-- {/if} -->
<th>{$lang.price}</th>
<!--{foreach from=$extend_price item=ext_price}-->
<th>{$ext_price}</th>
<!--{/foreach}-->
<th>{$lang.number}</th>
<th>dianjigoum</th>
</tr>
<!--{foreach from=$goods_list item=goods}-->
<tr>
<td><a href="goods.php?id={$goods.goods_id}" target="_blank">{$goods.goods_name}</a></td>
<td>{$goods.goods_category}</td>
<!--{if $cfg.use_storage and $cfg.show_goodsnumber}-->
<td>{$goods.goods_number}</td>
<!-- {/if} -->
<td>{$goods.shop_price}</td>
<!--{foreach from=$extend_rank[$goods.goods_id] item=ext_rank}-->
<td>{$ext_rank.price}</td>
<!--{/foreach}-->
<td><!-- {if $goods.goods_id gt 0 && $goods.is_gift eq 0 && $goods.parent_id eq 0} 普通商品可修改数量 -->
<input name="number" type="text" value="0" size="4"  id="number"
style="vertical-align:middle;border:1px solid #CCC;width:35px;font-size:12px;color:#32424F;
text-align:right;"  onblur="collect_to_flow({$goods.goods_id},this.value);"/>
<!-- {else} -->
{$goods.goods_number}
<!-- {/if} --></td><td><a href="javascript:addToCart({$goods.goods_id})"> O K</a></td>      </tr>
<!--{/foreach}-->
</table>
<center><input type="button" class="print_btn" value=
"{$lang.print_quotation}" onClick="window.print()" />
<input name="submit" type="submit" class="bnt_blue_1" value="&nbsp;&nbsp;
{$lang.update_cart}--Print--" style="color:#000">
<a href="flow.php">批量购买 </a></center>
</div>
<!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem -->
</body>
</html>

本文标签:

很赞哦! ()

留言与评论 (共有 条评论)
验证码:

本栏推荐

相关标签