❌ Problem
Shopify currently doesn’t automatically show if a product is available in a customer’s market. For example, if your store has two warehouses Domestic and International, and you are sold out of a product internationally but still have stock domestically, Shopify will show the product as in stock.
In some cases, if a product never been stocked internationally, customers will discover they can’t buy a product once they hit the cart and see there are no shipping options.
Mayple can exclude domestic-only products from displaying on your store, however, this may not work for your store’s theme or merchandising.
✅ Solution
Mayple keeps an availability metafield updated on your product variants that your developer can use to display a sold out message and hide your add to cart button on out-of-stock products.
If you are using a headless store, simply query for the following metafield on each of your variants and use them however you want. The metafield will return a boolean value representing the variant’s availability in Mayple’s location.
True means the product has a quantity of 1+, false means the quantity is 0.
namespace: mayple_inventory
key: is_available
value: boolean
If your store is on Shopify, use the following two snippets to show or hide products.
On the product page itself, you can use the snippet below to show or hide a sold out message.
Your store may be set up differently, and these variables are not named the same across all stores, but a developer can help you.
Note: If you store’s theme uses page transitions and does not hard reload between page transitions, your developer may need to handle that case.