     # Render the context to elements as needed.
     jQuery('[data-cart-render]').each ()->
       $this = jQuery(this)
-      $this.text context[$this.data('cartRender')]
+      $this.text context[$this.attr('data-cart-render')]

  # Handler for [data-cart-toggle] change events.
  toggle: (e) ->
    $input = jQuery(this)
    id = $input.data('cartToggle')
    if $input.is(':checked')
      CartJS.Core.addItem(id)
    else

  add: (e) ->
    e.preventDefault()
    $this = jQuery(this)
    CartJS.Core.addItem $this.attr('data-cart-add'), $this.attr('data-cart-quantity')

  # Handler for [data-cart-remove] click events.
  remove: (e) ->
    e.preventDefault()
    $this = jQuery(this)
    CartJS.Core.removeItem $this.attr('data-cart-remove')

  # Handler for [data-cart-remove-id] click events.
  removeById: (e) ->
    e.preventDefault()
    $this = jQuery(this)
    CartJS.Core.removeItemById $this.attr('data-cart-remove-id')

  # Handler for [data-cart-update] click events.
  update: (e) ->
    e.preventDefault()
    $this = jQuery(this)
    CartJS.Core.updateItem $this.attr('data-cart-update'), $this.attr('data-cart-quantity')

  # Handler for [data-cart-update-id] click events.
  updateById: (e) ->
    e.preventDefault()
    $this = jQuery(this)
    CartJS.Core.updateItemById $this.attr('data-cart-update-id'), $this.attr('data-cart-quantity')

  # Handler for [data-cart-clear] click events.
  clear: (e) ->
