How can I add an SVG image to my add to cart button?

How can I add an SVG image to my add to cart button?

9INE
Shopify Partner
27 0 4

Hi there, how can I add this SVG image to my add to cart button like how it has in the attached image? Have been trying to figure it out myself for days and can't seem to find out how, thanks <3.add to bag icon.jpg

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

Replies 3 (3)

Dan-From-Ryviu
Shopify Partner
9232 1852 1886

Hi @9INE 

Please drop your store link please

- Helpful? Like and Accept solution!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

9INE
Shopify Partner
27 0 4
Dan-From-Ryviu
Shopify Partner
9232 1852 1886

Please go to your Online store > Themes > Edit code > open theme.liquid file, add this code after <head> tag

<style>
button.product-form__submit span:before {
    content: '';
    width: 20px;
    height: 16px;
    background-image: URL('https://cdn.shopify.com/s/files/1/0579/9673/8721/files/bag.png?v=1669863100');
    background-size: contain;
    display: inline-block;
    margin-right: 4px;
    background-repeat: no-repeat;
}
</style>

Screenshot_8.jpg

 

- Helpful? Like and Accept solution!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.