Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product model not enqueued if modified #102

Closed
mmenozzi opened this issue Aug 27, 2021 · 2 comments · Fixed by #191
Closed

Product model not enqueued if modified #102

mmenozzi opened this issue Aug 27, 2021 · 2 comments · Fixed by #191
Assignees
Labels
bug Something isn't working

Comments

@mmenozzi
Copy link
Member

It seems that if someone modify a product model on Akeneo (without changing any variant-specific attribute, only model ones) the related variant products are not enqueued byt the Product importer.

Maybe is because in such situation Akeneo APIs do not return variants (products) as modified since the given date. Only parent product (product model). If this is the case, here:

/**
* {@inheritdoc}
* @psalm-return array<array-key, string>
*/
public function getIdentifiersModifiedSince(\DateTime $sinceDate): array
{
$products = $this->apiClient->findProductsModifiedSince($sinceDate);
$identifiers = [];
foreach ($products as $product) {
Assert::string($product['identifier']);
$identifiers[] = $product['identifier'];
}
return $identifiers;
}

We should also enqueue products of those product models modified since the given date.

@mmenozzi mmenozzi added the bug Something isn't working label Aug 27, 2021
@mmenozzi
Copy link
Member Author

Maybe this could be resolved with #157

@lruozzi9
Copy link
Member

Maybe this could be resolved with #157

Nope.

But I suggest adding a new ProductModel importer. This product model importer should dispatch N product import messages for any product in the product model. This will also solve a bug in the current version. If you submit the import of a product in the admin only the variants already existing in Sylius will be imported, not all the products on Akeneo!

@lruozzi9 lruozzi9 self-assigned this Dec 11, 2023
lruozzi9 added a commit that referenced this issue Dec 11, 2023
@lruozzi9 lruozzi9 linked a pull request Dec 11, 2023 that will close this issue
lruozzi9 added a commit that referenced this issue Dec 11, 2023
lruozzi9 added a commit that referenced this issue Dec 11, 2023
lruozzi9 added a commit that referenced this issue Dec 11, 2023
lruozzi9 added a commit that referenced this issue Dec 13, 2023
lruozzi9 added a commit that referenced this issue Dec 13, 2023
lruozzi9 added a commit that referenced this issue Dec 13, 2023
lruozzi9 added a commit that referenced this issue Dec 13, 2023
lruozzi9 added a commit that referenced this issue Dec 13, 2023
lruozzi9 added a commit that referenced this issue Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants