經常有朋友反應,他們在ecshop購物車中修改數量,點“更新購物車”時,經常不小心點中了“清空購物車”,一下子,所以的產品都沒了,最好是給ecshop加上一個“清空購物車”的提醒!
以下最模板的處理方法:
1.打開flow.dwt文件找到
<input type="button" value="{$lang.clear_cart}" class="bnt_blue_1" onclick="location.href='flow.php?step=clear'" />
在他的上面加上
<script type = "text/javascript" language = "javascript">
function clear1()
{
if(confirm("您確定要清空購物車嗎?"))
{
window.location.href="flow.php?step=clear";
}
}
</script>
2.再把
<input type="button" value="{$lang.clear_cart}" class="bnt_blue_1" onclick="location.href='flow.php?step=clear'" />
改為
<input type="button" value="{$lang.clear_cart}" class="bnt_blue_1" onClick="return clear1();" />
這樣就完全OK啦!
新聞熱點
疑難解答