Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Change background color on Buy Button Product

Change background color on Buy Button Product

wayne_hines
Shopify Partner
6 0 1

Hi, I am using the Buy Button on this clients website and want to format how the collection displays on the page.

When creating the Buy button collection it seems you can change the color of the button, details & cart page but not the product display.  

If you view the page https://vbdev.com.au/ssindustries/?view=article&id=325&catid=56 I would like a white background on each product with a 25px padding.

I am able to create the look using dev tools by adding the following CSS

.shopify-buy__product

{background-color: #ffffff; padding:25px;}

 

This issue is I cant find where to add it or where to modify it.

The attached file is what I am trying to acheive

Hope you can help

Thanks

Wayne

shopify_css.png

Replies 12 (12)

Dan-From-Ryviu
Shopify Partner
10264 2039 2110

Hi @wayne_hines 

You can attach this code within your buy button 

<style>
.shopify-buy__product { background-color: #ffffff; padding:25px; }
</style>

 

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- 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.

Abdosamer
Shopify Partner
938 173 193

Hi @wayne_hines , you can add the following code in theme editor  using custom css:

 

.shopify-buy__product + .shopify-buy__product {
    margin-top: 0;
    background: #fff;
    padding: 25px;
}

 

Buy me a Coffee
Email : abdelrahamansamer71@gmail.com
Chat on WhatsApp
My work

wayne_hines
Shopify Partner
6 0 1

Hi @Dan-From-Ryviu  & @Abdosamer 

Thank you for your quick replies. I had already tried that but have added it again and it does not make a difference. 

Appreciate any other suggestions

Thanks

Wayne

 

Sample  of code added 

<style>
.shopify-buy__product + .shopify-buy__product {
margin-top: 0;
background: #fff;
padding: 25px;
}
</style>
<div id='collection-component-1699932266088'></div>
<script type="text/javascript">
/*<![CDATA[*/
(function () {
var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';

Dan-From-Ryviu
Shopify Partner
10264 2039 2110
Hi, I remember it has option to customize when you create Buy Nows buttons.
Could you try to edit in that way?

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- 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.

wayne_hines
Shopify Partner
6 0 1

Hi, Thanks again but I cant see any option to customise during the creation of the button. I have gone back and created a brand new button and cant see any way to do it. Any clues

Thanks

Wayne

Abdosamer
Shopify Partner
938 173 193

Can you provide a screenshot of the theme editor when choose this section?

Buy me a Coffee
Email : abdelrahamansamer71@gmail.com
Chat on WhatsApp
My work
wayne_hines
Shopify Partner
6 0 1

Thanks, here it is attached.

If there is another theme that has the option, please let me know. I can change themes as we are only using the Buy Button

 

Thanks Again!!!

 

shopify_css2.png

Dan-From-Ryviu
Shopify Partner
10264 2039 2110

Could you check is there any option to customize in Layout and Advanced settings?

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- 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.

wayne_hines
Shopify Partner
6 0 1

I have looked in both areas and there is no options (have attached images). I also looked at 4 other sites taht I look after with different templates and they are all exactly the same.

Appreciate any other ideas

shopify_css3.png

shopify_css4.png

  

Dan-From-Ryviu
Shopify Partner
10264 2039 2110

So please try add the code I provide to header file of platform that you are using 

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- 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.

wayne_hines
Shopify Partner
6 0 1

Thanks Again..

I have added the css into the website (Joomla) and it will not show through the Shopify Injection. Not sure if Shopify will block any external override, I even tried making the code !important. It is in there now if you want to have a look.

Im think that the overide or altered code will need to come from Shopify.

Hope there is a solution.

 

Dan-From-Ryviu
Shopify Partner
10264 2039 2110

I hope so!

- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- 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.