My client delivers the products themselves. They want to allow customers to pick a delivery date and time for their order, and if someone picks a certain time, nobody else can pick that time. I figured the best way to accomplish this would be to store the selected date as a cart note so that it would automatically be selected and applied to their order. I’m mostly finished, but the only problem arises when I try to see which delivery times have already been chosen.
Is there a way to access the Shopify admin API from a liquid file, or from Javascript executed in the browser (in a script tag)? Or is there any other way to get a list of all orders in the store and access their notes?
If not, is there some other way I can implement this?
I’ve looked into metafields, but they seem to only be applicable to individual objects. If I attach it to orders, I still need to figure out how to access them all. If I add it to something else, like a product or a page or something, I need to reliably be able to access that same product or page even if it’s disabled or deleted. I still think the order notes are the best way to do it, but I don’t know how to access them.
Also, if I don’t store the data in a cart note, it becomes significantly harder to update on checkout.
I have no experience with Shopify app development, so if that can be avoided, I would vastly prefer it.