Shipping costs disappear from basket

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Innonic
Posts: 43
Joined: 24 Nov 2015, 21:03

Shipping costs disappear from basket

Post by Innonic » 26 Jul 2017, 17:18

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!!!
Attachments
img3.png
img3.png (46.44 KiB) Viewed 3712 times
img2.png
img2.png (41.49 KiB) Viewed 3712 times
img1.png
img1.png (45.99 KiB) Viewed 3712 times

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Shipping costs disappear from basket

Post by aimeos » 27 Jul 2017, 10:57

Can you please post a screenshot of your Service and Plugin entries from expert mode including all configurations?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Innonic
Posts: 43
Joined: 24 Nov 2015, 21:03

Re: Shipping costs disappear from basket

Post by Innonic » 28 Jul 2017, 14:12

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!
Attachments
plug-in.png
plug-in.png (89.59 KiB) Viewed 3705 times
service2.png
service2.png (123.52 KiB) Viewed 3705 times
service1.png
service1.png (130.13 KiB) Viewed 3705 times

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Shipping costs disappear from basket

Post by aimeos » 28 Jul 2017, 20:08

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Innonic
Posts: 43
Joined: 24 Nov 2015, 21:03

Re: Shipping costs disappear from basket

Post by Innonic » 02 Aug 2017, 13:28

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...

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Shipping costs disappear from basket

Post by aimeos » 02 Aug 2017, 17:21

Can you exchange the positions of the Autofill and ServicesUpdate basket plug-ins? (ServicesUpdate: 0, Autofill: 1)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Innonic
Posts: 43
Joined: 24 Nov 2015, 21:03

Re: Shipping costs disappear from basket

Post by Innonic » 04 Aug 2017, 09:53

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!

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Shipping costs disappear from basket

Post by aimeos » 04 Aug 2017, 09:57

The order of execution is random if the same position is used twice. That may work for some plugin combinations, for others not.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Innonic
Posts: 43
Joined: 24 Nov 2015, 21:03

Re: Shipping costs disappear from basket

Post by Innonic » 10 Aug 2017, 09:52

Thank you for your support.

This issue can be regarded as closed.

Innonic
Posts: 43
Joined: 24 Nov 2015, 21:03

Re: Shipping costs disappear from basket

Post by Innonic » 28 Aug 2017, 09:11

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!

Post Reply