refactor: update product prices section

pagebuilder
abhisheks 2023-11-03 19:03:11 +05:30
parent 8cff94ff99
commit b80661de56
1 changed files with 4 additions and 4 deletions

View File

@ -23,12 +23,12 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{if $product.show_price}
<div class="product-prices">
<div class="product-prices flex flex-col mt-2">
{block name='product_discount'}
{if $product.has_discount}
<div class="product-discount">
{hook h='displayProductPriceBlock' product=$product type="old_price"}
<span class="regular-price ">{$product.regular_price}</span>
<span class="regular-price line-through text-red-700/50 leading-none">{$product.regular_price}</span>
</div>
{/if}
{/block}
@ -43,14 +43,14 @@
<link itemprop="availability" href="{$product.seo_availability}"/>
<meta itemprop="priceCurrency" content="{$currency.iso_code}">
<div class="current-price">
<div class="current-price flex gap-2 items-baseline">
<span itemprop="price" class="text-2xl font-normal" content="{$product.price_amount}">{$product.price}</span>
{if $product.has_discount}
{if $product.discount_type === 'percentage'}
<span class="discount discount-percentage">{l s='Save %percentage%' d='Shop.Theme.Catalog' sprintf=['%percentage%' => $product.discount_percentage_absolute]}</span>
{else}
<span class="discount discount-amount">
<span class="discount discount-amount text-sm">
{l s='Save %amount%' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.discount_to_display]}
</span>
{/if}