How can I calculate tax rates on the cart page without user login?

How can I calculate tax rates on the cart page without user login?

matt55
Shopify Partner
7 0 1

Lets say I needed a shop to reach out to a third party api to get tax rate based on order total and zip code

This has to be calculated on the cart page and sent to another 3rd party as a cart attribute

But the client doesn't want a user log in before hitting the cart page

I would assume the only solution would be to have a zip code input and do the calculations there, then move them on to the shopify checkout

Reaching out here to see if anyone has any ideas on how to achieve this? with out a login ? I mean.. input right?

Replies 2 (2)

Elias
Shopify Staff
3076 300 537

Hey, @matt55.

Elias here with Shopify Support. Thank you for reaching out.

You can use a third-party app, such as Shipping Rates Calculator Plus, to calculate the shipping costs on the cart page and customers wouldn't be required to log into their accounts. Shipping Rates Calculator Plus, along with a some other alternatives found here, comes with a geolocation feature that can automatically detect the customers' location, or rates can also be displayed using the customers' ZIP code.  

Though I'm unable to say with absolute certainty whether a third-party shipping calculator app will work with your API, as this depends on the app and the API. However, the shipping calculators retrieve the rates from your shipping settings as opposed to retrieving them from your API. In theory, since your store retrieves shipping rates from the API, and the shipping calculator retrieves the rates from your store - then doesn't seem to be a problem. Nevertheless, this is something that I'd recommend testing on your store and seeing if you run into any issues. 

If you need any help with a third-party app, the app developers are always available to assist you. You can reach out to the developers directly through the contact information found in the Support section of their app's page. 

I'd love to know if this suggestion or something similar works for you. Keep me posted!

Elias | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

matt55
Shopify Partner
7 0 1
i had that thought too. Hooking into geocode and then getting the tax rate that way. Its a good thought .. let me pass it by the client, and show them the example of this !