From 4d57f9f0e9876d4b852e1c92ab240547a39bf2d4 Mon Sep 17 00:00:00 2001 From: Carson Shold Date: Mon, 28 Apr 2014 15:14:00 -0400 Subject: [PATCH] No need to add data-id to product quantity select --- assets/ajaxify.js | 5 +---- templates/product.liquid | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/assets/ajaxify.js b/assets/ajaxify.js index 16da66543..1c28bc308 100644 --- a/assets/ajaxify.js +++ b/assets/ajaxify.js @@ -942,7 +942,7 @@ var ajaxifyShopify = (function(module, $) { qtySelectors = function() { // Change number inputs to JS ones, similar to ajax cart but without API integration. - // Make sure to add the existing ID to the new input element + // Make sure to add the existing name and id to the new input element var numInputs = $('input[type="number"]'); if (numInputs.length) { @@ -952,9 +952,6 @@ var ajaxifyShopify = (function(module, $) { inputName = el.attr('name'), inputId = el.attr('id'); - // Ignore inputs without a data-id - if (!el.attr('data-id')) return false; - var itemAdd = currentQty + 1, itemMinus = currentQty - 1, itemQty = currentQty; diff --git a/templates/product.liquid b/templates/product.liquid index dbfa12a06..fd0a4a6ac 100755 --- a/templates/product.liquid +++ b/templates/product.liquid @@ -139,10 +139,7 @@ Quantity selector is optional {% endcomment %} - {% comment %} - Added data-id for the ajax cart implementation only. - {% endcomment %} - +