how to change add to cart button shopify

How To Change Add To Cart and Buy It Now Button Color Specifically On A Shopify Store 2021 hello eve

eCom Simplified

Updated on Jan 13,2023

How To Change Add To Cart and Buy It Now Button Color Specifically On A Shopify Store 2021

The above is a brief introduction to how to change add to cart button shopify

Let's move on to the first section of how to change add to cart button shopify

Let TThunt's experts help you find the best TikTok product on your Shopify business!

Find TikTok products (It's Free)
No difficulty
No complicated process
Find winning products
3.5K Ratings


TThunt has the world's largest selection of TikTok products to choose from, and each product has a large number of advertising materials, so you can choose advertising materials for TikTok ads or Facebook ads without any hassle.

How To Change Add To Cart and Buy It Now Button Color Specifically On A Shopify Store 2021

hello everyone this is ellen from ecom,simplified,today i'm going to show you how to,change the colors of the add to cart,button,and the buy now button color for a,shopify store,as you may know if you change these,button colors from the theme editor,it will change the colors of the whole,theme so today i will go,through quickly how to do it with um,through the theme editor that changes,the whole theme,or just the specifically on the product,page,itself or the product section itself so,we go to a shopify,backend and go look at a online store,we can look at the debut theme as an,example,so first of all if you wanted to,customize the button colors,you'd go to customize you go to the,theme editor,and then you can check out your product,and see the colors there you can go to,the product page,and you can see the same as well so to,change it through the theme editor you,would go,to the theme settings and then you will,go to,colors and in there you can change the,primary button colors,so if we try changing this to red it,will change all your themes buttons,such as the product here and the,subscribe button,and the checkout button and so forth,so if that's not what you're wanting and,you're just wanting to change,the colors of just the product page,itself,for many reasons such as you know making,a standout,point of difference then we can do this,by editing some code,so we go back out to the theme,page we'll go to actions,and then edit code,when the theme editor appears there's,one specific file that we want to look,for,and that file is called theme dot css,so this file um it can be a bit,confusing with the,amount of files in here um but if you go,down it's under the assets folder,that's this one called theme.css the,other way that you,can find this quite easily is type theme,and the file,direct3 and then just,open that up as it will only show the,files that has that,word in it so this theme.css file,is a file that kind of governs all of,your styling,and look of your website so what we want,to do is just go,straight down to the bottom we'll ignore,everything,in there and just go to the bottom maybe,make a few lines,extra and we'll add some code in so how,this file works,is that anything that you put at the,bottom,um it reads from top to bottom so the,bottom,is read last so it kind of replaces,whatever,styling you have um beforehand,so what we want to do is we'll add in,some code to replace the aftercard,button color,so we'll try that first so i've got some,code prepared,already to save time and to add to cut,part and color we'll test that first,so this is the color we want changed um,so this is,the attica button color add a comment,just so we remember what it's for,now we save this,and go to the front end and refresh this,you can see that now it has changed to,uh blue,with black font and red border so,you can also see that when on hover that,needs to be changed as well,to whatever matches your style so,it's very much the same code now we'll,add a few more lines,and add it right beneath the previous,code we added,so rather than just the accent code,we're adding we're adding a hover,section,with a different color so now that we,can control,both of them you can make them the same,color if you wish to,but we're just changing it so it looks,slightly different and we can recognize,the differences quite easily,we'll save this and then we'll go back,to the front end and we'll refresh the,page,and you can see that the hover color is,also changed,now we do the same with the byte in our,button color and at this time i just,copy the whole,block to change the color and the hover,so enter new space and then,paste and as well and then save,and then i've just made it the same,color as above so,we can easily recognize them so refresh,the page in the front end,and you can see that the colors are now,what we said it to be,so you can see that if we,try look at other colors though it is,still the same,not this one because this is a slightly,different style,and it's not affected by a current code,but if you click add to cart,this is actually the same color you can,consider leaving it to be the same,but if you want to just be,this part that's changing then we must,need to do another,thing um to target this section alone,so how we can do that is we'll right,click and go,to inspect i'm using google chrome as a,browser but,all of the browsers generally have an,inspection,kind of tool so what we want to try and,find out,is how can we focus on this one,section alone so we go to selecting an,element up here,let's hover over here and kind of see,what the section,is so this looks like the one that i,like,um here which targets this one section,so if i click here you can see that the,product single meter covers that area,so if we just copy this code over,to our theme file,it will just focus on this section,so we'll copy this and go back to our,editor,and we'll add this part into all of our,code it does need a full stop,as that is the class of this section,and once we add the product single meter,in front of all of them,and save what that means is it only,focuses on that section with all of the,previous code that we've added,so we go back to our front end,we will refresh the website and now if,you click add to cart,you can see that this is now back to,normal because,the code we've added does not affect,this part anymore,so this would just be edited through,your theme editor as per usual,and this is overriding your theme editor,styling if that makes sense so that is,pretty much,it in a nutshell um the only other thing,you like to consider obviously is,changing the colors,of these kind of put two bright colors,here,um so these are called hex colors and,you can just google hex colors and copy,and paste,whatever color you prefer,and that is pretty much,it for the debut theme so if we want to,consider another theme,you can absolutely do the same thing so,we've got,brooklyn and minimal theme here as well,as an example,if we go to edit the code for that,and then the same thing you want i,define theme dot,css however you can now see that,everything,can look slightly different um in terms,of the files and the coding,so for brooklyn you have to lock up the,same,file name but it's called theme.scs,in serafind.s css but it'll still come,under the assets folder,so we open up this file again we'll go,all the way to the bottom,we'll add in the same color code that we,added before but this time we don't want,to add the product,meta part because that is actually,different for the themes,so all the themes actually have,different codes as you,probably would have realized by now but,you can see that this is now the same,color so if we,again want to do this for another theme,you can do this for um,a minimal thing so we can go to edit,code,then we'll go to find the same file,so this is actually still called,theme.css.liquid as well,again scroll down on the very bottom add,this code,in and save and if we,preview this should now also be the same,color you can see that actually,for minimal theme it's different um,so the code might not apply for this one,so if we look at this theme the minimal,theme,so we'll take a look at to see why this,button doesn't change color,is because this one actually is called,button secondary,it doesn't have the accent part,so if we go back to here,and remove this part because it's,different,and save and this is for the minimum,wall theme only,so everything can be slightly different,and go back here and refresh your page,you can see it is now gone back to,the regular um color that we wanted it,to be changed to,all right so that's the color changing,in a nutshell again if you want to,specifically target a section,you have to look at the section by,inspecting,and then just finding that section to,add in front of the code,so for example again um it is,product meta and the debuffing that we,did,and um so that won't change,any of the other colors,thank you very much and that's it for,today if you have any questions,please comment or ask through the video,if you liked the video please like and,subscribe and,i'll catch you later thank you

Congratulation! You bave finally finished reading how to change add to cart button shopify and believe you bave enougb understending how to change add to cart button shopify

Come on and read the rest of the article!

Browse More Content