diff --git a/resources/views/shop/index.blade.php b/resources/views/shop/index.blade.php index 72f08a6b..66e0a285 100644 --- a/resources/views/shop/index.blade.php +++ b/resources/views/shop/index.blade.php @@ -89,7 +89,12 @@ alt="">

{{ substr($product->title,0,35) }}..

-

Rs.{{ number_format($product->price) }}

+ @if($product->onSale) + Rs. {{ $product->price }} +

Rs.{{ number_format($product->sale_price) }}

+ @else +

Rs.{{ number_format($product->price) }}

+ @endif
diff --git a/resources/views/shop/show.blade.php b/resources/views/shop/show.blade.php index 127d76f0..17f280ee 100644 --- a/resources/views/shop/show.blade.php +++ b/resources/views/shop/show.blade.php @@ -58,7 +58,15 @@

Price:

-

Rs.{{ number_format($product->price) }}

+ @if($product->onSale) +

Rs.{{number_format($product->sale_price)}}

+

+ Rs.{{$product->price}} + {{ floor((($product->price - $product->sale_price)/$product->price)*100) }}% off +

+ @else +

Rs.{{number_format($product->price)}}

+ @endif