Skip to content

Conversation

claudio-ferraro
Copy link
Member

This PR introduces a new feature to exclude families from being imported from Akeneo. This is useful for scenarios where certain families should not be synchronized to Magento.

Key changes:

  • Added a new configuration field "Families to Exclude" in the "Filter Products" section of the Akeneo Connector configuration.
  • Implemented logic to filter out products belonging to the excluded families during the import process.
  • Updated the README to document the new feature.

Import Logic Explanation:

  • "Families to exclude" is empty: Only the families selected in "Families to import" will be imported.
  • "Families to import" is empty: All families will be imported, except those selected in "Families to exclude".
  • Both selections are empty: All families will be imported.

image

@claudio-ferraro claudio-ferraro force-pushed the feature/exclude-families branch from cb0e78b to db32ad3 Compare January 7, 2025 12:52
return $this->scopeConfig->getValue(self::PRODUCTS_FILTERS_EXCLUDED_FAMILIES);
}

public function aroundGetFamiliesToImport(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can convert this to an after Plugin. Check if array is empty and if there are families to exclude then fetch all families to filter.

Copy link
Contributor

@rbnmulder rbnmulder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can convert this to an after Plugin. Check if array is empty and if there are families to exclude then fetch all families to filter.

@rbnmulder rbnmulder self-requested a review January 8, 2025 12:32
@claudio-ferraro claudio-ferraro merged commit 04741fd into master Jan 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants