Merge pull request #6462 from bagisto/revert-6439-add-discount-precent

Revert "Enhancement #6367 done"
This commit is contained in:
Glenn Hermans 2022-06-02 07:41:29 +02:00 committed by GitHub
commit 8ef00596f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 13 deletions

View File

@ -1,18 +1,7 @@
{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
@php
if($product->getTypeInstance()->haveSpecialPrice()){
$specialPrice = $product->getTypeInstance()->getSpecialPrice();
$price = $product->price;
$Discount_Precent = "(".round(($specialPrice*100)/$price)."% off)";
}else{
$Discount_Precent ='';
}
@endphp
<div class="product-price">
{!! $product->getTypeInstance()->getPriceHtml() !!} {{ $Discount_Precent }}
{!! $product->getTypeInstance()->getPriceHtml() !!}
</div>
{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}
{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}