Skip to content

MSI compatibility while being backward compatible #1739

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

thomas-kl1
Copy link
Contributor

@thomas-kl1 thomas-kl1 commented Apr 17, 2025

Summary

These changes fix the MSI compatibility. It also make this module unnecessary: https://github.com/algolia/algoliasearch-inventory-magento-2

algolia/algoliasearch-inventory-magento-2 is not really maintained anymore and many flaws exists as it does not really follow the changes introduced in the main module.
I've also noticed dead code.

The $product->getIsSalable() method use the alias added by MSI while it also fallback to simple inventory management when MSI is disabled.

I've also updated how the stock_qty is retrieved so it used the method that MSI have plugged, so if MSI is used, it's automatically compatible.

EDIT:

Change in ProductHelper is BIC

@thomas-kl1 thomas-kl1 closed this Apr 17, 2025
@thomas-kl1 thomas-kl1 reopened this Apr 17, 2025
@cammonro
Copy link
Contributor

Thank you for your contribution @thomas-kl1 ! It has been on the roadmap to retire the need for a separate module for MSI since it has long been the default in Magento 2.4. We'll be sure to review and incorporate your proposed changes in an upcoming release!

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