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

Checkout still possible despite all shipping methods set to "backoffice only" #6137

Closed
filipefurtad0 opened this issue Oct 5, 2020 · 1 comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.

Comments

@filipefurtad0
Copy link
Contributor

Description

Observed while testing #6039

The error observed on /checkout page as shown on issue #5950 can as well be reproduced by setting all shipping methods as "backoffice only": after this, a user will see a similar error on checkout, in the "Shipping Info" section:
{{ fieldErrors('order.shipping_method_id') }}

This is not immediately visible - the user needs toggle this section in order to see something is wrong (see animation below). After inserting a valid payment method the used is able to checkout successfully.

However, in the backoffice:
In this situation, and despite the methods being set to backoffice, it does not seem possible to select one (see pic 2 - currently bug #6136 ); trying to ship the order is not possible, since no shipping method is set - this order leads to an error - see pic 3.

Expected Behavior

If all shipping methods are set to backoffice, then checking out as a customer - through /checkout page - should not be possible.

Actual Behaviour

Despite all shipping methods being set as "back-office only", customers are able to checkout through the shopfront. This leads to to other errors in the backoffice - issue #6136.

Steps to Reproduce

Log in as admin

  1. Have an OC with products in stock + payment methods set up.
  2. Set all available shipping methods as "Backoffice only". You can double check this under /admin/shipping_methods

As a (guest-)customer
3. Visit the shop above, inserting some items in the cart
4. Proceed to checkout.
5. On checkout, do you notice anything unusual? Now toggle "Shipping Info" section.
6. Error {{ fieldErrors('order.shipping_method_id') }}
7. Insert valid payment data and checkout
8. Checkout should be possible, despite no shipping method being set -> bug.

Log back in as Admin (issue #6136 )
9. Check the newly placed order on the backoffice
10. Verify that you can't set a payment order and ship the order.

Animated Gif/Screenshot

Gif 1
no_shipping_meths

Pic 2
image

Pic 3
image

Workaround

Setting at least one shipping method as "Both Checkout and backoffice" allows to define a shipping method, but this is rather a workaround for issue #6136 .

What would be the workaround, if one wants to prevent customers from checking out, but wishes to keep shipping methods in the backoffice? Not sure.

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used: v3.2.8
  • Browser name and version: Firefox 81
  • Operating System and version (desktop or mobile): Desktop Ubuntu 20.04

Possible Fix

Relates to #5392.

@filipefurtad0 filipefurtad0 added the bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. label Oct 5, 2020
@filipefurtad0
Copy link
Contributor Author

filipefurtad0 commented Sep 21, 2021

Checking out used to be possible under this scenario, but now breaks:
https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/614a0e96f3fa8e0008cd2936?event_id=614a0e960080dd9956940000&i=sk&m=nw

This is duplicate of #8219; closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.
Projects
None yet
Development

No branches or pull requests

1 participant