Table of Contents
- Introduction
- Understanding the "Why" Before the "How"
- Method 1: Using the Shopify Theme Editor (The Safest Way)
- Method 2: Hiding the Cart Icon with CSS (The Fast Way)
- Method 3: Modifying Liquid Files (The Cleanest Way)
- Addressing the "Add to Cart" Buttons
- The Role of Cart and Checkout Optimization
- Performance and Measurement: How to Track Impact
- When to Bring in Professional Help
- Creating a Better "Non-Shopping" Journey
- Transitioning Back to a Live Store
- Conclusion
- FAQ
Introduction
Have you ever visited an online store that felt more like a gallery than a shop? Perhaps you are building a high-end furniture brand where every piece requires a custom consultation, or maybe you are setting up a "Coming Soon" page for a highly anticipated launch. In these moments, seeing a shopping cart icon in the top right corner can feel out of place—or worse, it can confuse your visitors. If they cannot actually buy anything yet, why is there a basket waiting to be filled?
Hiding the cart icon on Shopify is a common request for merchants moving toward a "catalog mode" or those running specialized business models like B2B wholesale, where pricing is hidden behind a login. While Shopify is built to be an e-commerce powerhouse, it is also flexible enough to serve as a digital lookbook or a lead-generation tool. However, removing a core element of the user interface requires a careful, intentional approach to ensure you aren't accidentally breaking the shopping experience for your future customers.
In this guide, we will explore exactly how to hide the cart icon on Shopify using various methods, ranging from simple theme settings to minor code adjustments. We will also discuss the strategic reasons why you might want to do this and the "Optimize with Intention" framework we use at Cartly Pro. This article is designed for Shopify store owners, developers, and growing brands who need to customize their site’s navigation without sacrificing performance or professional design.
Our thesis is simple: your store’s layout should always follow your business goal. By starting with strong foundations, clarifying your specific "why," performing an integrity check, and implementing the minimum effective change, you can create a site that feels cohesive and trustworthy. Does your homepage clearly state what you do?
Understanding the "Why" Before the "How"
Before we dive into the technical steps of modifying your theme, it is essential to clarify why you want to hide the cart icon. In e-commerce, the cart is the gateway to revenue. Removing it is a significant move that changes how a visitor interacts with your brand.
Common Scenarios for Hiding the Cart
There are several legitimate reasons why a merchant might want to remove the cart icon:
- Catalog Mode: You want to showcase products but aren't ready to sell them online yet. This is common for brands that sell through physical showrooms or third-party retailers.
- Coming Soon or Pre-Launch: You are building hype for a collection. You want people to browse the items and sign up for an email list, but you don't want the "empty cart" distraction.
- Quote-Based Selling: For high-ticket items or custom services, you might want customers to "Request a Quote" rather than adding an item to a cart.
- B2B and Members-Only Stores: You might hide the cart and pricing for the general public, only revealing them once a verified wholesale customer logs in.
- Maintenance or Seasonal Pauses: If you are taking a break or updating your inventory, hiding the cart prevents accidental orders that you cannot fulfill.
The Foundation of a Clear Offer
At Cartly Pro, we believe that apps and code edits are not the starting line—they are supportive tools. Before you hide your cart icon, ensure your foundations are solid. Does your homepage clearly state what you do? If a visitor sees a product but no cart, do they know how to contact you or where to find your items?
If your goal is to reduce "clutter," ask yourself if the cart icon is truly the problem, or if the header is simply overcrowded with too many menu links and announcement bars. Always prioritize a clean, mobile-friendly user experience (UX) over a purely aesthetic choice, and review our client case studies for examples of a more intentional approach.
Key Takeaway: Hiding the cart icon should be a strategic decision based on your current business model. If you plan to sell products directly in the future, ensure you have a plan to easily revert these changes.
Method 1: Using the Shopify Theme Editor (The Safest Way)
Many modern Shopify themes, especially those designed for high-end brands or large catalogs, include a built-in "catalog mode." This is the most reliable way to hide the cart because it doesn't require touching the underlying code.
Step-by-Step Instructions
- Log in to your Shopify Admin.
- Navigate to Online Store > Themes.
- Click the Customize button next to your active theme.
- Look for Theme Settings (usually a gear icon).
- Search for sections labeled "Cart," "Header," or "Product Page."
- Look for a checkbox that says "Enable catalog mode" or "Show cart icon." Uncheck it.
Limitations of the Theme Editor
Not all themes offer this toggle. Free Shopify themes like Dawn often require a bit more manual work. If you don't see an option to hide the cart in the customizer, don't worry—there are other ways to achieve this without being an expert coder.
What to Do Next
- Check every page of your site (Home, Collection, Product) in the preview mode.
- Ensure that hiding the icon didn't leave a weird gap in your header layout.
- If the icon is gone but a "Cart" link still appears in your mobile menu, you may need to check your Navigation settings.
Method 2: Hiding the Cart Icon with CSS (The Fast Way)
If your theme doesn't have a built-in setting, the next best option is using CSS (Cascading Style Sheets). CSS is the language used to describe the presentation of a web page. By adding a small snippet of "hide" code, you can tell the browser not to display the cart icon, even though it still exists in the background.
Finding the Right Class
Every Shopify theme uses different "names" (classes or IDs) for its elements. To hide the cart, you first need to identify its name.
- Open your store in a Chrome or Firefox browser.
- Right-click on the cart icon and select Inspect.
- Look for a piece of code that looks like
<a href="/cart" class="site-header__cart">or<div id="cart-icon">. - Note the class name (e.g.,
.site-header__cartor.header__icon--cart).
Adding the CSS Code
- In your Shopify Admin, go to Online Store > Themes > Edit Code.
- Find your main CSS file. It is usually located in the Assets folder and named
base.css,theme.css, ortimber.scss.liquid. - Scroll to the very bottom of the file.
- Paste the following code (replacing
.your-cart-classwith the name you found):
.your-cart-class {
display: none !important;
}
Why Use CSS?
CSS is "non-destructive." If you ever want the cart icon back, you simply delete those lines of code. It doesn't break the functionality of the site; it just makes the icon invisible to the user.
Caution: Using
display: nonehides the icon, but it does not disable the/cartpage itself. If a user manually typesyourstore.com/cartinto their browser, they will still see the cart page. If you want to prevent this, you will need to set up a redirect.
Method 3: Modifying Liquid Files (The Cleanest Way)
For a more permanent and professional solution, you can remove the cart icon directly from the Liquid files. Liquid is Shopify’s templating language. This method is preferred by developers because it prevents the browser from even loading the cart icon code, which can slightly improve site speed.
Locate the Header File
- Go to Online Store > Themes > Edit Code.
- In the Sections folder, look for a file named
header.liquid. - In some themes, the cart code might be tucked away in a "Snippet." Check the Snippets folder for files like
header-icons.liquidorcart-status.liquid.
Commenting Out the Code
Instead of deleting the code, it is much safer to "comment it out." This tells Shopify to ignore the code without erasing it.
- Search (Ctrl+F or Cmd+F) for
href="/cart"orroutes.cart_url. - You will see a block of code that generates the link and the icon.
- Wrap that code in liquid comment tags like this:
{% comment %}
<a href="{{ routes.cart_url }}" class="header__icon">
{% render 'icon-cart' %}
</a>
{% endcomment %}
The "Optimize with Intention" Check
Before you save these changes, consider the mobile experience. On desktop, a missing cart icon might look intentional. On mobile, the header is much more cramped. Ensure that removing the icon doesn't cause your logo to shift awkwardly or your hamburger menu to overlap with other elements.
What to Do Next
- Duplicate your theme before editing code. This allows you to revert to a working version immediately if something goes wrong.
- Test the search functionality. Sometimes hiding the cart icon accidentally hides the search icon if they are wrapped in the same container.
- If you are uncomfortable with Liquid, this is the point where you should consider reaching out to a Shopify Expert or the Help Center.
Addressing the "Add to Cart" Buttons
Hiding the cart icon in the header is only half the battle. If your goal is to stop people from buying, you also need to remove or hide the "Add to Cart" buttons on your product pages.
If you hide the icon but leave the button, a customer might click "Add to Cart," the item will be added, but they will have no way to navigate to the checkout. This creates a high-friction, confusing experience that can damage your brand's reputation.
How to Hide "Add to Cart" Buttons
- Theme Editor: Most themes allow you to hide the "Buy Buttons" block within the Product Page template.
-
CSS: Similar to the icon, you can find the class for the button (usually
.product-form__submitor.add-to-cart) and set it todisplay: none;. - App Solutions: There are Catalog Mode apps in the Shopify App Store that can automate this across your entire site with a single click.
The Role of Cart and Checkout Optimization
At Cartly Pro, our focus is usually on making the cart experience better, not making it disappear. However, we recognize that optimization means making the store work for your specific needs.
What Optimization Tools Can Do
When you do decide to enable your cart, optimization tools like a cart drawer vs popup cart can:
- Reduce Friction: Allow customers to see what they've added without leaving the current page.
- Increase Clarity: Clearly show shipping thresholds and taxes to avoid surprises at checkout.
- Support Relevant Upsells: Offer helpful add-ons that actually provide value to the customer.
- Improve Mobile UX: Ensure the checkout button is easy to hit with a thumb.
What They Cannot Do
It is important to remember that no app or code change can:
- Fix Product-Market Fit: If people don't want the product, a better cart won't help.
- Guarantee Revenue Lifts: Results depend on your traffic quality and overall brand trust.
- Override Poor Site Speed: If your base theme is bloated, a cart app can only do so much.
Performance and Measurement: How to Track Impact
Whenever you make a structural change to your site—like hiding the cart icon—you must monitor the data. You are essentially turning off the primary conversion path, so you need to ensure your secondary path (leads, contact forms, or newsletter signups) is picking up the slack.
Key Metrics to Track
- Conversion Rate (CR): In this case, your "conversion" might be a form submission instead of a sale.
- Bounce Rate: Are people leaving immediately because they can't find a way to buy?
- Time on Site: If you are a catalog-style store, you want this number to be high.
- Customer Inquiries: Are you getting more emails asking "How do I buy this?" This is a sign that your "Catalog Mode" communication isn't clear enough.
The "One Change at a Time" Rule
Don't redesign your entire header, change your pricing, and hide the cart icon all in one day. If your traffic drops, you won't know which change caused it. Implement the "Hide Cart" change, wait a week, and then reassess.
Key Takeaway: Always use data to validate your design choices. If hiding the cart causes a massive spike in bounce rate, you may need to add a clearer "Coming Soon" or "Contact for Pricing" message.
When to Bring in Professional Help
Modifying the architecture of your Shopify store is generally straightforward, but things can get complicated quickly. You should consider hiring a Shopify developer or contacting support in the following situations:
- Theme Conflicts: You added the CSS code, but the icon is still there (this often happens with "sticky" headers or complex JavaScript).
- Broken Layouts: Removing the icon caused your menu to break or your logo to disappear on mobile devices.
- Performance Issues: Your site speed dropped significantly after you started editing Liquid files.
- Security and Payments: If you are trying to hide the cart to prevent fraud or manage complex payment rules, it is better to consult with Shopify Support and your payment provider to ensure your account remains secure.
- Legal Compliance: If you are hiding pricing or carts for specific regions due to tax or consumer law, consult with a qualified professional (legal counsel or an accountant) to ensure you are meeting all transparency requirements.
Creating a Better "Non-Shopping" Journey
If you are hiding the cart icon, you are essentially changing the "intent" of your website. You are moving from a "Transactional" intent to an "Informational" or "Relational" intent. To make this successful, you should optimize the elements that remain.
1. Enhance Your Contact Page
Since customers can't check out, they need an easy way to reach you. Make your "Contact Us" or "Request a Quote" button prominent. Instead of a cart icon, maybe you have a "Phone" or "Email" icon in the header.
2. Use Announcement Bars Wisely
Use the space at the top of your site to explain why there is no cart.
- "Browse our 2024 Collection. Online ordering opens November 1st!"
- "Showroom only. Contact us for private viewing."
- "Wholesale members: Please log in to see pricing and order," and use that space to build trust in your Shopify store.
3. Focus on High-Quality Imagery
In catalog mode, your photos do the heavy lifting. Since the friction of "buying" is removed, visitors have more mental space to engage with your brand story. Use this opportunity to build desire so that when you do turn the cart back on, you have a list of eager buyers.
Transitioning Back to a Live Store
Most merchants who hide their cart icon eventually plan to show it again. When that day comes, don't just "flip the switch." Use it as an opportunity to "Optimize with Intention."
- Re-enable the Icon: Remove the CSS or uncomment the Liquid code.
- Audit the Experience: Does the cart look modern? Is it easy to use on mobile?
- Consider a Cart Drawer: Instead of sending people to a separate cart page (which can feel slow), use a best cart drawer setup that slides out. This keeps them on the product page and reduces the number of steps to checkout.
- Add Trust Signals: Once the cart is back, make sure you have clear shipping and return policies visible within the cart area.
At Cartly Pro, we help merchants make this transition seamless. A Cartly app on the Shopify App Store can provide the professional look of a custom-coded store with the ease of an app, allowing you to focus on your products rather than your code.
Conclusion
Hiding the cart icon on Shopify is a powerful way to customize your store’s purpose, whether you are running a B2B operation, a pre-launch campaign, or a high-end catalog. By following a structured approach, you can ensure that this change helps—rather than hurts—your brand.
Summary of Best Practices
- Start with the "Why": Ensure hiding the cart aligns with your current business goals (e.g., catalog mode or quote-based selling).
- Check Theme Settings First: Always look for a built-in "Catalog Mode" before touching code.
-
Use CSS for Simple Fixes: Use
display: noneto hide the icon quickly without breaking your theme files. -
Use Liquid for Clean Edits: Comment out the cart code in
header.liquidfor a more professional, speed-optimized result. - Don't Forget the Buttons: If you hide the cart icon, you must also hide the "Add to Cart" buttons to avoid customer confusion.
- Monitor Your Metrics: Watch your bounce rate and contact form submissions to ensure visitors still find value in your site.
Optimizing your store is a journey of continuous refinement. Whether you are adding a high-conversion cart drawer or temporarily hiding the cart to build brand mystery, always act with intention. Start with the foundations, respect your customers' experience, and don't be afraid to iterate as your business grows.
If you are ready to take your Shopify store to the next level—whether that means a more functional cart or a cleaner, more intentional layout—remember that the best tools are those that work with your theme, not against it. When you’re ready to bring the cart back, you can also review the Lace Lab case study for a real-world example of a polished shopping experience.
FAQ
Will hiding the cart icon affect my SEO?
Generally, no. Hiding a navigation icon via CSS or Liquid does not directly impact your search engine rankings. However, it does change the user experience (UX). If users find the site confusing because they expected to be able to buy something and can't, your "bounce rate" might increase. Since search engines use engagement signals as a factor, a poor UX can indirectly affect your SEO over time. Always ensure your site's purpose is clear.
Can I hide the cart icon on mobile but keep it on desktop?
Yes, this is possible using CSS "Media Queries." You can write a rule that tells the browser to hide the icon only when the screen width is below a certain size (like 768 pixels). This is sometimes used by stores that want mobile users to browse and desktop users to complete the actual purchase, though we generally recommend a consistent experience across all devices for better trust.
How do I stop people from accessing the /cart page directly?
Hiding the icon doesn't delete the page. To fully "close" the cart, you can create a URL redirect in your Shopify Admin (Online Store > Navigation > View URL Redirects). Point /cart to your homepage or a custom landing page. Additionally, you can edit the cart.liquid template to include a message saying "Our online store is currently in catalog mode."
Will hiding the cart icon break other apps I have installed?
It might. Some apps, especially those related to upsells, loyalty programs, or specialized checkout features, look for the cart icon or the "Add to Cart" button to function. If you hide these elements using code, the apps might trigger errors in the background or simply fail to load. If you use multiple apps, we recommend testing your site thoroughly in a "Preview" theme before publishing your changes to the live store.