isotope / core

Core repository of Isotope eCommerce, an eCommerce extension for Contao Open Source CMS
https://isotopeecommerce.org
135 stars 107 forks source link

Allow to use Isotope product types that are registered services #2396

Open richardhj opened 1 year ago

richardhj commented 1 year ago

Can we use System::importStatic($strClass) here to initialize the product (line 167), so that we can create instances of an Isotope product from services registered in the container?

https://github.com/isotope/core/blob/7f81e8b9ae9fe75a3bbe69f8c475cdb5cc348a6f/system/modules/isotope/library/Isotope/Model/ProductCollectionItem.php#L158-L167

The background of my question is that my product class has to be initialized differently.

aschempp commented 1 year ago

these are model classes, I don't think we can use services for these? Do you mean the call to the static method of our model/repository should be to a service?