0

What is difference between Mage::getModel('core/email_template_mailer') and Mage::getModel('core/email_template');?

  • Please explain what you want to know. Was the answer given by Anshu what you expected? Or do you know how magento resolved class names and you want to know what the difference between the classes is? – Fabian Blechschmidt Oct 26 '13 at 17:09
-1

Mage::getModel() is used for creating objects of model classes.

Mage::getModel('core/email_template_mailer') will create object for class app/code/core/Mage/Core/Model/Email/Template/Mailer.php


Mage::getModel('core/email_template') will create object for class app/code/core/Mage/Core/Model/Email/Template.php


For more details and methods they contain, you can see these classes at their respective locations as mentioned.
You can always read Mage::getModel() like below

Mage::getModel('classGroupName/path_to_model_file');

0

Looking at the docs for core/email_template_mailer and core/email_template it seems that the first one has methods to send the template that you generate using the second one. I'd guess someone else can explain it a bit more but that seems to be what is happening to me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.