Hiding the cart icon on a certain page

Hi.
I am trying to hide the cart icon only on my main page but want it to appear on all the other pages. On that certain page I use:

$w.onReady(function () {
    $w("#shoppingCartIcon1").hide();
});

But it won’t work.
It works fine on other elements.

Strange thing is, I wrote this code only on one page. The cart icon still shows on all pages on the published site but disappears ON ALL PAGES in the editor’s preview mode…

Alternately and even better: is there a way to hide the cart icon as long as it’s empty?

Thank you?

1 Like

https://support.wix.com/en/article/customizing-your-wix-stores-mini-cart-and-shopping-cart-icon

Currently, you cannot remove the shopping cart icon from your site as it is an essential part of your online store.

Is it still unavailable in Wix. or we can remove it now someway? Not even using any tools?
Thanks

Is the icon in the header?
Whatever is in the header and footer will be displayed on all pages.

If you want only hide the icon like this way.
This way is not use wix velo code

Move the icon outside header and put the icon every page.
or
Change the home page layout to no header and footer.

I don’t know how to hide the cart icon as long as it’s empty.
If you can’t search the way, please try it.

Hi there …

This is an old thread and will be closed, if you still have more questions or concerns feel free to open up new a thread.

Bumping up old threads is against the community guidelines.