Discussing Shopify Functions development, deployment, and usage in Shopify apps.
Hi, we have a Discount Function app and it works on every store except one. The app itself works - users are able to create edit discounts. But on the storefront, we get an error "Enter a valid discount code or gift card" even though it's valid and active.
Things to note:
Can someone help with this please?
Hi Topshop,
From your description I'm thinking that this issue could be due to how other apps are implemented that also use the discount function API. ~50 code discounts is relatively low, so there wouldn't be an issue limit around the number of code discounts. If there are no logs appearing that also could suggest another app is preventing yours from communicating with the store to create a discount.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@Liam , thanks for getting back. Even though there are only ~50 code discounts, some of them have 50,000 bulk codes each with a total of around 300,000 active codes. Would that be causing this issue?
Please note that the merchant was able to successfully install the app and create a discount code using our app. The issue is only that the backend function is not getting triggered. As we (app developers) don't control that part of the discount would another app still be able interfere with that process?
It just looks like the function is not getting triggered which should be unrelated to the app being installed because the functions run on Shopify's backend, correct? Are functions installed in the backend of each store and somehow this app's function was not installed even though the app itself was installed successfullly?
Also, do you think I ask the merchant to uninstall the app and re-install it to see if it successfully installs the function for their store?