EfCoreInAction
EfCoreInAction copied to clipboard
Book image missing in confirmed order in chapter 4
Just a minor thing overall, but anyway:
The book icon is showing only a broken image on the confirmed order page after checkout. That's because OneOrderPartial.cshtml in line 15 is setting the source to "#" instead of "@lineItem.ImageUrl". In addition there are books without image URLs, so a check if it's not null is necessary I guess. The same problem in ListBasketPartial.cshtml where the image source is set to "#" when it's null.
The ImageUrl needs to be set in DisplayOrderService.cs in line 60 or so as well with "ImageUrl = lineItem.ChosenBook.ImageUrl," to be loaded in the OrderListDTO
Hi @gkfischer,
Good catch! I got it right in the ListBasketPartial.cshtml but missed those.
I'm busy at the moment but I'll keep this issue open to remind me.