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

1 Answer 1

2

Try like this

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

Source Link

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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