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. The billing and shipping addresses are also available as JavaScript variables on the Thank You screen. You can add JavaScript code to the built-in validation code, or call custom scripts on other parts of the screens. One example of using the variables on the Thank You screen is Using Google Analytics with ShopSite.

Cart Variables
ss_screen
The name of the screen. Can be "Shopping Cart", "Checkout", "Confirmation", or "Thank You"
ss_sbid
The unique shopping basket ID.
ss_associate
The associate ID. If you do not have associates configured, this is empty.
ss_ordernum
The Order Number. Only on the Thank You screen.
ss_paytype
Number code for the payment type used. Only on the Thank You screen. The number codes correlate to the following payment types:
  1. 0 - Visa
  2. 1 - MasterCard
  3. 2 - Discover
  4. 3 - American Express
  5. 4 - Purchase Order
  6. 5 - Cash On delivery
  7. 6 - Check
  8. 7 - PayPal (standard)
  9. 8 - Generic Payment Option 1
  10. 9 - Generic Payment Option 2
  11. 10 - Diner's Club
  12. 11 - Fire Pay
  13. 12 - eCheck
  14. 13 - WorldPay
  15. 14 - PayPal Express
  16. 15 - Google Wallet
  17. 16 - NetBanx
  18. 17 - Solo
  19. 18 - Switch
  20. 19 - Delta
  21. 20 - Visa Electron/UK
  22. 21 - JCB
  23. 22 - Maestro
  24. 99 - No payment required
ss_taxstr
The tax zone used. Only on the Thank You screen.
ss_taxpercent
The tax percentage. Only on the Thank You screen.
ss_shippingstr
The shipping method selected. Only on the Thank You screen.
ss_email
The billing email address. Only on the Thank You screen.
ss_billname
The billing customer name. Only on the Thank You screen.
ss_address1
The billing address line one. Only on the Thank You screen.
ss_address2
The billing address line two. Only on the Thank You screen.
ss_city
The billing city. Only on the Thank You screen.
ss_state
The billing state. Only on the Thank You screen.
ss_postalcode
The billing zip/postal code. Only on the Thank You screen.
ss_country
The billing country. Only on the Thank You screen.
ss_company
The billing company name. Only on the Thank You screen.
ss_phone
The billing phone number. Only on the Thank You screen.
ss_shipname
The shipping recipient name. Only on the Thank You screen.
ss_shipaddress1
The shipping address line one. Only on the Thank You screen.
ss_shipaddress2
The shipping address line two. Only on the Thank You screen.
ss_shipcity
The shipping city. Only on the Thank You screen.
ss_shipstate
The shipping state. Only on the Thank You screen.
ss_shippostalcode
The shipping zip/postal code. Only on the Thank You screen.
ss_shipcountry
The shipping country. Only on the Thank You screen.
ss_shipcompany
The shipping company name. Only on the Thank You screen.
ss_shipphone
The shipping phone number. Only on the Thank You 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.
Per-product Variables
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_finite_options
Array of selected order options. Selected options for products with multiple pull-downs are separated by "|". The selected order options for the first product are at ss_finite_options[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_field25
Arrays of the merchant-definable fields for the products in the cart. There can be up to 25 fields for each product. They represent the Extra Fields available for Products. The first field of the first product is at ss_field1[0]
Coupon Variables
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.

ShopSite Help and Resource Center
Last updated: March 01, 2010
Give Feedback


ShopSite Shopping Cart Software