Shopify外部数据库连接

发布于 2025-02-12 05:14:42 字数 116 浏览 0 评论 0原文

我正在寻找最佳的解决方案,以检索和发布外部数据库的数据。数据库的存储方式和位置仍在讨论中。无论是选择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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

为你拒绝所有暧昧 2025-02-19 05:14:43

您的问题太广泛了,我只是根据我的经验尝试给您一些建议。

我可以想到两种不同的方法,具体取决于不同的因素(您需要多少条目,结构化的方式等)。

  1. 无服务器,

您不需要Shopify应用程序。只需创建和端点(lambda+api网关带有dynamoDB),例如获取yourapidomain.com/mydata?myparam=2 and 发布yourapidomain.com/mydata你完成了。这种方法非常通用,它可以在任何情况下起作用。

  1. 使用Metafields

如果您没有太多条目,则

,并且结构非常简单,则可以将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).

  1. Serverless

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 and POST yourapidomain.com/mydata be careful with CORS, and you're done. This approach is quite generic, it can work in any situation.

  1. Using metafields

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文