What alternative do we have for the following depe...
# suitecommerce
v
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
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
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
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.
v
Sounds good, thanks for the advice Steve 🙂