Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Custom Model? 
 
kla0005
Member
 
Total Posts:  43
Joined:  2011-10-05
 

Hey Guys,

I need to make somekind-of-custom Class that I can use on ANYPAGES! Total in cart, on frontpage, view file in Categories/Products, and so on.

How can I make such a model? And how should I initialite it?

Its a kind of static one I need, with some simple functions like: loadProduct($prodId), and getShipmentPrice() and stuff.

Very simple kinda, but is it simple to make it?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

Sure, make an own extension with an own model...and on every site you can call your model, for example with

Mage::getModel(’youmodule/modelname)->getStuff()

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top