How can I hide the shopping cart icon on a new site?

Solved

How can I hide the shopping cart icon on a new site?

thrilly
Tourist
4 0 11

Hi. I'm creating a new site for a client who isn't yet ready to add products, and therefore the shopping cart isn't necessary. I'm currently creating the site using the free theme Studio. As I understand, it's not possible to technically disable the shopping cart / checkout itself, but I would like to at least hide the cart icon in the header to prevent users directly accessing this page. I was advised there may be a way to do this with some code, if anyone is able to help?

 

Thank you.

Accepted Solution (1)

chcsep
Shopify Partner
79 3 33

This is an accepted solution.

In Shopify Admin, go to Online Store > Themes > Actions > Edit code

 

Then in the selector on the left, scroll down to the "Sections" section and click "header.liquid"

 

You'll have to figure out where the link is that you want to disable, which you can do by commenting it out <!-- this is commented out code in HTML -->

 

In a separate tab, go to your store page front end, right click on the shopping cart icon, and click "Inspect Element". This should give you an idea of where to find the icon within your HTML code.

View solution in original post

Replies 10 (10)

AvadaCommerce
Shopify Partner
3879 839 973

Hi @thrilly ,

 

Please share your store URL and if your store is password protected then please provide password too.
You can take a picture of the place you want to edit.

So that we can help you.

banned

roaring
Tourist
7 0 3

Not much of a coder, but how I used to do it was going into the theme settings and corresponding the color of the logo to the background color, it was still present however not visible, but it should be able to be done with code.

Creative Director, UNWAHR Lében
Webstore: shopunwahr.com / unwahr.xyz
Direct Contact: arob@unwahr.xyz

chcsep
Shopify Partner
79 3 33

This is an accepted solution.

In Shopify Admin, go to Online Store > Themes > Actions > Edit code

 

Then in the selector on the left, scroll down to the "Sections" section and click "header.liquid"

 

You'll have to figure out where the link is that you want to disable, which you can do by commenting it out <!-- this is commented out code in HTML -->

 

In a separate tab, go to your store page front end, right click on the shopping cart icon, and click "Inspect Element". This should give you an idea of where to find the icon within your HTML code.

thrilly
Tourist
4 0 11

@chcsep Thank you, that worked. I wasn't sure what to do with <!-- this is commented out code in HTML --> but I found the necessary code in "header.liquid" and deleted it.

 

For anyone wanting to do the same thing using the same theme (and if you've not already altered the code), the code I deleted was this:

 

Screenshot 2022-04-16 at 20.57.16.png

GrzlyRzly
Visitor
1 0 0

Finally!!! Thank you for showing the exact text needed. This greatly helped me as I am using the Craft theme.

DreamCrusher
Visitor
1 0 0

Thank you SO much, I have been testing all these solutions people have listed and none of them have been working for the Ride theme. 

 

I located it at: Sections > header.liquid > line 722-739

Zenaba
Visitor
3 0 0

I located it at: Sections > header.liquid > line 320~340

{by the way,I suppose that you must long header title...}🤣

Zenaba
Visitor
3 0 0

Very useful, thank you very much.

ritadag
Tourist
3 0 0

thank you!!!!!!!! super super helpful!!!!

I was able to successfully hide the icon (I'm using the theme Refresh)

d8
Visitor
1 0 0

Hello! It's amazing how all of you understood exactly what to do because I am very lost and after locating "header.liqud" cannot figure out where the link is that I want to disable and I don't understand what it means "by commenting it out". The Shopify theme I am using is IMPACT 2.0.

If someone could walk me through what to do next, I would be very grateful. Thanks!