축소 금액과 장바구니 페이지의 비율을 모두 표시합니다.
-
12-12-2019 - |
문제
http://www.customy.com/blog./ show-product-percent-in-magento /
감소 된 양은 상기 링크에서 백분율로 표시됩니다.
나는 할인의 백분율을 "얼마나 많은 가격을 저장했는지
다음과 같이 다음과 같이 :
저장하는 것 : 5,810.00 (18 %)
이 작업을 수행 해야하는 변경 사항입니다.
해결책을 찾도록 도와주세요.
미리 감사드립니다
해결책
goto.
app/design/frontend/base/default/template/catalog/product/
및 price.phtml
to app/design/frontend/Your_theme/default/template/catalog/product/
복사 price.phtml
이 코드에서 찾기
<?php endif; /* if ($_finalPrice == $_price): */ ?>
.
이 코드 위에 다음 코드 추가
<?php if($_finalPrice < $_price): ?>
<?php
$_savePercent = 100 - round(($_finalPrice / $_price) * 100);
$_saveAmount = number_format(($_price - $_finalPrice), 2);
?>
<p class="yousave">
<span class="price-label label">You Save: </span>
<span class="price">
<strong class="save-amount">$<?php echo $_saveAmount; ?></strong> (<?php echo $_savePercent; ?>%)
</span>
</p>
<?php endif; ?>
. 제휴하지 않습니다 magento.stackexchange