I am new to Shopify app development and have created an app with the following features:
- Admins can define rules to validate the cart based on quantity and amount.
- If a rule is enabled and its criteria are met, the checkout button will be restricted, preventing users from proceeding.
As per Shopify’s documentation, Shopify Functions must be implemented for cart and checkout validation to enforce these rules on the server side. However, I am unable to retrieve rule data from the database, as Shopify Functions do not support API requests.
In Liquid, we can simply call an API to fetch data, but that approach does not work here.
If anyone knows an alternative way to retrieve and use rule data within Shopify Functions, please help.
Thanks in advance!