I changed icon-cart-liquid to:
because I wanted to change the cart icon. It only shows up on desktop view, and not mobile. How do I fix this?
Thanks!
I changed icon-cart-liquid to:
because I wanted to change the cart icon. It only shows up on desktop view, and not mobile. How do I fix this?
Thanks!
Hi,
You want hide or add new for mobile version ?
Add new for mobile version
Hello SneakerSoul,
This is because there’s a different header for mobile.
In your admin, you have to go to header.liquid and search mobile header there.
Change the code in icon-cart-liquid in the mobile header and your cart icon will appear for the mobile view.
Hope this helps ![]()
Hi, I ended up changing the size of the cart icon smaller, and it showed up on mobile. But it is not aligned with the menu, and when I go to desktop view it way bigger. Any idea how to fix this? If not, do you have the original code handy so that I can revert to the original? thanks!!
Hello SneakerSoul,
To make it show on the mobile, please go through my above post. You didn’t have to change the size, you just have to go to the mobile header and add/change the icon.
Now as you have ended up increasing your icon size for desktop view, you can reduce the pixels by changing the “width” in the below code:-
<img src “https://cdn.shopify.com/s/files/1/0592/3435/3336/files/shopping-cart_2.png?v=1628749296” width=" " />
Thanks
Hi,
upload cart image file in file section
copy the link & Add image path for cart in
after this add these css
.mobile{
display : none;
}
@media only screen and(max-width:749px){
.mobile{
display : block;
}
svg.icon.icon-cart {
display: none;
}
}
Add this css at the bottom of
Online Store->Theme->Edit code->Assets->theme.scss.liquid
Note : If your store is having this media already (for mobile version) then no need to add whole code . Only just add css in that media ie 749px(already exist)
you can style after that you want!
hope this will work for you
thank you so much for your response. I have inserted all the code in the right places, but on icon-cart.liquid, I am missing the first line of code that you have. I deleted it earlier when I was trying to change it. Do you mind pasting that? Thanks a lot!
-Brock
Hi send screenshot of icon-cart.liquid