Hey brains trust!
I’m experiencing some issues with our Cart Validation function.
The Function has been set up using the Shopify App CLI, and installed on a Plus Partner Sandbox store.
To give some background on what we are trying to do:
Our store has a range of single, one off products, which can be reserved by customers. On a reserved product, the customer’s ID is added to a product metafield.
The Cart validation function check whether the product’s metafield is the same as the customer who is checking out. If not, a message should be displayed.
The issue:
After testing, I am unable to get the message to display when I try and check out logged in as the ‘wrong’ customer. It’s most likely an issue with the logic in the function, but when trying to test, I am not able to get any function logs, so I am not sure if the function is even running.
When running shopify app dev
I can see the console output saying the log streaing is not possible due to the Shop being invalid
Through the app’s admin screen within the store, I have tried to share the logs using the below menu, but no logs have been sent
I also have tried using the shopify app logs --source extensions.<function_handle>
command, but receive the following error
Has anyone else experienced an issue like this?
Are there any configurations that need to be made, either in the extensions.toml file, or somewhere else?
Many thanks.