magmodules / magento2-channable

Channable Connect for Magento® 2
https://marketplace.magento.com/magmodules-magento2-channable.html
BSD 2-Clause "Simplified" License
28 stars 40 forks source link

[REQUEST] Simple products associated with 2 configurables are not exported #200

Closed boldhedgehog closed 6 months ago

boldhedgehog commented 1 year ago

If simple products are associated with 2 configurable products, and one of them is disabled, simple products are not exported.

Example: Simple product S is associated with configurable products A (enabled) and B (disabled).

Although, it should be exported to the feed, it is missing.

This is caused by this code: https://github.com/magmodules/magento2-channable/blob/master/Model/Generate.php#L128

if ($parent = $parents->getItemById($parentId)) {
    continue;
}

The loop first assigns $parent to product A, then assigns it to NULL, because B is not in the parent collection items.

The correct version should be:

if ($parents->getItemById($parentId)) {
    $parent = $parents->getItemById($parentId);
    continue;
}
Frank-Magmodules commented 6 months ago

Hello @boldhedgehog, I'm happy to inform you that your request has been incorporated into our latest release. Thanks for bringing this up. I'll mark this request as closed since I believe we've addressed it to your needs. However, if you have any further questions or comments, please don't hesitate to reopen or add your thoughts to this issue immediately!