A user is experiencing issues with a custom shipping cost estimator in their Shopify cart drawer on neosino.at.
The Problem:
They want to remove the separate subtotal section and display only the subtotal amount inside the “Shop Now” button
The button frequently shows “Estimating shipping” (“Berechne Versand…” in German) instead of the actual subtotal
This occurs especially in fresh sessions (incognito mode) and when the cart updates dynamically
Technical Details:
Custom JavaScript has been added to cart-drawer.liquid but isn’t connecting properly to the button
The subtotal should display immediately when items are added to cart
User provided a screenshot showing the desired final appearance and referenced esn.com as inspiration
Status: The issue remains unresolved with no responses yet. The user is seeking help to ensure the subtotal always displays as a number in the button, eliminating the “Estimating shipping” placeholder text.
Summarized with AI on October 29.
AI used: claude-sonnet-4-5-20250929.
On neosino.at I have successfully built in the shipping cost estimator bar, but I have a problem.
I want to delete the subtotal section completely and only have the subtotal amount displayed inside the “Shop Now” button.
In my cart-drawer.liquid, I have already added some JavaScript, but I can’t figure out how to connect it properly to the “Shop Now” button. Most of the time, the button shows “Estimating shipping” instead of the actual subtotal amount, and I want to avoid that.
It should always display the correct number (the subtotal) as soon as there’s something in the cart.
When I open the store in an incognito tab and add something to the cart, it still says “Estimating shipping” - in German: Berechne Versand…, so it’s not displaying the right value.
Does anyone know how to make the subtotal always appear as a number inside the button, even on a fresh session or when the cart drawer updates dynamically?
In the end, it should always look like this, so no Estimating shipping” - in German: Berechne Versand…
Cart drawer code can be a different file/location than cart page code.
Or there is an initial template that needs to be customized
You’d just update the buttons contents using your custom javascript.
If your referring to using buy-buttons/accelerated-checkout buttons those may render dynamically AFTER the page loads.
I can hear that your button text is being updated ahead of the cart.js or the cart drawer state, but it has not yet received the cart subtotal yet, that is why it is still displaying and not yet the actual number of what it is going to cost you to have.
The AJAX cart or drawer system in Shopify requires you to re-render the subtotal within your JavaScript function (generally), not only on loading the page. Try something like:
I can look briefly at your cart-drawer.liquid and JS structure to demonstrate where to get this connected-in without disruption of the current shipping estimator. At other times it is merely a case of placing one line or putting the listener in the appropriate position.
I’ve tried to fix it but honestly, I don’t really have an idea of the problem. Would it be possible for you to access the shop and look at the code itself?
Hi Paul, I wanted to kindly ask if you could get access to my shop and fix it in the code, because I can’t seem to fix it myself. It would be very much appreciated.
That’s because your button text changes before Shopify finishes retrieving the cart information. To fix this, just ensure your Javascript waits until the cart object is loaded before reading then reads cart.total_price every time your drawer refreshes.
In your cart-drawer.js, something along the lines of the following:
function updateCartButton() {
fetch(‘/cart.js’)
.then(res => res.json())
.then(cart => {
const total = (cart.total_price / 100).toFixed(2) + ’ €’;