亚洲青青视频一区|8MAV在线观看|天天看AV天天看|中日成人手机在线|欧美激情五区六区|亚洲婷婷天堂级片|亚洲天堂网7777|欧美日韩其他另类|手机在线成人AV|成人性大片一区二区三区四区五区

284292114@qq.com 中國站
新聞中心 網(wǎng)絡(luò)推廣 網(wǎng)站建設(shè) 優(yōu)化推廣 首頁>新聞中心>網(wǎng)站建設(shè)

外貿(mào)網(wǎng)站通過minicart.js添加paypal購物車功能結(jié)算支付

時間:2022-12-12   訪問量:0

這兩年國際貿(mào)易越來越流行,以前是資本主義國家來我們國家收割韭菜,隨著我們國家的不斷強大,現(xiàn)在我們很多企業(yè)把生意做到了國外,去收割美金。

如果預算有限,需要給你的外貿(mào)網(wǎng)站添加在線支付的購物車功能??梢酝ㄟ^:minicart.js來實現(xiàn)。

上網(wǎng)去下載:minicart.js,如圖,cart.css是用來重置自己喜歡的樣式的??梢宰约弘S便添加。

image.png


**步:在網(wǎng)站的模板文件公共部分引入代碼:

<link rel="stylesheet" href="/cart/cart.css">
<script src="/cart/minicart.js"></script>
<script>
    paypal.minicart.render();
</script>



第二步:假如你是在產(chǎn)品列表處添加購物車按鈕。

image.png


那么你就只需要在你的產(chǎn)品輸出列表處添加一個:form,如圖所示。

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
                 <div class="index_shop ">
                     <div class="index_shop_img">
                      <a href="[list:link]" target="_blank">
                      <img src="/static/3.jpg" alt="" class="w-100">
                      </a>
                    </div>
                     <div class="index_shop_title py-3" style="white-space:nowrap; ">[list:title]</div>
                     <div class="row">
                        <div class="col-6">
                          $ [list:ext_price]
                        </div>
                        <div class="col-6 text-right colorred">                          
                          <input type="hidden" name="cmd" value="_cart" />
                          <input type="hidden" name="add" value="1" />
                          <input type="hidden" name="business" value="{hmcms:companyemail}" />
                          <input type="hidden" name="item_name" value="[list:title]" />
                          <input type="hidden" name="quantity" value="1" />
                          <input type="hidden" name="amount" value="[list:ext_price]" />
                          <input type="hidden" name="currency_code" value="USD" />      
                          <input type="submit" name="submit" class="listaddcar btn-danger" value="Add to cart" />
                           
                        </div>
                     </div>
                 </div>
          </form>


假如你是在產(chǎn)品詳情頁添加ADD按鈕,方法也是一樣的。

 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <fieldset>
      <input type="hidden" name="cmd" value="_cart" />
      <input type="hidden" name="add" value="1" />
      <input type="hidden" name="business" value="{hmcms:companyemail}" />
      <input type="hidden" name="item_name" value="{content:title}" />
      <input type="hidden" name="quantity" value="1" />
      <input type="hidden" name="amount" value="{content:ext_price}" />
      <input type="hidden" name="currency_code" value="USD" />
      <input type="submit" name="submit" value="Add to cart" class="cartbtn btn-danger" />
    </fieldset>
  </form>


這樣就搞定了。

來看效果:

image.png

服務咨詢
1對1咨詢,專業(yè)客服為您解疑答惑
聯(lián)系銷售
15899750475
在線咨詢
聯(lián)系在線客服,為您解答所有的疑問
ARE YOU INTERESTED IN ?
感興趣嗎?

有關(guān)我們服務的更多信息,請聯(lián)系項目經(jīng)理

15899750475 楊先生