79600522

Date: 2025-04-30 14:28:49
Score: 0.5
Natty:
Report link

i think you need to change the first assign to something like this:

{%- assign pick_up_availabilities = product.variant.store_availabilities | where: 'pick_up_enabled', true -%}

or

{%- assign pick_up_availabilities = product.selected_or_first_available_variant.store_availabilities | where: 'pick_up_enabled', true -%}

And another suggestion is to set the div below the first condition if you don't have to add other stuff in the div.

like this:

{%- assign pick_up_availabilities = product.variant.store_availabilities | where: 'pick_up_enabled', true -%}

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

Let me know if you've tried the variant and it works,
Thanks, have a great day!

Alessandro

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Aleffandro321