price 0 ?
See original GitHub issueDescribe the bug productVariant price 0
To Reproduce
I create my own RtsCart plugin which allow user add items to cart but not order. Then pick a few item to real order. Everything works good, and the productVariantId
related productVariant
most props is OK, only price 0
, and priceWithTax 0
//gql
mutation addRtsCart($input: AddRtsCartInput!){
addRtsCart(input: $input){
id productVariantId
customer {
rtsCartList (options: {take: 100}) {
totalItems
items {
id productVariantId
productVariant {
id name price priceWithTax sku
assets {
source preview
}
}
}
}
}
}
}
//plugin code
@ResolveField()
async productVariant(@Parent() record: RtsCart, @Ctx() ctx: RequestContext) {
let productVariant: ProductVariant | null = record.productVariant;
if (!productVariant) {
const recordWithProductVariant = await this.connection
.getRepository(ctx, RtsCart)
.findOne(record.id, {
relations: ['productVariant'],
});
if (recordWithProductVariant) {
productVariant = recordWithProductVariant.productVariant;
}
}
if (productVariant) {
return translateDeep(productVariant, ctx.languageCode);
}
}
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Zero price effect - Market - Subwiki
The zero price effect is a phenomenon whereby the demand for a good, service, or commodity is significantly greater at a price of...
Read more >Zero price - Wikipedia
Zero price may refer to: Free of charge, a price of zero; The offering price of a Zero-coupon bond or its financial equivalent....
Read more >Zero Price | ZER Price, USD converter, Charts - Crypto.com
Zero's price today is US$0.01095, with a 24-hour trading volume of $19. ZER is +10.22% in the last 24 hours. It is currently...
Read more >ZERO Price Index, Live Chart and USD Converter - Binance
The live price of Zero is $ 0.0338849 per (ZERO / USD) today with a current market cap of $ 0 USD. 24-hour...
Read more >Zero price today, ZER to USD live, marketcap and chart
The live Zero price today is $0.009976 USD with a 24-hour trading volume of $16.80 USD. We update our ZER to USD price...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@michaelbromley after add
{ relations: ['taxCategory'] }
, it can get price now.OK, it works now.