Versions Compared

Key

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

...

  1. Display the cart item count
  2. Display the number of units (sum of the item quantities)
  3. Display the cart subtotal
  4. Display a greet to the logged in customer
Code Block
theme
themeDJango
languagehtml/xml
DJangotitleCart Item Count

$cart.getItemCount()
Code Block
themeDJango
languagehtml/xml
titleDisplay the number of units
#set ($units = 0)
#foreach ($cartItem in $cart.getItems())
  #set ($units = $units + $cartItem.getQuantity())
#end
You have $units unit(s) in your cart.
Code Block
themeDJango
languagehtml/xml
titleCart Subtotal

$cart.getSubTotal()
Code Block
theme
themeDJango
languagehtml/xml
DJangotitleGreet Logged in Customer

#if ($cart.getCustomerProfile())
  Welcome back $cart.getCustomerProfile().getFirstName()
#end