 
   eventAddToCart: ->
     if $(@storePage).length > 0
-      @addToCartButton.click (event)=>
+      $(@addToCartClass).click (event)=>
           event.preventDefault()
           addToCartBtn = $(event.target)
           if not $(@addToCartBtn).hasClass('Button--state-inactive')

    id.substr 0, len
    return id


$(document).ready ->
  s = new PupilStore

      @eventUpdateCartNavCounter()

  eventUpdateCartNavCounter: ->
    qty = [v.qty for k,v of LocalStorage.dict()]
    qtySum = qty[0].reduce (a,b) -> a + b
    counter = if LocalStorage.length() > 0 then qtySum else ""
    $(@cartNavCounter).text("#{ counter }")

  eventUpdateConfig: ->
