Change "add to card" button into an image (svg)

Solved

Change "add to card" button into an image (svg)

ateliermira
Tourist
5 0 1

Hi Shopify community!

 

I am customising the Dawn theme. 

My client has requested that instead of an "add to cart" button, they would like an icon (image).

Can anyone help?

 

Screen Shot 2022-01-25 at 12.44.48.png

Accepted Solution (1)
Dbuglabpvtltd
Shopify Partner
705 75 116

This is an accepted solution.

Hi @ateliermira 

then it's revert back with js.
You have to check the theme js files for this.

banned

View solution in original post

Replies 6 (6)

Zworthkey
Shopify Partner
5581 642 1575

@ateliermira 

hi,
Greeting of the Day.

Welcome to the Shopify community!

Thanks for your good question.

 

yes, it's possible through the custom code.

if you need more help then let me know.

 



 

ateliermira
Tourist
5 0 1

That's great! Thank you for your response!

Would you be able to guide me through the code?

Dbuglabpvtltd
Shopify Partner
705 75 116

Hi @ateliermira 

You can do this with custom code.
Go to your product form.liquid file

Find add to  cart button replace text with the SVG code.

banned
ateliermira
Tourist
5 0 1

Thank you for your help. I did try this initially, however it reverts back to the text when I click on a variant.

Dbuglabpvtltd
Shopify Partner
705 75 116

This is an accepted solution.

Hi @ateliermira 

then it's revert back with js.
You have to check the theme js files for this.

banned
ateliermira
Tourist
5 0 1

Thank you so much!

I have figured it out with the help of your advice 😄