Jump to content

[PS1.7.8.6] Container in a decorated service


Recommended Posts

Hi,

I'm developing a module which add datas to a stock movement. In order to do that, I have decorate the PrestaShop\PrestaShop\Core\Stock\StockManager following this doc.

I don't know if the decoration was made in a good way because the stock movement in the BO still use PrestaShop\PrestaShop\Core\Stock\StockManager instead of my class.

But in my module, if I call my CustomStockManager, the movement is not made. I've found that the function SymfonyContainer::getInstance(); return null so the function saveMovement() return false.

Is there a way to know why the SymfonyContainer return false ?

Thanks

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...