Allow cart to have shipping selection

Created on 17 January 2018, almost 7 years ago
Updated 16 August 2023, over 1 year ago

It would be nice if we could support selecting a shipping service on the cart page.

aug 23, 2018

Functional:

  • We can add a view area to the cart form.
  • We are able to input our postal code and get available shipping method for our order.
  • Geocoder module properly handles "translation" of postal code to address.
  • When we select a shipping method is saves it to the order and updates the total.
  • We can use the browser-provided coordinates to also get the address.
  • Basics of shipping address carry over to Order Information page (country, locality, city and postal code).

Todo / Not working:

  • Some weird UX bugs need to be ironed out, e.g the default selected method doesn't properly update the totals (as it probably should).
  • Feedback for behaviour in #13-#18 - this doesn't seem to be directly related to the patch but moreso the Commerce cart or how Shipping's implementation works.
  • We need to look into implementing a condition based on the order's and not the grand total, since it's possible a more expensive shipping option will make us inellegible for another (thus removing it from the estimates).

At this point it's really just polish but still needs review so we'll see. Tests are sort of out of the question (at least right now) since we rely on geocoder and external APIs and we can't always predict their results, and we can't include API keys in our tests.

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇺🇸United States joshmiller Indianapolis, Indiana, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada mastap

    Is this supposed to be usage/functional?
    I am looking for a solution to provide estimation in the cart for anonymous users.
    But this does not work. Any advancement or pointers?

  • 🇨🇦Canada mastap

    This patch does not not work for D10 yet. A few issues to iron out.
    Seems international is not implemented... Postal code issues if you need for another country than USA and CA.
    So this patch at this point is not complete. Wondering if we should rely on some advancement, or we're on our own. ;)

    Commerce Cart Estimate
    -The user does not have the option to change the shipping Method.
    -The Canadian taxes are not getting calculated based on the shipping location.

    So I was wondering if there was any clue on proper directions.

Production build 0.71.5 2024