0

I have this ajaxForm:

$('.simple-checkout').ajaxForm({
success: function (response) {
    console.log(response);
    alert("Success");
    $('.cart-value').load(location.href);
},
error: function (response) {
    console.log(response);
    alert("Error");
}
});

Console log looks like this:

{success: true, data: {…}} data : action : "create_ajax_checkout" add-to-cart : "530" order_date : "2018-02-13, kedd" quantity : "1" thwepof_product_fields : "order_date" proto : Object success : true proto : Object

my question is can I get the response's quantity somehow?

  • What did you mean as 'response's quantity'? – Maxim Sarandi Feb 12 '18 at 10:14
  • @MaximSarandi response contains that string. And I need the quantity value from that. – MysticUnicorn Feb 12 '18 at 10:15
0

length might help yous. Look here or here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.