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
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.