       referrerId:   referrer
       shippingAddress:
         country: 'us'
-      discount: 0
-      tax: 0
-      subtotal: 0
-      total: 0
-      items: items ? []
-      cartId: cartId ? null
+      discount:    0
+      tax:         0
+      subtotal:    0
+      total:       0
+      items:       items                    ? []
+      cartId:      cartId                   ? null
       checkoutUrl: opts.config?.checkoutUrl ? null
-      metadata: meta ? {}
+      metadata:    meta                     ? {}
 
   data = @data.get()
   for k, v of opts

    for tag in tags
      tag.update()

  @cart.onUpdate = (item)=>
    items = @data.get 'order.items'
    store.set 'items', items
    @cart._cartUpdate
      tax: @data.get 'order.tax'
      total: @data.get 'order.total'

    if item?

# Format of opts.referralProgram
# Referral Program Object

Shop.riot      = riot
Shop.analytics = analytics
Shop.isEmpty   = ->
  items = @data.get 'order.items'
  items.length == 0

getQueries = ->
  search = /([^&=]+)=?([^&]*)/g
  q = window.location.href.split('?')[1]
  qs = {}
