How clear cart access external?

Highlighted
New Member
12 0 0

Hi, guys. 

I'm brazilian. I development a checkout transparent xekout.me and, I world like how to clear the cart of customer ?

0 Likes
Shopify Staff
Shopify Staff
1460 66 217

You can clear the cart from the storefront via the client using the AJAX API: https://help.shopify.com/en/themes/development/getting-started/using-ajax-api

 

There is no other supported way to do this via any tools Shopify provides.

0 Likes
New Member
12 0 0

But not working. 
I using this is code 

.ajax({
        url: 'https://relogiosmart.com.br/cart/update.js', 
        type: 'POST',
        headers: {
            'X-Shopify-Storefront-Access-Token': '3650c4dc15a22a3d1febc51cd0045f26' Key API of my app private
        },
        contentType: 'application/json; charset=utf-8',
        data: {quantity: 3,id: 16100101455918},
        success: function(e){
            console.log(e);
        },
        error: function (error) {
                console.log(error);
        }
    });

How solve it?

 

0 Likes
Shopify Staff
Shopify Staff
1460 66 217

What do you mean when you say it's not working? Are you getting any errors?

0 Likes