Using new V12 of Dawn theme and wanting to change Cart icon to one of my own. Have seen posts where people are adding svg code in but I have a png icon I want to upload to use as my cart icon instead.
If someone could advise how to use an image uploaded to my file.
Also, do I have to have 2 versions of the image or does Shopify create the 1/2/3 etc as people add things to their cart?
Hi @ed_bb ,
This is Theodore from PageFly - Shopify Page Builder App.
For solving the problem about the Change Cart Icon - Dawn Theme, let’s try this solution:
To edit the cart icon in the Dawn theme, follow these steps:
Go to Admin>Online Store
On the Dawn theme click Actions>Edit Code
Find the icon-cart.liquid and icon-cart-empty.liquid files in the Snippets folder
Replace the code in those files with your custom icon.
I’ll be so happy if my suggestion can help to solve your problem. If you have any further questions, please feel free to tell me.
Best regards,
Theodore | PageFly
Thank you for your quick response. I have added my SVG code which now shows my updated cart icon - thank you.
However, when you add something to your cart the number in the circle that Shopify adds is over the centre of my new icon, not in the top right corner as I want it to be. How do I alter the position of where shopify adds the number of items in your cart, please?
You also can replace your PNG image with SVG code in your Online store > Themes > Edit code > open icon-cart-empty.liquid and icon-cart.liquid files, replace SVG code with this code.
Ensure you put your png image link into the src tag of the image element.
But I recommend you convert your png image into a SVG icon because SVG take less time to load than png file
You’ll have to click on the add new asset, and upload the image. Then in the snippets folder put the code you see in the image, just replace the “your_cart_image” with the name of the image you uploaded. Moreover, you can adjust the height and width of the image with the numbers in height and widht parameters. Do the same with the empty cart icon, just change the name of “your_cart_image” to the empty icon you uploaded.
If you want to use an image from the file then you can simply copy the image url and put it insde the quotation marks after src. Note: remove everything in those quotation marks as you see in the image and just add the URL.
If you have uploaded the image in assets of them:
if you have uploaded the image in the files of your store: