How can I add an icon to my 'Add to Cart' button?

How can I add an icon to my 'Add to Cart' button?

9INE
Shopify Partner
27 0 4

Hi! I would like to add the 'bag' or 'cart' icon to my ADD TO CART button, like in the example below. 

I have the SVG ready but I am having trouble with the coding: https://cdn.shopify.com/s/files/1/0579/9673/8721/files/bag.png?v=1669863100

Does anyone know how to? Thanks

 

add to bag icon.jpg

Replies 4 (4)
9INE
Shopify Partner
27 0 4

Hi 🙂 it's www.shopworms.com

PageFly-Noah
Shopify Partner
1317 233 268

Hi @9INE 

 

This is Noah from PageFly - Shopify Page Builder App

 

Please follow my steps below to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: find and open the buy-buttons.liquid and paste the code like this screenshot below 

            <img src="https://cdn.shopify.com/s/files/1/0579/9673/8721/files/bag.png?v=1669863100" width="18" height="18" />

PageFlyNoah_0-1696989511891.png

 

It will work like this : 

PageFlyNoah_1-1696989534915.png

 

Hope this can help you solve the issue 

 

Best regards,

Noah | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

9INE
Shopify Partner
27 0 4

Looks good but it is very close to the add to cart text, how can I put some space between the icon and text?

fadi_yousif
Shopify Partner
344 43 66

Hi @9INE 

I created a tutorial for this: https://youtu.be/3Nd-C18cbes?si=VcaGycvSshkpv76c

Freelance Shopify Developer


Did I help? Leave a tip!