Afficher "Livraison GRATUITE" si valeur= 0 en attribut Textfield
-
28-09-2020 - |
Question
S'il vous plaît visitez ce Lien
Recherchez
ici, je affiche la valeur d'attribut [10], si valeur= 0=> lien
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 ) "
Code d'attribut: "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 ";
?>
La solution
<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 } ?>
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange