Closed daniel-farina closed 4 years ago
What does $item->product->getThumbnailUrl()
exactly return? NULL
or some broken URL?
It returns the default:
<img src="/images/product.jpg" class="product-image">
i will try with a fresh installation soon to discard any changes I made first and test it on a fresh installation. I'll update this once I figure it out.
@fulopattila122 If you do the following on the CartController on the show method, does it it return false to you?
public function show()
{
$item = Cart::getItems()->first();
dd($item->product->hasImage());
return view('cart.show');
}
Mine returns false, even though the item does have images . If I run this on the ProductController I get true.
public function show(Product $product)
{
dd($product->hasImage());
return view('product.show', ['product' => $product]);
}
We can close this ticket. The problem was the incorrect model information in the database after implementing a custom Product model.
Thank you!
Hello everyone,
For some reason the following is not returning a thumbnail:
resources/views/cart/show.blade.php
it works fine on the product and category page with:
I also tried:
and I can confirm it returns no image.
Is this a known issue?, I'll keep on trying to figure it out and post an update if I find anything. Any help is appreciated!
Thanks