最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

shopify - How can I create a label that will display only if product is in stock at it's location - Stack Overflow

programmeradmin7浏览0评论

I am wanting to work with the different locations that shopify allows you to have, currently there is a function that can do that on the product display page where it shows where the closest pickup location is.

What I am wanting to to have that same product that would display that text to also display a "Stocked" label on the collection view page(the page that displays all the products in a collection)

Is this possible and how can I achieve this?

Currently this is the code I have but it comes up with an empty field:

<div class="pickup-availability-container">
  {%- assign pick_up_availabilities = product.store_availabilities | where: 'pick_up_enabled', true -%}

  {%- if pick_up_availabilities.size > 0 -%}
    <span class="h6" style="color:var(--lc-blue);"> STOCKED {% render 'icon_ticked_circle' %}</span>
  {%- endif -%}
</div>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论