Changing Cart Icon in Debut theme only worked on Desktop and not mobile?

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!

1 Like

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 :slightly_smiling_face:

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!!

1 Like

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

your store front end will look like this

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