How to change logout URL for the headless site using Checkout Extension app

Monika_Patel
Shopify Partner
2 0 1

Hello 
I hope you are doing well.

I have a question regarding the use of the Shopify checkout extension. If I log out from the Shopify Plus checkout page and then also log out on my headless site, will it still be possible to use the Shopify checkout extension? Additionally, I've installed a checkout extension app for custom validation in the shipping address fields for both the published live checkout and the one-page checkout. I have also included a screenshot of the checkout extension app. 

Here is the URL to my Shopify Plus store with headless preview: https://checkoutdev.inpixelinc.com/?_ab=0&_fd=0&_sc=1&preview_theme_id=126589403184

and here is the URL to the screenshot: https://prnt.sc/5K1En0Ci_ZvQ

 

Could you please suggest an alternative way to modify the logout URL on the Shopify checkout page? Or, is there any other option available that allows us to redirect the customer to the logout page of the headless site when they log out from the checkout page?

 

 

I have tried to add the following JavaScript code using the checkout extension, but unfortunately, it's not working in the checkout extension and I am facing some errors. However, I have added the same code in the checkout.liquid, and it's working. But after upgrading the Shopify checkout extension, the code is not working with the checkout extension. So, I need a solution to fix this issue. Can you please suggest some solutions?

Here is code:

$(document).ready(function() {

    $('.logged-in-customer-information__paragraph a').on("click", function() {

        $.ajax('https://checkoutdev.inpixelinc.com/account/logout/')

            .done(function() {

                window.location.href = "https://targus.inpixelinc.com/account/logout";

            });

        return false;

    });

});

Reply 1 (1)

Monika_Patel
Shopify Partner
2 0 1

Any updates regrading my questions. I am waiting your response.