简体   繁体   English

有没有办法在shopify上的每个主题的“添加到购物车”按钮下面添加我的进度条

[英]Is there any way to add my progress bar always just below the “Add To Cart” button on shopify for each theme

I have to add a progress bar always exact below the "Add To Cart" button, I am adding it using script tag. 我必须在“添加到购物车”按钮下面添加一个进度条,我使用脚本标签添加它。 But for each theme the id and class of the "Add To Cart" button is vary. 但是对于每个主题,“添加到购物车”按钮的ID和类别是不同的。 So any possible solution for that. 所以任何可能的解决方案。 Also can i load bootstrap via script tag. 我也可以通过脚本标签加载bootstrap。 currently i am using inline style for my progress bar. 目前我正在为我的进度条使用内联样式。 The "Add To Cart" button for first theme is 第一个主题的“添加到购物车”按钮是

<form id="AddToCartForm" enctype="multipart/form-data" method="post" action="/cart/add">
    <button class="btn" id="AddToCart" name="add" type="submit">
        <span id="AddToCartText">Add to Cart</span>
    </button>
</form>

and for the second theme is 第二个主题是

<form enctype="multipart/form-data" method="post" action="/cart/add">

  <div id="product-add">
    <input type="submit" value="Add to cart" class="primary button" id="add" name="add">
  </div>
</form>

Using javascript and api you can add progress bar. 使用javascript和api可以添加进度条。 Try to use element class insted of id. 尝试使用id的元素类。 -j()t -j()吨

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM