Liquid, JavaScript, themes, sales channels
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 -%}
Hey @GurneyBrolin
Could you please provide your Store URL and, if applicable, the Password too? Your cooperation is greatly appreciated!
Best Regards,
Moeed
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.
Hey @GurneyBrolin
I need to have a look on your website to provide you a solution.
Best Regards,
Moeed
User | RANK |
---|---|
37 | |
29 | |
12 | |
12 | |
8 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023