App reviews, troubleshooting, and recommendations
I am trying to display something in my extension, but only if a specific shipping rate is chosen. I'm already retrieving the shipping address the customer inputted in the checkout, but in my readings of the docs, I haven't seen anything that suggests also reading the Shipping Rate selection might be possible. Does anyone know if it is possible to detect when/which Shipping Rate a customer has selected in the checkout from within a checkout extension?
I've been trying a lot of things. Ran out of options
The Shopify checkout process is a closed system and doesn't provide a direct way to access the selected shipping rate from within a checkout extension. However, you can still implement this functionality using a workaround.
One option is to send the selected shipping rate information to your server and then have your server store the information in a database. Your checkout extension can then retrieve the information from the database to display the relevant information.
Another option is to include the shipping rate information in a hidden form field on the checkout page, and then pass the information to your checkout extension through the form data. In this case, you would need to write JavaScript to update the value of the hidden field whenever the shipping rate changes.
Regardless of which approach you choose, you'll need to use a server-side language, such as Ruby on Rails or Node.js, to store and retrieve the shipping rate information.
I hope this helps! Let me know if you have any other questions.
Hi! thank you. Do you know how to watch for changes in checkout? is there some listener function that can be implemented that will report back to the extension?
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025