shopware-variant-switch icon indicating copy to clipboard operation
shopware-variant-switch copied to clipboard

Bug add extension on null

Open ChristopherDosin opened this issue 2 years ago • 2 comments

in one of our Shopware 6 shops we have two other plugins active in addition to your plugin.

That would be “shopping cart free products / goals | by 28minds” and “Award Items”. As soon as a free product or a bonus item (using these plugins) is placed in the shopping cart, your plugin will issue an error message. In the CartPageLoadedSubscriber.php file, in line 122 of the addLineItemPropertyGroups function, the $lineItem parameter is set to zero, which leads to an error. Would it be an option here to include an if statement that checks whether $lineItem !== is null?

image

ChristopherDosin avatar Nov 30 '22 12:11 ChristopherDosin