Shopify Product Stock Levels

Joe Tripodi

Software Engineer
Web Developer
Liquid
Shopify

Role

Leader Developer

Client

Project goal

Shopify owner required a message to be displayed to a customer when they selected a product that was currently out of stock. They wanted to keep selling the item, but they wanted to display a custom message to the customer.- Client required custom message for out of stock items- With their previous Dawn Theme, the stock count for different selected variants was not updating so they could not display this message for selected variants- Able to keep selling out of stock variants

White L Grip Socks variant is out of stock but there is not a message.
White L Grip Socks variant is out of stock but there is not a message.

Solution

Add a custom liquid component for the main product template that allowed the client to display their own message.Dynamically fetch the variant stock levels to display or hide the message when a different variant is selected.Bulk update to product variants to allow them to continue to be sold when they are out of stock.

This solution can also be used to displayed the current stock levels for a component.

The left column is the custom component. Customer is still able to add Out of Stock items to the cart.
The left column is the custom component. Customer is still able to add Out of Stock items to the cart.

Partner With Joe
View Services

More Projects by Joe