0

we have to display some text in product view page under tag

if "tier prices" are available , than we want to dispaly that text

"tier prices are available"

or we have to dispalay the text

"tier prices are not available "

we are using this code : http://pastebin.com/Ye5i2TgQ = > app/design/frontend/default/theme_name/template/catalog/product/view/tierprices.phtml for displaying tier prices

please guide me about this

2

Try like this

//$product is your current product 
if($_product->getTierPrice()) {
   echo "available";
}
else{
  echo "not available";
}

Source Link

  • getting this error : : Call to a member function getTierPrice() on a non-object in when i added in view.phtml – Baby in Magento Aug 4 '15 at 12:32
  • 1
    replace $product with $_product – MeenakshiSundaram R Aug 4 '15 at 12:42
  • 1
    @BabyinMagento2 yes you can replace anything(content) in that condition. – MeenakshiSundaram R Aug 4 '15 at 12:47
  • 1
    @BabyinMagento2 the tooltip is displaying. Any other issue – MeenakshiSundaram R Aug 5 '15 at 4:56
  • 1
    @BabyinMagento2 Check this pastebin.com/pv2XVxrY , I have added class="Delivery_hover_details" to div and "?" – MeenakshiSundaram R Aug 5 '15 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.