{function name="_close_button"} {/function} {function name="_header_block" title='' show_back=false mobile_toolbar=false}
{if $show_back} {/if}

{$title|escape}

{_close_button}
{if $mobile_toolbar}

[`Pickup locations`]

[`List`] [`Map`]
{/if}
{/function} {function name="_sku_remainder" stock_id=null count=null} {$green_fill = '#14B00E'} {$red_fill = '#F43434'} {$orange_fill = '#F2994A'} {$gray_fill = '#E0E0E0'} {$rect_fills = [$green_fill, $green_fill, $green_fill]} {if !empty($stocks[$stock_id]) && $count !== null} {$_stock = $stocks[$stock_id]} {if $count <=0} {$rect_fills = [$gray_fill, $gray_fill, $gray_fill]} {elseif $count <= $_stock.critical_count} {$rect_fills = [$gray_fill, $gray_fill, $red_fill]} {elseif $count <= $_stock.low_count} {$rect_fills = [$gray_fill, $orange_fill, $orange_fill]} {/if} {/if}
{if $count === null} [`In stock`] {elseif $count < 1} [`Out of stock`] {else} {_wp('Only %d left in stock', 'Only %d left in stock', $count)} {/if}
{/function} {function name="_pickup_item" pickup=[]} {$_stock_id = null} {$_count = null} {$sku = $product.skus[$selected_sku_id]} {foreach $stocks_product_count as $stock_product_count} {if $selected_sku_id == $stock_product_count.sku_id} {foreach $stock_product_count.stocks as $_stock} {if $_stock.stock_id == $pickup.params.stock_id} {$_stock_id = $_stock.stock_id} {$_count = ifset($sku.stock[$_stock_id])} {/if} {/foreach} {/if} {/foreach}
  • {$pickup.name|escape}

    {if $_stock_id && ($_count === null || $_count > 0)}
    [`Available for pickup today`]
    {/if}
    {_sku_remainder stock_id=$_stock_id count=$_count}
    {if !empty($pickup.params.address)}
    {$pickup.params.address|escape}
    {/if}
  • {/function} {function name="_product" product=[]} {$sku = $product.skus[$selected_sku_id]} {$url_crop = "`$wa_app_static_url`img/frontend/dummy48.png"} {$image_description = ''} {$image_id = ifempty($sku.image_id, $product.image_id)} {$images = $product->getImages()} {if isset($images[$image_id])} {$url_crop = $images[$image_id].url_crop} {$image_description = $images[$image_id].description} {/if} {if !empty($sku)}
    {$image_description|escape}
    {$product.name|escape}
    {$sku.name|escape}
    {/if} {/function}