Personalized checkout and custom promotions with Shopify Scripts
can somebody help with how to add a icon to the add to card button in theme sense?
To add an icon to the Add to Cart button in the Sense theme, you can follow these steps:
Go to your Shopify admin and click Online Store > Themes > Actions > Edit code.
In the Assets folder, open the base.css file.
Add the following code to the bottom of the file:
.add-to-cart {
background-image: url(/assets/icon.svg);
background-position: left center;
background-repeat: no-replace;
padding-left: 20px;
}
Replace icon.svg with the name of your icon file.
To center the icon, you can add the following code to the .add-to-cart CSS class:
background-position: center center;
You can also adjust the padding-left value to change the distance between the icon and the text.
Here is an example of a complete .add-to-cart CSS class:
.add-to-cart {
background-image: url(/assets/icon.svg);
background-position: center center;
background-repeat: no-replace;
padding-left: 20px;
}
Once you have added the CSS code, you can upload your icon file to the Assets folder in your theme.
Your icon file should be in SVG format and should be at least 20px wide and 20px tall.
Once you have uploaded your icon file, you can publish your theme and the icon will appear on the Add to Cart button.
it didnt work.
I made a new asset with the svg code in it. and did the asset name in the code u gave me.
Great! Once you have added the CSS code and uploaded your icon file, you can publish your theme and the icon will appear on the Add to Cart button.
Here are some additional tips:
User | RANK |
---|---|
2 | |
2 | |
2 | |
2 | |
2 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023