Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following if/else statement performs the comparison:

Code Block
themeDJango

#if ($item.getMSRPAsBigDecimal() && $item.getMSRPAsBigDecimal().compareTo(item$item.getCostAsBigDecimal()) < 0) 
  Price Break...
#else
  No Price Break...
#end

Now let's put this together into a more complete example where we show the customer the math:

Code Block
themeDJango

#if ($item.getMSRPAsBigDecimal() && $item.getMSRPAsBigDecimal().compareTo(item$item.getCostAsBigDecimal()) < 0) 
  <del>$item.getMSRP()</del> <br/>
  - $item.getMSRPPriceBreak() <br/>
  $item.getCost()
#else
  $item.getCost()
#end