Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I am using Unity buy SDK,
I want product Category and Type, when I am fetcing product list I am unable to get that information.
In below image it can be seen that I have added both product category and product type.
I am using this peice of code to fetch the product details.
ShopifyBuy.Client().products((products, error, after) => {
if (error != null) {
Debug.Log("Encountered an SDK Error");
return;
// it's unlikely but if an invalid GraphQL query was sent a list of errors will be returned
}
// products is a List<Product>
Debug.Log("Your shop has " + products.Count + "products");
Debug.Log("============================");
// MSFileHandler.SaveJson("json.json",products);
foreach(Product product in products) {
Debug.Log("Product Title: " + product.title());
Debug.Log("Product Description: " + product.description());
Debug.Log("------type : "+ product.productType());
}
});
I am getting following response