view_cart.vm

view_cart.vm

 

Form Legend
→ form field
→ submit button

 

Most of the boolean flags below are dictacted by Merchant Properties. These were seldom used flags created to allow merchants non-standard cart behavior during a time when they had limited control of the web design. With the introduction of the StoreFronts, these properties and flags aren't necessary. Now, if a merchant wishes non-standard cart behavior, he or she may edit the template as desired. The standard themes created by UltraCart will still contain references to these flags and properties to ensure they are backward compatible with long time customers who upgrade from a legacy cart to StoreFronts. If you are designing a new theme for personal use, you may wish to streamline and omit support for these conditionals all together. If you are designing a theme for general use, should you support these flags and merchant properties? Probably not worth the headache.

 

$form variables for template view_cart.vm

Name

Type

Formal Syntax

Form Data?

Required on Post?

Comments/Sample Usage

Name

Type

Formal Syntax

Form Data?

Required on Post?

Comments/Sample Usage

affiliateId

string

$form.affiliateId

 

 

 

allowCustomerSelectableCurrency

boolean

$form.allowCustomerSelectableCurrency

 

 

same as showChangeCurrency. Use showChangeCurrency instead.

allowPassingBranding

boolean

$form.allowPassingBranding

 

 

deprecated. and misspelled too.

 

amazonButtonUrl

string

$form.amazonButtonUrl

 

 

 

amazonCheckout

string

$form.amazonCheckout

 

submit button. if non-null, this parameter signals the UltraCart engine that the payment method is Amazon Payments

amazonMerchantId

string

$form.amazonMerchantId

 

 

amazon merchant id

amazonOrderReferenceId

string

$form.amazonOrderReferenceId

 

 

this is populated by the amazon payments and must be present and valid if amazonCheckout is non-null

amazonUseAddressBook

boolean

$form.amazonUseAddressBook

 

 

if true, the amazon address book should load and display

amazonWidgetUrl

string

$form.amazonWidgetUrl

 

 

script url for the "Pay with Amazon" button.

Example:

<script type='text/javascript'

src='${form.amazonWidgetUrl}?sellerId=${formatHelper.urlEncode($form.amazonMerchantId)}'>

</script>

applyAffiliateId

string

$form.applyAffiliateId

 

submit button. if non-null, instructs the engine to apply a supplied affiliate id

applyCoupon

string

$form.applyCoupon

 

submit button. if non-null, instructs the engine to apply a coupon

applyReferralCode

string

$form.applyReferralCode

 

submit button. rarely used. If non-null, instructs the engine to apply a referral code

cartInNewWindow

boolean

$form.cartInNewWindow

 

 

This is a rarely used Merchant Property that, when present and true, should render out the ability to close the window. This flag means that the cart was opened in another window already.

For example:

#if($form.cartInNewWindow)
<script type="text/javascript">
function closeWindow() {
window.close();
return false;
}
</script>
#end

 

and later in the page:

#if($form.cartInNewWindow)
<input type="image"
 name="continueShopping"
 src="/checkout/images/spacer.gif"
 border="0"
 class="ucContinueShoppingButton" id="ucContinueShoppingButtonId"
 onclick="return closeWindow()"/>
#else
 <input type="image"
 name="continueShopping"
 src="/checkout/images/spacer.gif"
 border="0"
 class="ucContinueShoppingButton" id="ucContinueShoppingButtonId"/>
#end

changeCurrencyCode

string

$form.changeCurrencyCode

 

submit button. if non-null, the cart engine examines the currencyCode parameter and changes the cart currency to it.

checkoutInNewWindow

boolean

$form.checkoutInNewWindow

 

 

if present and true, open the checkout in a new window.

This value, rarely used, is a Merchant Property to allow merchants to open the checkout in a new window.

checkoutUrl

string

$form.checkoutUrl

 

 

the url of the checkout, if a custom url is used.

containsPreorderedItems

boolean

$form.containsPreorderedItems

 

 

if true, one or more items are pre-ordered items. this flag is used to display a pre-order message somewhere prominent on the screen.

continueShopping

string

$form.continueShopping

 

input submit button. if this is non-null, the shopping experience is redirected back to the catalog page.

couponCode

string

$form.couponCode

 

 

a coupon to be added to the cart

couponInputFieldStr

string

$form.couponInputFieldStr

 

 

This is static text for creating the "Enter Coupons" label. Over the years, there seems to be a huge amount of customization over the years for coupons. "Enter Coupon" vs. "Enter Coupons" vs. "Enter Coupon Code". So, this field will contain the value from the constant "checkout.viewcart.couponCodeText", "coupon code" 

couponPluralStr

string

$form.couponPluralStr

 

 

Used to show the total number of coupons. For example, "5 Coupons" would need a plural version of the word 'coupon', whatever language that may be.

couponSingularStr

string

$form.couponSingularStr

 

 

Used to show the total number of coupons. For example, "1 Coupon" would need a singular version of the word 'coupon', whatever language that may be.

coupons

Coupon[ ]

$form.coupons

 

 

 

currencyCode

string

$form.currencyCode

 

 

The currency or target currency code.

currencySuffix

string

$form.currencySuffix

 

 

example: USD

currencySymbol

string

$form.currencySymbol

 

 

example: $

email

string

$form.email

 

 

the email address of the customer

errors

Error[ ]

$form.errors

 

 

see Error, see errors.vm

finalizeOrder

string

$form.finalizeOrder

 

 

If true, the checkout is immedatiatly finalized.

formattedSubtotal

string

$form.formattedSubtotal

 

 

formatted values are a string representation of the decimal value, complete with currency symbol, periods, and commas

formattedSubtotalBeforeDiscount

string

$form.formattedSubtotalBeforeDiscount

 

 

formatted values are a string representation of the decimal value, complete with currency symbol, periods, and commas

formattedSubtotalDiscount

string

$form.formattedSubtotalDiscount

 

 

formatted values are a string representation of the decimal value, complete with currency symbol, periods, and commas

formattedSubtotalFinal

string

$form.formattedSubtotalFinal

 

 

formatted values are a string representation of the decimal value, complete with currency symbol, periods, and commas

freePromotion

boolean

$form.freePromotion

 

 

if true, the free promotional item is added to the cart.

freePromotionConfirm

boolean

$form.freePromotionConfirm

 

 

confirmation boolean

freePromotionHtml

string

$form.freePromotionHtml

 

 

Some merchants wish to include a free promotional item (configured on the back end). this html presents that offer to the customer.

hasSubtotalDiscount

boolean

$form.hasSubtotalDiscount

 

 

 

hideQuantity

boolean

$form.hideQuantity

 

 

if true, do not show quantity

hideViewUrls

boolean

$form.hideViewUrls

 

 

if true, do not link the item images to their view urls

highlightBlankQualifiers

boolean

$form.highlightBlankQualifiers

 

 

if true, any options that do not yet have a selectedValue should be highlighted.

What are qualifiers? The original name of options. 20 years is a long, long time.

hostLinkHtml

string

$form.hostLinkHtml

 

 

 

infoMessages

string[ ]

$form.infoMessages

 

 

see Message, see info_messages.vm

items

CartItem[ ]

$form.items

 

 

 

lockQuantity

boolean

$form.lockQuantity

 

 

if true, do not allow item quantities to be edited

lockedItems

boolean

$form.lockedItems

 

 

if true, do not allow any edits on items (no deletions)

merchantId

string

$form.merchantId