Create non-dynamic "buy now" button on Dawn theme

I would like to create a “buy now” button that is not dynamic, so it does not change to payment options like apple pay or google pay. I have found that the current setup is confusing for customers, and I personally do not like the feel of it. Ironically, the way it looks in the editor is exactly how I want it to look:

I found this tutorial on how to do this, but it seems to not work on dawn theme: https://speedflytheme.com/how-to-add-a-buy-now-secondary-button-with-direct-checkout-on-shopify/

I believe that if there is a way to keep the current button, but change something in the code that makes it non-dynamic, that would be the best option because I want the button colors to stay the same, and when the dynamic button is completely removed, the add to cart button turns black, which I do not like the look of.

Any help would be greatly appreciated. Thanks!

Edit:

I have change the following code inside buy-buttons.liquid, which makes it look how I want it to look, but the button is not clickable:

{%- if block.settings.show_dynamic_checkout -%}
            

{{ form | payment_button }}

The messages at the end of this thread describe what I did here, but as stated above, the button was there but not clickable when I did this: https://community.shopify.com/c/technical-q-a/show-dynamic-checkout-button-as-always-unbranded/td-p/1279737

Hi @joshuafitz

You can do that by going to your Online store > Themes > Edit code > open buy-buttons.liquid file, find this line of code

{%- if show_dynamic_checkout -%}

Paste this code right above.

{% comment %} Dan - Buy now button start - Nov 04, 2023 {% endcomment %}
            {%- liquid
            assign check_against_inventory = true
            if product.selected_or_first_available_variant.inventory_management != 'shopify' or product.selected_or_first_available_variant.inventory_policy == 'continue'
              assign check_against_inventory = false
            endif
            if product.selected_or_first_available_variant.quantity_rule.min > product.selected_or_first_available_variant.inventory_quantity and check_against_inventory
              assign quantity_rule_soldout = true
            endif
          -%}
  
  
  
        
  {% comment %} Dan - Buy now button end {% endcomment %}

Thanks for the response @Dan-From-Ryviu

Unfortunately, there were still a few issues when I tried your code. The main one is that if there was another item in the cart, it would bring you to the checkout for that item, not the one currently selected. The other similar issue is that if you use the button and then go back to the product page, change the size, and then use it again, it will still have the old size selected when checking out.

I also could not get the styling the exact same as the default unbranded buy now button, but that is something I could figure out later myself.

It seems to me like there are many people trying to figure out how to do this but not any solutions, so any help would be appreciated.

Thanks!

1 Like