Shopify themes, liquid, logos, and UX
We have set up a custom image for our shopping cart and it works great majority of the time. It reverts back to the Shopify default image of the bag when an item is added to the cart or cleared from the cart. I have looked at some coding and cannot find an area to update or change where it is pulling the image from.
When drawer is open, back to default bag icon (bad)
Click off and continue shopping and it updates to correct image icon:
Our website: www.shimlee.com
Hi @shimlee ,
I've taken a look at your website and closely inspected the issue.
You have added a new icon for cart that is okay. But, when someone adds something to the cart, to update the cart count the full icon is rendered again and replaced with the old cart icon. This is something you need to work with the functionality of the `add to cart` click. Not some CSS tweak but you need to change the javascript functionality of it from the codebase.
Without the codebase, I can't say more than that. So, I can just point out the issue. Thanks.
Would you be able to help us within our javascript functionality? I've tried to have it triggered when an event like "open drawer" happens but I don't think it's full correct, therefor not working.
Hi @shimlee 👋 For dawn based themes that is the https://github.com/Shopify/dawn/blob/main/sections/cart-icon-bubble.liquid and
Reference https://github.com/Shopify/dawn/blob/main/sections/cart-notification-product.liquid
Replace the SVGs with relevant images.
Also be aware the site has many issues
Contact me for theme customizations and theme repair optimization services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hello @shimlee ,
When we add a product to cart, in file cart-notification.js
'renderContents' function is called
In it cart Notification html is updated. There you will get complete cart notification element or node and just to need to update image src.
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024