Screen: ShopSite > Merchandising > Order API
Shopping Cart JavaScript Variables
All information about products in the shopping cart is available in the form of JavaScript variables in the <head> section of all shopping cart pages. You can add your own scripts that read these values for any purpose you require. Some potential uses might include verifying valid input for custom fields, or affiliate or statistical tracking. The variables are:
- ss_screen
- The name of the screen, which is always "Shopping Cart"
- ss_sbid
- The unique shopping basket ID.
- ss_ordernum
- The Order Number. This value is only for the Thankyou screen.
- ss_ordertotal
- The total charge for the order, including all products, coupons, discounts, tax, shipping, and surcharges.
- ss_subtotal
- The product subtotal, including coupons.
- ss_taxtotal
- The total tax.
- ss_shiptotal
- The total charge for shipping.
- ss_name
- Array of the names of products in the cart. The first product name is at ss_name[0]
- ss_sku
- Array of the SKUs of products in the cart. The first product SKU is at ss_sku[0]
- ss_quantity
- Array of the quantities of products in the cart. The quantity of the first product is at ss_quantity[0]
- ss_price
- Array of the prices of products in the cart. The first product price is at ss_price[0]
- ss_weight
- Array of the weights of products in the cart. The first product weight is at ss_weight[0]
- ss_total_price
- Array of the total price (price X quantity) of products in the cart. The first product total price is at ss_total_price[0]
- ss_field1
ss_field2
ss_field3
ss_field4
ss_field5
- Arrays of the merchant-definable fields for the products in the cart. The first field of the first product is at ss_field1[0]
- ss_coupon_name
- Array of coupons in the cart, identified by the coupon name.
- ss_coupon_discount
- Array of discounts applied by the coupons, listed in the same order as the ss_coupon_name.
- number_products
- Number of products ordered.
- number_coupons
- Number of coupons redeemed.