Reputation: 37
I am using a attribute to show a attribute value in product page code is:
getProductShipping()):?>
Shipping Charges : Rs.getProductShipping(); ?>
it is showing Shipping Charges : Rs. 20 what is the value of attribute. if some products has no value in this product then nothing is showing there but i want to show Free shipping if no value is there. i want the code please help me.
attributes
Upvotes: 0
Views: 110
Reputation: 3856
It can work like this way:
<?php if($product->getProductShipping()) { ?>
Shipping Charges : Rs. <?php echo $product->getProductShipping(); ?>
<?php } else { ?>
Free Shipping
<?php } ?>
Upvotes: 1