What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

{{ content_for_additional_checkout_buttons }} not loading dynamic checkout buttons

{{ content_for_additional_checkout_buttons }} not loading dynamic checkout buttons

rachelrianne
Shopify Partner
2 1 14

Hey Shopify Dev mindhive,

 

Hoping you can give me some help here – 

 

I recently updated my client's store theme. The cart should be showing two dynamic payment buttons, Shoppay and Gpay, but they show inconsistently especially on mobile. I'm trying to figure out what's going on, but am having trouble with it.

 

A few important aspects of the issue:

 

  • {{ additional_checkout_buttons }} shows as true even when {{ content_for_additional_checkout_buttons }} doesn't reveal anything. You can see this in the "missing checkout buttons" screencap, where it loads the correct HTML but no buttons.
  • No JS errors to note
  • I checked this partners blog post where it says if you're using an AJAX cart (I'm not in this case, it's a pure /cart page), use the code below to reinstate the checkout buttons. TheShopify constructor does not contain the object StorefrontExpressButtons
    • if (window.Shopify && Shopify.StorefrontExpressButtons) {
        Shopify.StorefrontExpressButtons.initialize();
      }
  • I've had a similar issue happen on another site, but it's an AJAX cart issue so may be caused by something else. But I'm wondering if it's an issue with another app or the {{ content_for_header }} code failing to load the buttons.

 

Any thoughts or ideas are appreciated!

 

 

koeppel-design-cart-checkout-code.png

koeppel-design-checkout-missing.pngkoeppel-design-checkout-shown.png

Reply 1 (1)

alefy
Tourist
4 0 2

I'm facing the same issue