$mail = Mage::getModel('core/email'); $mail->setToName('wang'); $mail->setToEmail('xiaoming@leeroy.ca'); $mail->setBody('Mail Text / Mail Content'); $mail->setSubject('test email magento'); $mail->setFromEmail('xiaoming@leeroy.ca'); $mail->setFromName("wangxiaoming"); $mail->setType('html');// YOu can use Html or text as Mail format $mail->send();
Author: wang
send Magento email by templatee
$templateId = "Fav Email"; $emailTemplate = Mage::getModel('core/email_template')->loadByCode($templateId); $userName='wang'; $productName="test 123"; $receiveEmail='xiaoming@leeroy.ca'; $receiveName=$userName; $vars = array('user_name' => $userName, 'product_name' => $productName,'message'=>'test message'); $emailTemplate->getProcessedTemplate($vars); var_dump($emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email', 1))); $emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name', 1)); var_dump($emailTemplate->send($receiveEmail,$receiveName, $vars));
Accessing an External Database from Your Magento Module
http://www.solvingmagento.com/accessing-an-external-database-from-your-magento-module/
Magento Events
http://www.magentocommerce.com/wiki/5_-_modules_and_development/reference/magento_events
insert and geid insert different
DB::table('users')->insert( array('email' => 'john@example.com', 'votes' => 0) ); Inserting Records Into A Table With An Auto-Incrementing ID If the table has an auto-incrementing id, use insertGetId to insert a record and retrieve the id: $id = DB::table('users')->insertGetId( array('email' => 'john@example.com',...
Reset password Magento
UPDATE admin_user SET password=MD5('qXpassword') WHERE username='admin'
Déplacer – Copier Magento vers un autre Domaine ou Dossier
Pour Copier Votre Magento Il faut : Copier le dossier qui contient votre Magento Mettre les droit au nouveau dossier (777 / 755) Supprimer la cache /VotreMagento/var/cache Copier la base de donner Editer core_config_Data Editer .htaccess Editer /VotreMagento/app/etc/local.xml Editer core_config_Data...
magento create custom module
Magento for Developers: Part 5 - Magento Models and ORM Basics Category: Development Alan Storm, updated for Magento 1.12 by Magento The implementation of a "Models Tier" is a huge part of any MVC framework. It represents the data of...
Selling or buying in other provinces or territories: which sales taxes apply?
Selling or buying in other provinces or territories: which sales taxes apply? Whenever your company does out-of-province business, different sales taxes may be required. This includes GST, HST and possibly the provincial or territorial sales taxes. We want to help...