aimeos / ai-controller-frontend

Aimeos frontend controler
GNU Lesser General Public License v3.0
26 stars 19 forks source link

Checkout shows error: ‘Service “delivery” already in basket’ #21

Open SomeBdyElse opened 2 months ago

SomeBdyElse commented 2 months ago

After an update of the ai-controller-frontend from https://github.com/aimeos/ai-controller-frontend/commit/6510433ea0f6c3691d42b8e7aec08a39866d846e to https://github.com/aimeos/ai-controller-frontend/commit/8183c0cd2b7e45cbefc8ca22b61643d29de92f6f (because of CVE-2024-39325) we experience issues in the checkout process.

Once a user picks his/her delivery method, the error message 'Service “delivery” already in basket' appears. The user cannot continue the checkout process.

We reverted the update for now and will investigate whether it is something special with our custom installation. In case other people experience the same issue, please let me know.

We are on aimeos/aimeos-typo3 b0e92f22, so I guess our installation is pretty old.

SomeBdyElse commented 2 months ago

The exception Service "%1$s" already in basket that we see has been introduced in Commit https://github.com/aimeos/ai-controller-frontend/commit/5ca9a84777700491533eef78d22e57b5152613c8 on 2022-09-28. So I assume the issue has nothing to with the recent security update but is rather related to some checks that have been introduced a long time ago.

aimeos commented 2 months ago

It seems like the Autofill plugin adds the service again after it has been removed and before the new one is added. One possible solution would be to disable the basket event system but not sure if that causes more trouble.

aimeos commented 2 months ago

The problem should be be fixed now. Can you please update aimeos/ai-controller-frontend to the latest .x-dev Version of the branch you are using and check?

SomeBdyElse commented 1 month ago

Hi @aimeos !

Unfortunately, https://github.com/aimeos/ai-controller-frontend/commit/c8ccfeb3f40ef2f5db721e4459ece3451d76ffa7 did not fix the issue for our shop. The message Service “delivery” already in basket still appears after the selection of the delivery method.

I noticed, that once I put the first item into my cart, the cart list already contains a shipping method (PostPac Economy). I guess this is the default shipping method configured for this shop.

After I enter my shipping address and click next, I get to the shipping method screen. There I can already see the updated shipping method in my basket. At the same time I get to select my shipping method (out of a list with only one item). But once I try to select the one available item, I get the error message.

I took a series of screenshots to show the user journey:

01

02

03

04

05

06

This is with c8ccfeb applied.

I assume that this issue is specific to our shop, as nobody reported it yet.

aimeos commented 1 month ago

The problem has been fixed in 2022.10+ but wasn't fixed in 2021.10 and before because officially it's not supported any more. We've backported the fix to 2021.10 for you now. Use 2021.10.x-dev to test.