We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e628903 commit c62ddd8Copy full SHA for c62ddd8
models/Product.ts
@@ -122,11 +122,12 @@ export class Product extends Model {
122
}
123
this.sku = data?.sku || null
124
this.variantAttributes = data?.variant_attributes || {}
125
- const priceLists = Object.keys(data?.prices || {})
+ const prices = data?.prices || data?.price || {}
126
+ const priceLists = Object.keys(prices)
127
if(priceLists?.length > 0) {
128
this.pricesList = {}
129
for(let priceList of priceLists) {
- this.pricesList[priceList] = new ProductPrice(data?.prices?.[priceList])
130
+ this.pricesList[priceList] = new ProductPrice(prices?.[priceList])
131
132
133
if(this.pricesList?.['default']) {
0 commit comments