I am currently trying to build a Wordpress site to sell products online, I am using Shopify to handle the ecommerce part. The problem relies on this piece of code.
import Client from 'shopify-buy';
const client = Client.buildClient({
domain: 'your-shop-name.myshopify.com',
storefrontAccessToken: 'your-storefront-access-token'
});
Run Code Online (Sandbox Code Playgroud)
I am using the minified UMD build version posted on the documentation, my actual code is this :
const client = ShopifyBuy.buildClient({
domain: 'domain.myshopify.com',
storefrontAccessToken: 'token',
apiKey: 'key',
appId: '6'
});
// Fetch all products in …
Run Code Online (Sandbox Code Playgroud) 我从Google Firebase服务中看过视频并阅读了Cloud firestore的文档,但我无法想象实时数据库.
我想到了这个Web应用程序,我希望从不同类别的产品中存储我的提供程序.我希望通过我的所有产品执行搜索查询,以查找我对此类产品的提供商,并最终访问该提供商信息.
我打算为此目的使用这个结构:
Providers ( Collection )
Provider 1 ( Document )
Name
City
Categories
Provider 2
Name
City
Products ( Collection )
Product 1 ( Document )
Name
Description
Category
Provider ID
Product 2
Name
Description
Category
Provider ID
Run Code Online (Sandbox Code Playgroud)
所以我的问题是,一旦我得到我想要的产品,这种方法是否是访问提供商信息的正确方法?
我知道这在实时数据库中是可行的,使用我可以在提供者部分中搜索该提供者的提供者ID,但是使用Firestore我不确定它是否可能或者这是否正确.
java firebase firebase-realtime-database google-cloud-firestore