What alternative do we have for the following dependencies: 'Item.Model' and 'Singleton'?
They show up in console warnings when we turn the safe mode on.
We are using Item.Model to get the bulk pricing on items in one of our extensions. We cannot use the PDP component since our extension does not run over the Product Details Page.
And I'm using 'Singleton' to create one of our Models as a Singleton model.
s
Steve Goldberg
02/09/2021, 12:42 PM
Singletons are concepts, which are fine. My guess is that you're using a singleton instance of a core model, and that's not fine.
As for Item.Model, you will need to make your own models (using SCModel) and fetch item data yourself.
v
Viraj Shinde
02/09/2021, 12:57 PM
No, I'm not using a singleton instance of a core model. I'm defining one of my models as a Singleton model. And for that I'm adding 'Singleton' to the dependency list.
s
Steve Goldberg
02/09/2021, 1:11 PM
OK, well all that does is add a single method to your model, which is four lines long. I would just replicate that functionality in your model and ditch the dependency.