Change background color sold out button in Prestige theme

Change background color sold out button in Prestige theme

GurneyBrolin
Tourist
6 0 2

Hi together,

 

I am currently building my online shop and I have a problem with the color of the sold out button, because there is no possibility to define the background color in the theme editor.

But I want to define a grey color if no stock available. 

 

Has anybody an idea how to change it. 

 

Here is the code from the buy-buttons.liquid

 

<buy-buttons class="buy-buttons {% if show_payment_button %}buy-buttons--has-dynamic{% endif %}" template="{{ product.template_suffix | escape }}" form="{{ form_id }}">
        {%- if show_payment_button and atc_button_background == blank and atc_button_text_color == blank -%}
          {%- assign atc_button_style = 'outline' -%}
        {%- else -%}
          {%- assign atc_button_style = 'solid' -%}
        {%- endif -%}

        {%- render 'button', content: button_content, type: 'submit', disabled: button_disabled, style: atc_button_style, background: atc_button_background, text_color: atc_button_text_color, stretch: true -%}

        {%- if show_payment_button -%}
          {{- form | payment_button -}}

          <style>
            #shopify-section-{{ section.id }} .shopify-payment-button {
              {%- if payment_button_background != blank and payment_button_background != 'rgba(0,0,0,0)' -%}
                --button-background: {{ payment_button_background.rgb }};
              {%- endif -%}

              {%- if payment_button_text_color != blank and payment_button_text_color != 'rgba(0,0,0,0)' -%}
                --button-text-color: {{ payment_button_text_color.rgb }};
              {%- endif -%}

              {%- unless product.selected_or_first_available_variant.available -%}
                display: none;
              {%- endunless -%}
            }
          </style>
        {%- endif -%}
      </buy-buttons>
    </div>
  {%- endform -%}
{%- else -%}
  <buy-buttons class="buy-buttons" template="{{ product.template_suffix | escape }}" form="{{ form_id }}">
    {%- assign button_content = 'product.general.add_to_cart_button' | t -%}
    {%- render 'button', content: button_content, type: 'submit', background: variant_picker_block.settings.atc_button_background, text_color: variant_picker.settings.atc_button_text_color, stretch: true -%}
  </buy-buttons>
{%- endif -%}

 

Replies 3 (3)

Moeed
Shopify Partner
7121 1911 2348

Hey @GurneyBrolin 

 

Could you please provide your Store URL and, if applicable, the Password too? Your cooperation is greatly appreciated!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


GurneyBrolin
Tourist
6 0 2

Hi, sorry but I don't share my password and my Url will not help, because the store is currently not visible, due to that I am still preparing the launch. But if you need some more code information, just tell me. 

Moeed
Shopify Partner
7121 1911 2348

Hey @GurneyBrolin 

 

I need to have a look on your website to provide you a solution.

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications