Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Checkout: add error message when no shipping methods are available to the customer #9536

Conversation

jibees
Copy link
Contributor

@jibees jibees commented Aug 8, 2022

What? Why?

Closes #9145
This adds a flash error message when no available shippings methods:
Capture d’écran 2022-08-08 à 16 25 49
Capture d’écran 2022-08-08 à 16 42 56

What should we test?

No shipping methods can occurs either:

  • hub didn't configure any shipping methods
  • no shipping methods are available due to tag rules

Release notes

Changelog Category: User facing changes

@jibees jibees self-assigned this Aug 8, 2022
@jibees jibees force-pushed the 9145-Splitcheckout,-add-error-message-when-no-shipping-methods-are-available-to-the-customer branch from a8b811b to cf0bd39 Compare August 8, 2022 15:29
Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good but needs a conflict resolution. Moving to dev.

app/controllers/split_checkout_controller.rb Outdated Show resolved Hide resolved
@jibees jibees force-pushed the 9145-Splitcheckout,-add-error-message-when-no-shipping-methods-are-available-to-the-customer branch from cf0bd39 to f0f2872 Compare September 5, 2022 12:54
@drummer83 drummer83 self-assigned this Sep 7, 2022
@drummer83 drummer83 added the pr-staged-uk staging.openfoodnetwork.org.uk label Sep 7, 2022
@drummer83
Copy link
Contributor

Hi @jibees,
Thanks for this one! 💪

Before this PR

I have first tested before staging your PR to reproduce the issue. You can see the useless error message in the screen capture below.

All shipping methods are set to backoffice only

Split checkout:
Peek 2022-09-08 00-39
Legacy checkout:
image

Shipping method is hidden through tag rules:

Split checkout:
Peek 2022-09-08 00-44
Legacy checkout:
image

Shipping method is shown through tag rules:

Split checkout:
Peek 2022-09-08 00-47
Legacy checkout:
image

After this PR

All shipping methods are set to backoffice only

Split checkout:
Peek 2022-09-08 01-11

Legacy checkout:
unchanged

Shipping method is hidden through tag rules:

Split checkout:
Peek 2022-09-08 01-10

Legacy checkout:
unchanged

Shipping method is shown through tag rules:

Split checkout:
unchanged

Legacy checkout:
unchanged

I have nothing else to ask for. This one is ready to go! 🎆

@drummer83 drummer83 removed the pr-staged-uk staging.openfoodnetwork.org.uk label Sep 7, 2022
@mkllnk mkllnk force-pushed the 9145-Splitcheckout,-add-error-message-when-no-shipping-methods-are-available-to-the-customer branch from f0f2872 to d878d91 Compare September 8, 2022 02:13
@mkllnk
Copy link
Member

mkllnk commented Sep 8, 2022

I resolved a conflict and will merge once specs pass.

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we have a related spec failure now. Back to In Dev.

@jibees
Copy link
Contributor Author

jibees commented Sep 8, 2022

It looks like we have a related spec failure now. Back to In Dev.

Seems to be unrelated to this branch, as it also occurs in master: https://github.com/openfoodfoundation/openfoodnetwork/runs/8240457288?check_suite_focus=true

Since, merging #9631

I'll open an issue, and try to resolve it.

@jibees jibees mentioned this pull request Sep 8, 2022
@sigmundpetersen
Copy link
Contributor

This is probably good to go then?

@jibees jibees force-pushed the 9145-Splitcheckout,-add-error-message-when-no-shipping-methods-are-available-to-the-customer branch from d878d91 to 86cb86e Compare September 12, 2022 07:42
@jibees jibees merged commit 5a4b38e into openfoodfoundation:master Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Split-checkout] Add a clean error message to customer when checkout fails due to absence of shipping methods
4 participants