What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: After disable the dynamic checkout button, the buy it now button disappeared

After disable the dynamic checkout button, the buy it now button disappeared

weibincheng
Excursionist
13 0 2

I don't want a dynamic checkout button. When I disable the dynamic checkout button, the checkout button disappeared, and I wanted to Buy it now instead.
I'd appreciate it if anyone could help.

Replies 5 (5)

weibincheng
Excursionist
13 0 2

Finer
Shopify Partner
2612 551 904

@weibincheng the "buy it now" Button is the default fallback button is none of the express payment options can be assigned to the button. Therefore, it is not possible to set it as default, without the deactivation of the payment methods.

- Did my answer help? Mark my post with a like
- Did I solve your problem? Mark my post as an accepted solution.
- You need professional help? Contact our Shopify Partner Agency
weibincheng
Excursionist
13 0 2

Hi Finer, Thank you very much for your answer. So I only turn on the dynamic checkout button to get the buy button, and if I disable it, Is it just "add to cart" on the product? 

Finer
Shopify Partner
2612 551 904

@weibincheng correct.

- Did my answer help? Mark my post with a like
- Did I solve your problem? Mark my post as an accepted solution.
- You need professional help? Contact our Shopify Partner Agency

tim
Shopify Partner
3911 394 1435

You may though, disable express checkout buttons, but supply a button of your own.

 

If your theme has a "Custom Liquid" or "Custom HTML" block for main product info section, you can add one right below you cart button and paste a code like this:

{% if product.available  %}
  <div class="v-stack gap-4">
    <button type="button" class="button button--xl button--outline" onclick="buyNow()">
      <div>Buy now</div>
    </button>
  </div>
  <script>
      function buyNow() {
        let variantId = {{ product.selected_or_first_available_variant.id }};

        let search = location.search.match(/variant=(\d+)/);
        if (search) variantId = search[1];

        let url = `${Shopify.routes.root}cart/${variantId}:1`;
        location.assign(url);
      }
    </script>
{% endif  %}

 

The code should show a button, which, when pressed will redirect visitor to checkout with currently selected variant in cart.

Screenshot 2024-10-23 at 7.55.52 PM.png

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com