FriendsOfShopware / FroshPlatformShareBasket

This plugin allows your customers to save the current basket and share it via link.
MIT License
13 stars 7 forks source link

Baskets from 6.4 not working in 6.5 #26

Closed yunits closed 1 year ago

yunits commented 1 year ago

PHP Version

8.2

Shopware Version

6.5.0.0

Actual behaviour

Existing baskets won't work because the new column "frosh_share_basket_line_item.payload" is null for existing baskets/frosh_share_basket_line_item entries.

If I am right, function loadCart loads lineItems with $this->addLineItems($cart, $salesChannelContext, $shareBasketEntity);

addLineItems uses getLineItems and so on.

At some place, maybe getLineItems, you could make null check against column payload and then try to get payload like in function prepareLineItems.

As workaround I will update my DB at SQL level and will fill payload with lowercase id from product or promotion_discount.

Expected behaviour

see above

Steps to Reproduce?

see above