Accepting credit cards, warehouses, and shipping and fulfilling orders
I'd like to add express checkout options to a site's cart drawer, in addition to the "Checkout Now" button. These appear on checkout, and I'd like them in the cart drawer as well (with an adjusted layout/position of the buttons):
I found this help article about adding buttons to the cart page itself, but it looks like it doesn't work as expected, according to this question.
Is there a way to setup/initialize these buttons on the cart drawer that may appear on pages other than cart and checkout. I'm experienced with javascript, so happy to code up a custom solution if anyone is able to point me in the right direction.
https://shopify.dev/tutorials/customize-theme-add-more-checkout-buttons-to-cart-page
{%- if additional_checkout_buttons -%}
<div class="additional-checkout-buttons">{{ content_for_additional_checkout_buttons }}</div>
{%- endif -%}
There's also the form type
{{ form | payment_button }}
Getting it to work with cart-drawers is dependent on which theme your using and how it handles the cart drawer.
The code that creates the Dynamic checkout buttons(DCB's) mostly runs after the the page loads in the customers browser.
most free themes use a javascript template system where the cart drawer is created|recreated on the customers side after this happens.
A dirty trick for things like this is to just generate the content offscreen elsewhere in the template then move it to where you need with javascript.
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024