--- title: Show pickup availability on product pages description: Learn how to show pickup availability on product pages. source_url: html: https://shopify.dev/docs/storefronts/themes/delivery-fulfillment/pickup-availability md: https://shopify.dev/docs/storefronts/themes/delivery-fulfillment/pickup-availability.md --- ExpandOn this page * [Requirements](https://shopify.dev/docs/storefronts/themes/delivery-fulfillment/pickup-availability#requirements) * [Resources](https://shopify.dev/docs/storefronts/themes/delivery-fulfillment/pickup-availability#resources) * [Implementing pickup availability](https://shopify.dev/docs/storefronts/themes/delivery-fulfillment/pickup-availability#implementing-pickup-availability) * [The pickup availability section](https://shopify.dev/docs/storefronts/themes/delivery-fulfillment/pickup-availability#the-pickup-availability-section) * [The pickup availability container](https://shopify.dev/docs/storefronts/themes/delivery-fulfillment/pickup-availability#the-pickup-availability-container) * [The JavaScript function](https://shopify.dev/docs/storefronts/themes/delivery-fulfillment/pickup-availability#the-javascript-function) # Show pickup availability on product pages Merchants can make their products available through [local pickup](https://help.shopify.com/manual/shipping/setting-up-and-managing-your-shipping/local-methods/local-pickup), and you can display whether a specific product variant is available for local pickup on the product page. This allows customers to view this information without having to add the product to cart and proceed to checkout to view the shipping details. In this tutorial, you'll learn how to show variant pickup availability on product pages. *** ## Requirements * [Variant selection](https://shopify.dev/docs/storefronts/themes/product-merchandising/variants#variant-selectors) functionality. The pickup availability [JavaScript function](#the-javascript-function) needs to be run when variants are selected. *** ## Resources To implement pickup availability, you'll use the following: * The [`variant` object](https://shopify.dev/docs/api/liquid/objects/variant) * The [`store_availability` object](https://shopify.dev/docs/api/liquid/objects/store_availability) * The [`location` object](https://shopify.dev/docs/api/liquid/objects/location) *** ## Implementing pickup availability To support pickup availability functionality in your theme, you need to implements the following components: * [The pickup availability section](#the-pickup-availability-section): Renders the display content, which contains information about each location that the current variant is stocked at. * [The pickup availability container](#the-pickup-availability-container): An empty container on the product page that hosts the section content. * [A JavaScript function](#the-javascript-function): Renders the section content inside the container, and makes any updates on variant selection. Caution The examples below are only meant to illustrate basic considerations for implementing this feature. The full implementation will vary depending on your theme and what you want the display to look like. You can refer to the following files in Dawn for an example of a complete solution: * [Section](https://github.com/Shopify/dawn/blob/6490d2f90a8eea98d696dcbe28f092dcc9740efd/sections/pickup-availability.liquid) * [Container](https://github.com/Shopify/dawn/blob/6490d2f90a8eea98d696dcbe28f092dcc9740efd/sections/main-product.liquid#L313) * [Buy Button](https://github.com/Shopify/dawn/blob/6490d2f90a8eea98d696dcbe28f092dcc9740efd/snippets/buy-buttons.liquid#L102) * [JS](https://github.com/Shopify/dawn/blob/6490d2f90a8eea98d696dcbe28f092dcc9740efd/assets/pickup-availability.js) * [CSS](https://github.com/Shopify/dawn/blob/6490d2f90a8eea98d696dcbe28f092dcc9740efd/assets/component-pickup-availability.css) *** ## The pickup availability section The pickup availability section hosts the actual content to be displayed, which has two main components: * [Availability summary](#availability-summary) * [Availability modal](#availability-modal) This section is rendered inside the [pickup availability container](#the-pickup-availability-container) by the [JavaScript function](#the-javascript-function). ### Availability summary The availability summary loops through the locations returned from the `store_availabilites` attribute of the current variant to find any locations that have `pick_up_enabled` set to `true`. If there are any, then the availability of the current variant at the first location is displayed, along with a button to open the [availability modal](#availability-modal). #### Example  ### Availability modal The availability modal displays the product and variant titles, and each location that the current variant is stocked at. For each location, the current availability and address are shown. #### Example  ### Example The following is an example of a pickup availability section with an availability summary and modal. Note You should only output the availability summary and modal if the current variant has at least one location with pickup enabled. ## sections/pickup-availability.liquid ```liquid
{{ 'pickup_availability.general.pick_up_available_at_html' | t: location_name: closest_location.location.name }}
{{ closest_location.pick_up_time }}
{%- else -%}{{ 'pickup_availability.general.pick_up_unavailable_at_html' | t: location_name: closest_location.location.name }}
{%- if pick_up_availabilities.size > 1 -%} {%- endif -%} {%- endif -%}{{ product_variant.title }}
{{ address.phone }}