fixed product image
This commit is contained in:
parent
b8c21f66e5
commit
6ce395f544
|
|
@ -22,10 +22,10 @@ class ImageService
|
|||
const PLACEHOLDER_IMAGE = 'catalog/placeholder.png';
|
||||
|
||||
/**
|
||||
* @param string $image
|
||||
* @param $image
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct(string $image)
|
||||
public function __construct($image)
|
||||
{
|
||||
$this->image = $image ?: self::PLACEHOLDER_IMAGE;
|
||||
$imagePath = public_path($this->image);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<div class="product-wrap">
|
||||
<div class="image"><a href="{{ $product->url }}"><img src="{{ $product->image }}" class="img-fluid"></a></div>
|
||||
<div class="image"><a href="{{ $product->url }}"><img src="{{ image_resize($product->image, 300, 300) }}" class="img-fluid"></a></div>
|
||||
<div class="product-name">{{ $product->description->name }}</div>
|
||||
<div class="product-price">
|
||||
<span class="price-new">{{ $product->master_sku->price }}</span>
|
||||
<span class="price-lod">{{ $product->master_sku->origin_price }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue