Page 1 of 2

Shipping costs disappear from basket

Posted: 26 Jul 2017, 17:18
by Innonic
Hello,

I encountered the following problem:

I have an item with a weight of 600g. The delivery is a DHL package up to 2kg.

When I'm in the basket view and I click on '+' the shipping costs disappear when I reach 4 items. 4 items mean, there's a weight of now 2400g. That means, need the DHL 5kg package now. If I click '+' another time, the shipping costs are visible again. And if I press '-' afterwards, they are also visible for 4 items.

Same, when I reach 9 items. 9 items mean 5400g and a DHL 10kg package. Shipping costs disappear and reappear.

See images 1 - 4.

It seems, there's some problem when switching the Delivery option. Is there any solution, yet?

Thanks in advance!!!

Re: Shipping costs disappear from basket

Posted: 27 Jul 2017, 10:57
by aimeos
Can you please post a screenshot of your Service and Plugin entries from expert mode including all configurations?

Re: Shipping costs disappear from basket

Posted: 28 Jul 2017, 14:12
by Innonic
I added the screenshots. I hope it is, what you requested. There is still much left in the original condition.

Thank you for your help!

Re: Shipping costs disappear from basket

Posted: 28 Jul 2017, 20:08
by aimeos
Guess, the isAvailable() method of your decorator returns false for all delivery options for this condition. You have to debug why this happens. Best thing is to add some statement to output the result at the line where it returns false.

Re: Shipping costs disappear from basket

Posted: 02 Aug 2017, 13:28
by Innonic
So I checked the isAvailable() method.

Depending on the values, it's behaving correctly.

I have 8 items (600g) in the basket. I add another one and the currently printed values are:
Current weight is 5400.0g while min weight is 2000.1g and max weight is 5000.0g.
That is absolutely correct for the 5kg DHL-package. But there is a 10kg DHL-package defined, which matches.

It seems, that only the package category is checked, that we are already in (5kg package). If I add another one everything's allright again and we're in the 10kg package category.

If I remove one item, it's ok, still the 10kg package. If I remove another one, it's like above.

I can see in both cases, that the 2kg package option has been checked before. But it neither seems to check the 5kg option while we're in the 10kg package category nor the 10kg option while we're in the 5kg package category...

I don't get it since it works when another item is added/removed... It's just when the package category is switched...

Re: Shipping costs disappear from basket

Posted: 02 Aug 2017, 17:21
by aimeos
Can you exchange the positions of the Autofill and ServicesUpdate basket plug-ins? (ServicesUpdate: 0, Autofill: 1)

Re: Shipping costs disappear from basket

Posted: 04 Aug 2017, 09:53
by Innonic
Can you exchange the positions of the Autofill and ServicesUpdate basket plug-ins? (ServicesUpdate: 0, Autofill: 1)
That did the trick! Thank you so much.

One last question concerning this issue is:
In the Plug-In list, is it ok to have a position used twice?
I mean I now have got 'Autofill' on position 1 but also 'AdressesAvailable'. Should I move the positions in that way, that there's each position used once only?

Thank you again!

Re: Shipping costs disappear from basket

Posted: 04 Aug 2017, 09:57
by aimeos
The order of execution is random if the same position is used twice. That may work for some plugin combinations, for others not.

Re: Shipping costs disappear from basket

Posted: 10 Aug 2017, 09:52
by Innonic
Thank you for your support.

This issue can be regarded as closed.

Re: Shipping costs disappear from basket

Posted: 28 Aug 2017, 09:11
by Innonic
Need to reopen this issue:

Now I observed the same issue when removing articles from the basket. Scenario:

1. Step: I put a small artice into the basket. Shipping costs for small package are shown.
2. Step: I put a big article into the basket. Shipping costs for a big package are shown.
3. Step: I remove the big article from the basket. No shipping costs are shown.

If I change the number of articles (like we had in this isue), shipping costs are shown again.

Do you have any ideas for this use case, too? Thanks in advance!