What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Unable to get Product type - unity buy SDK

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)