Created
November 15, 2015 21:12
-
-
Save d1i1m1o1n/53ae97e463fa54910cbf to your computer and use it in GitHub Desktop.
Bitrix print price with discount
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?if($arResult["PRICE"]["DISCOUNT_PRICE"] < $arResult["PRICE"]["RESULT_PRICE"]["BASE_PRICE"]):?> | |
<p class="tovar__price">Цена без скидки: <del><?=str_replace('.', ',', $arResult["PRICE"]["RESULT_PRICE"]["BASE_PRICE"])?></del> руб.</p> | |
<p class="tovar__price">Цена со скидкой: <span><?=str_replace('.', ',', $arResult["PRICE"]["DISCOUNT_PRICE"])?></span> руб.</p> | |
<p class="tovar__price--discount">Скидка: <span><?=str_replace('.', ',', $arResult["PRICE"]["RESULT_PRICE"]["DISCOUNT"])?> руб. (<?=$arResult["PRICE"]["RESULT_PRICE"]["PERCENT"]?>%)</span></p> | |
<?else:?> | |
<p class="tovar__price">Цена: <span><?=str_replace('.', ',', $arResult["PRICE"]["DISCOUNT_PRICE"])?></span> руб.</p> | |
<?endif;?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment