My Products
Help
kashyap
PARTNER

How to get productpriceGroup1 list

by kashyap

We need to know productpricegroup1 name associated with product while fetching product. We could not found specific join of table regarding this.


kashyap_0-1728968608300.png

 

1 REPLY 1
Accepted solution
omelhus
PARTNER

by omelhus

You need to fetch the labels from the text table.

 

If you have a look at https://model.vbnxt.rocks/product you'll see that ProductPriceGroup1 has a text type of 13.

 

query ProductWithPriceGroups($companyNo: Int!, $productPriceGroups: [Long] = [-1]) {
  useCompany(no: $companyNo) {
    product {
      items {
        productNo
        productPriceGroup1 @export(as: "productPriceGroups")
      }
    }
    text(filter: {textType: {_eq: 13}, textNo: {_in: $productPriceGroups}}) {
      items {
        languageNo
        textNo
        text
      }
    }
  }
}