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?
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024