Weekend Theme (Shopify)

The WEEKEND theme uses add to cart ajax. By default they don't read the line item properties.

Go to init.js.liquid starting from line 115

    $('.add').on('click', function(e) {
		e.preventDefault();
		var quantity = $(this).closest('form').find('input.quantity').val(), 
      		productID = $(this).closest('form').find('*[name=id]').val();
        /* BEGIN RECHARGE MODIFICATIONS */
        data = {
          "quantity": $(this).closest('form').find('input.quantity').val(),
          "id": $(this).closest('form').find('*[name=id]').val(),
        }      
      if($(this).closest('form').find("[name='properties[subscription_id]']").val() != undefined){
       	data['properties[subscription_id]'] =  $(this).closest('form').find("[name='properties[subscription_id]']").val();
      }
      if($(this).closest('form').find("[name='properties[shipping_interval_frequency]']").val() != undefined){
       	data['properties[shipping_interval_frequency]'] =  $(this).closest('form').find("[name='properties[shipping_interval_frequency]']").val();
      }      
		addItem(data);
      	/* END RECHARGE MODIFICATIONS */
	});
    $('.quantity').on('keyup', function(){
      if($(this).val()<0){
        alert('Value must be greater than 0');
        $(this).val('0');
      }
    });
    // When Add to Cart is clicked
    var addItem = function(data) {
      $.ajax({
        type: 'POST',
        url: '/cart/add.js',
        dataType: 'json',
        data: data,
        success: addToCartOkay,
        error: addToCartFail
      });
    }

Still stuck? How can we help? Still stuck? How can we help?