...
This tutorial shows how to use Velocity code on your catalog to conditionally show the item count and total of the customer cart . This velocity code example is intended to be used within the catalog templates section of UltraCart.
Panel |
---|
Main Menu → Catalog → Choose the host → Manage Catalog Templates |
...
Code Block | ||||
---|---|---|---|---|
| ||||
<a href="$checkoutUrlHttps">My Cart ($cart.getItemCount() Items)</span></a> |
Here we use tags for both tag " $cart.getItemCount()" and " $cart.getSubTotal()" to pull both to pull the item count and the carts total and display that information to the customer.
If the customer does not have a an item in the cart (or checkout) started then the following is used:
...