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

I am wanting to work with the different locations that shopify allows you to have, currently there is a

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>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744209986a4563286.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信