Dynamic checkout button not working

Topic summary

Issue: The dynamic “Buy Now” button behaves inconsistently—when the cart has items it redirects to checkout, but when the cart is empty it redirects to the home page. The poster is seeking a fix for this unexpected redirect.

Context: A storefront link (halamama.com) was shared after a moderator edit. No code snippets or images were provided.

Update: The “Buy Now” button was removed by the poster. They now want the “Add to cart” button text to change to “Proceed to checkout” after it’s clicked.

Constraints: The current theme does not offer a built-in option to change the button text or behavior as requested.

Status: No confirmed solution or workaround has been provided in the thread. The request for guidance on changing the button text post-click remains open and unresolved.

Summarized with AI on January 21. AI used: gpt-5.

If my cart count is more than 0 - Buy now button will redirect to checkout page

If my cart count is 0 - Buy now button will redirect to home page

How do I fix this?

Moderator Edit @Shopify_77

https://halamama.com/

Ok. I removed that buy now button. Then I need one more help.

If I click on add to cart button, is it possible to change the text to “proceed to checkout” ?

Nop. Theme isn’t provide anything.

1 Like