Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
| mysqldump -u [uname] -p[pass] [dbname] | gzip > [backupfile.sql.gz] |
| SET FOREIGN_KEY_CHECKS=0; | |
| -- Catalogue Search | |
| TRUNCATE `catalogsearch_query`; | |
| TRUNCATE `catalogsearch_fulltext`; | |
| TRUNCATE `catalogsearch_result`; | |
| ALTER TABLE `catalogsearch_query` AUTO_INCREMENT=1; | |
| ALTER TABLE `catalogsearch_fulltext` AUTO_INCREMENT=1; | |
| ALTER TABLE `catalogsearch_result` AUTO_INCREMENT=1; |
All custom modules should have a Namespace and Module Name.
These are used below as {Namespace} and {Module}.
Caution: The Magento autoloader is known to have problems with CamelCase namespaces and/or modules between Windows and *nix systems. If your module requires more than one word for either of these, it is best to just concatenate them to avoid any issues (Example:
{Namespace}_{Examplemodule}).
| <?php | |
| //Path to Magento | |
| require_once('app/Mage.php'); | |
| umask(0); | |
| Mage::app(); | |
| ini_set('display_errors', 1); | |
| // Register a secure admin environment | |
| Mage::register('isSecureArea', 1); |
| public function mycoolAction() | |
| { | |
| /* ... Some code ...*/ | |
| $update = $this->getLayout()->getUpdate(); | |
| /* ... Some code ...*/ | |
| $this->addActionLayoutHandles(); | |
| /* ... Some code ...*/ | |
| $this->loadLayoutUpdates(); | |
| /* ... Some code ...*/ | |
| /* My stuff, add pure XML like you do from XML layout files <img src="http://inchoo.net/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"> */ |
| sed 's/old_domain/new_domain/g' < olddb.sql > newdb.sql |