Unable to get Product type - unity buy SDK

AbhayaMeta
Shopify Partner
1 0 0

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.

image.png

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

AbhayaMeta_0-1671956896459.png

 

 

Replies 0 (0)