How to Add A Custom Cart Icon on Shopify Using Code: Detailed Tutorial
A great way to personalize your customers' shopping experience is to replace the regular "add to cart" icon with a custom one. Custom cart icons add an extra touch to your Shopify store, making it stand out from others.
You can customize your Shopify cart icon with only a few lines of code which you'll find in this article.
How to Add Custom Cart Icon Using Code
Step 1: Duplicate your live theme
From your Shopify Admin click on Online Store and than Themes. Next to your live theme click on Actions and from the drop down menu choose Duplicate.
Step 2: Sections Directory
Now that we have our duplicate we can start coding. Click on Actions again, but this time choose the edit code. A code editor should appear and from the navigation to the left scroll down to the Snippets directory. In the snippets directory search for icon-cart.liquid .
A new file should appear on the right side of your code editor. Remove all the content of the file.
The easiest way of adding a custom icon is by getting a code from the third party websites such as https://icons8.com/icons/set/cart
Choose the cart icon you want, click on Embed HTML, this website allows you to choose the size of your icon, copy the code and that is it.
Now go back to your theme editor and paste the code you get into the snippet file.
If it looks big, you should resize it.
Step 3: Resize your icon
In case your icon is too small or too big, you can resize it with code. Navigate to the Assets directory and choose your style sheet. In our case it is theme.scss.liquid but it can be named differently. paste the following code at the end of the document.
.site-header__cart img {
width: 25px;height: 25px;
}
You can play with width and height in case you don't like how it looks.
Conclusion
Add a personal touch to your store's experience using a custom cart icon.
Guides
- How To Create CUSTOM PRODUCT OPTIONS on Shopify 2.0
- How To Open External Links In A New Tab - Easy Shopify Tutorial
- How To Add Before And After Slider To Shopify - Easy 2022 Tutorial
- How To Add a Background Video To Shopify For Free
- How To Embed TikTok Videos To Any Shopify Page For Free
- Create Product Bundles Without The App - 2022 Easy Shopify Tutorial!
- Add Back to Top Button on Shopify Using Code: Detailed Tutorial
- How to Add A Custom Cart Icon on Shopify Using Code: Detailed Tutorial
- How to Add Breadcrumb Navigation to Your Shopify Store: DIY Tutorial Using Code
- How to Add Sales Countdown Timer to Your Shopify Store
- Cumulative Layout Shift Optimization: Causes and How to Measure It
- Ask How Customers Heard About Your Store On The Cart Page - 2022 Shopify Tutorial
- How to create a simple Quick View without app usage to your Shopify store
- Add A Multiple Currency Selector to Your Shopify Store Using Code Tutorial
- How to Create A Page of Collections on Shopify Using Code
- Show The Number of Products Left in Stock on Your Shopify Product Page
- Change the Number of Products in the Collection Page- Shopify Tutorial
- DIY Guide to Embed A YouTube Video in Shopify Product Page Tutorial
- Add a Message to the Shopify Product Pages by Using Product Tags - 2022 Easy Tutorial
- How to Add a Delivery Date Picker to Your Cart Page - Easy Step-By-Step Shopify Tutorial
- How To Create A Stunning Parallax Scrolling Section In Your Shopify Store Tutorial
- 6-step Tutorial on How to Add Wholesale To Shopify Store Without Shopify Plus
- How to Add Banner Image to Product Pages Without The App - Quick Shopify Tutorial
- How to add Hover Effect on Main Navigation Bar In Shopify
- How to Add A Gallery Page to Your Shopify Store without the App
- Disable Right-click to Protect Your Images on Shopify Using Code - Tutorial
- How to Auto Hide Sold Out Products on Shopify: DIY Tutorial
- DIY Code: How To Add Continue Shopping Button To Your Shopify Cart Page
- How to Create Custom Product Options on Shopify Without the App in 2022
- How to Select Variants By Clicking Their Images on Shopify
- How to Create a Custom Note Field on Your Shopify Cart Page
- How to Enable Custom File Upload Product Options on Shopify
- How To Show An Alternate Product Image On Your Shopify - Easy Step-By-Step Tutorial
- Step-by-Step Tutorial to Set Up Facebook Messenger Chat On Shopify Without App
- DIY Code To Add a Size Chart to Shopify Product Pages
- How To Redirect Shopify Customers After Login, Logout & Account Creation
- 4 Steps to Create a Sticky Header on Shopify: DIY Code
- How to Add Featured Product Slider To Your Shopify Store: Step-By-Step Tutorial
- Shopify Product Description Tabs: 5 easy steps to create your own collapsable descriptions
- Shopify Quick ADD TO CART Button On Collection Page Without The App
- How To Add a CUSTOM FONT To Your Shopify Store
LEARN MORE
Get ahead with the latest in e-commerce and Shopify Plus

How Headphones.com Mobile Speed Score Went From 21 to 76 In 48 Hours