skip to Main Content

Ajax POST request to Shopify's /cart/add.js always returning on error callback function

$.ajax({ type: 'POST', url: '/cart/add.js', data: { quantity: 1, id: form_data }, success: function(response) { console.log('in success'); var url = $("#af-btn").attr("href"); window.location.href = $("#af-btn").attr("href"); }, error: function(response) { console.log(response + "in error"); var url = $("#af-btn").attr("href"); //window.location.href = $("#af-btn").attr("href"); },…

VIEW QUESTION

Shopify – Buiding an App

I've been doing Shopify development for a little while now and my client has a specific need that I haven't found in the app store yet. It needs to: Create two discount tiers based on total value of the cart…

VIEW QUESTION
Back To Top
Search