Activate / Inactivate Add to Cart Button Based on Location Viewing

Topic summary

Phased e-commerce launch with only 2 of 44 stores offering pickup/local delivery. MetaStock shows inventory by store, but the product page’s Add to Cart doesn’t respect the selected store, allowing adds from locations that don’t support pickup/local delivery.

Suggestions focus on gating Add to Cart or blocking checkout based on customer location and market. None confirms a direct MetaStock link; approaches rely on apps and Shopify order routing.

  • JsRates: detects customer location (country, city, state, ZIP, lat/long) and can disable Add to Cart; also supports custom local-delivery distance rules.
  • Checkout Guardian: blocks checkout when pickup/local delivery is chosen for unsupported addresses; shows a custom message.
  • Multi-Location Inventory Info: swaps Add to Cart with Unavailable/Sold Out when stock isn’t valid for the shopper’s market/location.
  • Shopify settings: in Settings > Shipping and delivery > Order routing, keep “Stay within the destination market” as the only rule to confine fulfillment.

No resolution reported yet. Open items: confirm whether any app can bind MetaStock’s viewed store to Add to Cart state, or if a custom integration is required.

Summarized with AI on January 4. AI used: gpt-5.

Hello! The company I work for is planning to launch e-Commerce in phases with a limited number of stores offering pick up at store / local delivery in the first roll-out. Currently on our website, app MetaStock is used to display a total of 44 locations/stores and there associated product inventory levels. in the first phase of roll-out the plan is to only have 2 out of the 44 locations offer pick up at store / local delivery. While testing, it does not appear there is a link between the store and inventory the customer is viewing (using MetaStock) and the “Add to Cart” button/feature that is displayed on the product page. Therefore a customer could be viewing the inventory at store A that does not offer pick up / local delivery but the “add to cart” button is still available to add the product to the cart.

Is anyone aware of any apps that can be applied or have suggestions for how to address this particular situation?

I believe there should be a solution to this since this a common problem.

In case you a need a custom solution for a shipping rate for your local delivery - ensuring the customers are within a certain driving distance from your store, we might be able to help you with our app, JsRates. Our app also has a feature to detect the location of the customer (country, city, state, postal code (zip code), longitude and latitude) that you can use to disable the add to cart button.

Hi @SSC-AshleyB You can try using the Checkout Guardian App, wherein you can restrict the user from checkout if they choose Pickup/local delivery for a particluar shipping address / Country code & province. You can display them a customised message saying local pick up not avaliable for your shipping address.

Let me know if you find this app suitable as per your requirement.

Hi @SSC-AshleyB ,

I faced the same issue before for one of my clients. They have dedicated stock for each market, and each market has its own warehouse. However, the order routing is deficit and someone from Country A can add to the cart and checkout products available only in the inventory of Country B, which is wrong and I believe you’re facing the same issue.

To make sure both the Order Routing is working fine in the backend, after the order is placed, and also to replace the Add to Cart with Unavailable/ Sold Out button I used an app called Multi-Location Inventory Info. Super useful and easy to use. Additionally, make sure to check the Order Routing settings (Settings → Shipping and delivery → Order routing) and keep Stay within the destination market as the only available rule.

This worked fine for me. Let me know if works fine for you.