FilterItemsWithoutPricePlugin returns incomplete cart data in dev-master

simo.savonen
simo.savonen Spryker Solution Partner Posts: 22 🧑🏻‍🚀 - Cadet

Environment:

  • Upgraded to dev-master for Bootstrap 5 compatibility
  • Issue does not occur in production (stable versions)

Issue:
After updating to dev-master, FilterItemsWithoutPricePlugin in PreReloadPlugins returns incomplete cart data - it appears to return only the last added item (my guess).

Impact:
Our custom cart cleanup plugin (which checks if physical items remain in cart) receives partial cart data and incorrectly empties the cart for Glue API responses. The actual cart in the database is untouched. Refetching the cart returns all items correctly.

Resolution:
Commenting out FilterItemsWithoutPricePlugin resolves the issue. We worked around it by creating a PostReload variant of the plugin.

Question:
Something changed in dev-master that causes FilterItemsWithoutPricePlugin to filter items incorrectly. Has the plugin behavior or reload flow changed?

Tagged:

Answers

  • profuel
    profuel SSA Sprykee Posts: 106 🪐 - Explorer

    Thank you for reporting the issue, we are looking into it!

  • profuel
    profuel SSA Sprykee Posts: 106 🪐 - Explorer

    Recently, as you mentioned, we released performance updates to the method used in the plugin you mentioned.

    We cannot identify an issue from our side.

    Please confirm that configuration in \Pyz\Zed\PriceCartConnector\PriceCartConnectorConfig is correct and is not removing by mistake items from the cart as duplicates.

    If the issue still persists, please provide a scenario how to reproduce it.

  • simo.savonen
    simo.savonen Spryker Solution Partner Posts: 22 🧑🏻‍🚀 - Cadet
    Adding a config that mentions both SKU and GROUP_KEY has solved it. 

    public function getItemFieldsForIdentifier(): array
    {
    return [
    ItemTransfer::SKU,
    ItemTransfer::GROUP_KEY,
    ];
    }

    I'm happy that it's working, cannot really investigate further. Thanks for the tip, and directing me away from the initial wrong idea.