Versions Compared

Key

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

...

This short tutorial shows up how to display a message to the customer letting them know how much more they have to spend in order to obtain free shipping.

In the header of the view cart or single page checkout screen branding you can use the following code snippet. This code uses the catalog Velocity code to perform some simple math calculations and display the appropriate message to the customer.

Code Block
themeDJango
#set ($freeThreshold = $formatHelper.parseBigDecimal("100"))
#if ($cart.getSubTotalAsBigDecimal() < $freeThreshold)
  #set ($neededUntilFree = $freeThreshold.subtract($cart.getSubTotalAsBigDecimal()))
  You will receive free shipping if you spend $${neededUntilFree} more.<br/>
#end

...

Panel
Wiki Markup
[Main Menu|/merchant/mainMenu.do@merchant] {rarr}[Configuration|/configuration/configurationMenuLoad.do@merchant] {rarr}[Screen Branding Themes|/configuration/branding/themeListLoad.do@merchant] {rarr} [Edit |^free03.png]
{rarr}[Screens |^free04.png]
{rarr} [View Cart \[edit\]|^free05.png]

...