Shopify外部数据库连接
我正在寻找最佳的解决方案,以检索和发布外部数据库的数据。数据库的存储方式和位置仍在讨论中。无论是选择Shopify最快,最容易实施的内容。理想情况下,这将是JavaScript实现。必须传递的数据将是字符串和非浮点值。
I'm looking for the best solution to retrieve and post data from an external database. What type and where the database is stored is still up for discussion. Whatever is the fastest and easiest to implement with shopify will be chosen. Ideally it would be a javascript implemention. The data that has to be passed would be a string and non float values.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的问题太广泛了,我只是根据我的经验尝试给您一些建议。
我可以想到两种不同的方法,具体取决于不同的因素(您需要多少条目,结构化的方式等)。
您不需要Shopify应用程序。只需创建和端点(lambda+api网关带有dynamoDB),例如
获取yourapidomain.com/mydata?myparam=2
and发布yourapidomain.com/mydata
你完成了。这种方法非常通用,它可以在任何情况下起作用。如果您没有太多条目,则
,并且结构非常简单,则可以将Metafield在Shopify上用作数据库。例如,如果您的数据适用于每种产品,则可以将其保存在产品的荟萃场(或客户等)中。
您仍然需要一个端点才能从页面上发布数据,但是您将能够从液体文件(服务器端)中检索数据。
不知道您的特殊用例很难详细介绍。
Your question is a bit too broad, I'll just try give you some advice, based on my experience.
I can think of two different approaches, depending on differenct factors (how many entries you need, how they are structured, etc).
You won't need a Shopify app for this. Just create and endpoint (lambda+API Gateway with DynamoDB) like
GET yourapidomain.com/mydata?myParam=2
andPOST yourapidomain.com/mydata
be careful with CORS, and you're done. This approach is quite generic, it can work in any situation.If you don't have too many entries, and the structure is quite simple, you can use the metafields on Shopify as database.
If, for example, your data is for each product you can save it in the metafields of the product (or of the customer, etc).
You will still need an endpoint to post the data from your page but you will be able to retrieve the data from the liquid file (server side).
Without knowing your particular use case is difficult to go more into details.