Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi!
How on Earth do I change the style of my already existing buttons? It must be doable, right? Right now my Add to cart-buttons are unfilled and I want to change them to filled. But how? This really should be so easy...
Thanks.
Solved! Go to the solution
This is an accepted solution.
Go to product page customisation in the theme settings of your Refresh theme customisation and check the settings of the Buy buttons block which is "Show dynamic checkout buttons". Unchecked this checkbox, By unchecked this checkbox you can also filled out your button secondary to primary.
Hello @PernillaH, This buttons having the secondary button class with your theme settings, Turn them into the primary buttons with your theme customisation. Go to online store -> Open them customisation -> Go to your section settings and turn buttons into the primary buttons.
Feel free to reach out if you have any questions or need assistance.
Best Regards,
DWS.
Thank you!
I just can't find where I do the "Go to your section settings and turn buttons into the primary buttons". I can't change the button style in the theme settings Button adjuster, only change the colour. Can you please explain a little more specific?
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code -> Open your section and add this below settings of your schema into that and add condition of the button to that.
1. Section schema
{
"type": "checkbox",
"id": "show_secondary",
"label": "Enable Secondary button",
"default": false
},
2. Find that button code and add this condition to it in the class attribute.
{% if section.settings.show_secondary == true %}
button--secondary
{% else %}
buttton--primary
{% endif %}
Feel free to reach out if you have any questions or need assistance.
Best Regards,
DWS.
This is an accepted solution.
Go to product page customisation in the theme settings of your Refresh theme customisation and check the settings of the Buy buttons block which is "Show dynamic checkout buttons". Unchecked this checkbox, By unchecked this checkbox you can also filled out your button secondary to primary.
Thank you, it worked! I don't really understand why or if there will be any consequences from it, but for now it works, yay!
Hey @PernillaH
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<style>
.product-form__submit {
background: #8C0C0C !important;
color: white !important;
}
</style>
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024