Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const form = $('form[data-cart-item-add]');
- const url = '/remote/v1/cart/add';
- $.ajax({
- type: 'POST',
- url: url,
- xhrFields: {
- withCredentials: true,
- },
- contentType:'application/x-www-form-urlencoded; charset=UTF-8',
- processData: true,
- success: (response) => {
- console.log(response)
- },
- data:$(form).serialize()
- });
Add Comment
Please, Sign In to add comment