Added product id attribute to model
This commit is contained in:
parent
dd90e63ade
commit
7fc68c56ae
|
|
@ -285,4 +285,12 @@ class Product extends Model implements ProductContract
|
|||
return new \Webkul\Product\Database\Eloquent\Builder($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the product id attribute.
|
||||
*/
|
||||
public function getProductIdAttribute()
|
||||
{
|
||||
return $image = $this->id;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
@if (Route::currentRouteName() == "shop.products.index")
|
||||
@include ('shop::products.add-to', ['product' => $product])
|
||||
@else
|
||||
|
||||
@if ($product->type == "configurable")
|
||||
<div class="cart-wish-wrap">
|
||||
<a href="{{ route('cart.add.configurable', $product->url_key) }}" class="btn btn-lg btn-primary addtocart">
|
||||
|
|
@ -21,5 +19,4 @@
|
|||
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
Loading…
Reference in New Issue