一、首先将直接购买的链接设置为 <a href="javascript:bool =1;addToCart({$goods.goods_id})">

bool值为1,goods_id为当前商品内容的ID.

二、打开common.js文件,在代码前面声明一个变量:var bool=0;

然后搜索flow.php?step=cart (大概在第89行左右)

在下面添加一句代码:

(bool == 1) && (cart_url = 'flow.php?step=consignee');

意思是 当bool = 1 条件满足时 则cart_url链接到  'flow.php?step=consignee' 直接购买的页面

这样就实现了“立刻购买”与“添加到购物车”并存的方法.

 

相关文章:

  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案