微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在添加到购物车之前添加消息提醒“选择您的尺码”shopify

如何解决在添加到购物车之前添加消息提醒“选择您的尺码”shopify

如何在添加到购物车之前添加消息提醒“选择您的尺码”shopify

我当前的代码

{% include 'sca_freegift_price' with product %}
<script type="text/javascript">
  var SPOCustom = {};
  SPOCustom.selectorPrefix = '.product_section ';
</script>

<!-- spurit_po-added -->
{% include 'spurit_po-product-snippet' %}
<!-- /spurit_po-added -->
{% include 'shappify-bdl-no-select' %}

<script type="text/javascript">
  var orig_array = new Object();
</script>

  <div class="columns-fluid" itemscope itemtype="http://data-vocabulary.org/Product" id="product-{{ product.id }}">

  <div class="section product_section clearfix">

    {% include 'product-detail-snippet' %}

    {% if settings.product_images_position == 'right' %}
      <div class="{% if settings.product_sidebar %}six{% else %}eight{% endif %} columns {% if product-images == blank %}{% if settings.product_images_position == 'left' %}alpha{% else %}omega{% endif %}{% endif %}">
        {% include 'product-images' %}
        {% include "social-buttons" with "product" %}
      </div>
    {% endif %}

    <script text="text/javascript">
     $(document).ready(function(){

       var cartAdd = {
         Name: {{ product.title|json }},ProductHandle: {{ product.handle | prepend: '"' | append: '"' }},ProducePrice: {{sca_price | money | prepend: '"' | append: '"'}},ProductID: {{ product.id|json }},{% for image in product.images %}
         Image{{ image.position}}: {{ image.src | product_img_url: 'medium'| prepend: '"http:' | append: '"' }},{% endfor %}
         Categories: {{ product.collections|map:'title'|json }}
       };
       function learnq(){
         _learnq.push(['track','Added to Cart',cartAdd]);
       }

       $("#add-to-cart").click(learnq);
    });

我正在编辑 product.liquid 文件,如果用户不选择尺寸,我需要显示消息提醒“选择您的尺寸”,并且必须选择添加到购物车

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。