Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Changing Checkout Page Logo URL

Changing Checkout Page Logo URL

Samster1
Tourist
5 0 2

Hello

 

I read over a few threads that there are no options to customize the checkout page logo URL unless to subscribe into shopify plus plan.

 

However, as headless commerce is taking place, more companies are adopting it. Not all business owner afford to pay $2000 per month on plus plan when starting up. And this cause us to have leaky funnel, where when the visitor click on the logo, it leads to <subdomain>.<domain>.com which is usually set up as a password-protected page.

 

Perhaps, there's another workaround, would like to know the best options to handle this.

 

Replies 6 (6)

NiccosMedia
Shopify Partner
51 4 16

One option is to use a custom redirect for your checkout page. This will allow you to redirect users who click on the logo on your checkout page to a different page, such as your store's homepage. To set up a custom redirect, you can follow these steps:

  1. Log in to your Shopify account and go to the "Checkout" section of your admin panel.

  2. Click the "Additional scripts" tab and enter the following code in the "Order processing" box:

<script>
window.onload = function() {
var logo = document.querySelector('.logo img');
logo.addEventListener('click', function() {
window.location.href = 'https://www.example.com';
});
};
</script>

 

  1. Replace https://www.example.com with the URL you want to redirect users to when they click on the logo on your checkout page.

  2. Save your changes and test the redirect to make sure it is working as expected.

I hope this helps! Let me know if you have any other questions.

Greetings Niclas
Senior Front-End Developer
Founder of Niccos Media
Based in Germany
niccos-media.de
Samster1
Tourist
5 0 2

Thanks for the suggestion. I believe the additional script only meant for order status page, however, I want this to be applied to checkout page as well.

NiccosMedia
Shopify Partner
51 4 16

This Script can also be used for checkout not only order status page - Settings - Checkout - Additional Script

Greetings Niclas
Senior Front-End Developer
Founder of Niccos Media
Based in Germany
niccos-media.de
Samster1
Tourist
5 0 2

Perhaps I put it in the wrong place, but under Settings -> Checkout -> Additional Scripts, I put a simple console.log(). 

Landed on checkout page, and did not see this message printed at the console.

Screenshot 2022-12-15 at 2.46.43 PM.png

 

 

storedevlabs
Shopify Partner
2 0 0

I found a workaround to this, if you go to Themes / Edit Code and go to the theme.liquid file you can run a redirect on top of your man or specific urls inside the <head> component.

This is an example with the main page url:

{% if request.host == 'your-old-domain.com' %}
  <meta http-equiv="refresh" content="0; url=https://your-new-domain.com/" />
{% endif %}
Copy

This is an example with the inclusion of a more specific subpath such as /cart:

{% if request.host == 'your-old-domain.com' or request.path == '/cart' %}
  <meta http-equiv="refresh" content="0; url=https://your-new-domain.com{{ request.path }}" />
{% endif %}
Copy

As of now (from my knowledge) redirects is the only viable way of doing this without having to get Shopify plus.

Jefte
New Member
4 0 0

Do you know if this still works? I am trying to re-direct the logo from the checkout page to lead to the clients WP web address as we are only using Shopify's buy buttons. Here is how I set it up in the <head> of the code.

 

{% if request.host == 'https://cashbuttedistillery.myshopify.com/' %}
<meta http-equiv="refresh" content="0; url=https://cashbuttedistillery.com/" />
{% endif %}