속성 TextField에서 Value= 0 인 경우 "무료 배달"표시
-
28-09-2020 - |
문제
이 링크
rs 10 Ctrl + F
를 사용하여 검색여기에서는 속성 값을 표시합니다 [10], if value=>=> 링크
Now value is 10 ,if value = 0, I want to display "Selling Price (Free Delivery )" :
Means instead of "Selling Price + Rs 0 Delivery", I want to display "Selling Price ( Free delivery ) "
.
속성 코드 : "mp_local_shipping_charge"
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"
<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
<p class="sell_price"><?php echo "Selling Price"; ?>
<?php
echo "+ Rs " . $_product->getData("mp_local_shipping_charge") . " Delivery ";
?>
. 해결책
<span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"
<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
<?php
$deliveryPrice = $_product->getData("mp_local_shipping_charge");
if($deliveryPrice == 0){
<p class="sell_price"><?php echo "Selling Price (Free Delivery )"; ?>
}elseif(empty($deliveryPrice)){
<p class="sell_price"><?php echo "Selling Price"; ?>
<?php echo "+ Rs 50 Delivery "; ?>
<?php }else {?>
<p class="sell_price"><?php echo "Selling Price"; ?>
<?php
echo "+ Rs " . $_product->getData("mp_local_shipping_charge") . " Delivery ";
?>
<?php } ?>
. 제휴하지 않습니다 magento.stackexchange