This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ## Note: If not in a module sql setup use the following 2 lines | |
require_once('app/Mage.php'); | |
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID)); | |
// ## Note: Setup the new category attribute | |
$installer = new Mage_Sales_Model_Mysql4_Setup; | |
$installer->startSetup(); | |
$installer->addAttribute('catalog_category', 'additional_css', array( | |
'type' => 'text', | |
'backend' => '', | |
'frontend' => '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Allow Cross Domain Fonts | |
<FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$"> | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "*" | |
</IfModule> | |
</FilesMatch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Note: Whenever possible keep the name favicon and put in the web root as browsers look there by default even without the link tags. --> | |
<!-- Note: Only types png, gif, and ico support animation. --> | |
<!-- Favicon - Alternate Icon Types (Mixed Browser Support in order from least to most supported.) --> | |
<link rel="icon" href="/favicon.bmp" type="image/bmp" /> | |
<link rel="icon" href="/favicon.jpg" type="image/jpeg" /> | |
<link rel="icon" href="/favicon.gif" type="image/gif" /> | |
<link rel="icon" href="/favicon.png" type="image/png" /> | |
<!-- Favicon - IE 5 --> | |
<link rel="address bar icon" href="/favicon.ico"> | |
<!-- Favicon - IE 6 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remove Link Outlines */ | |
a, a:active, a:focus { outline: none; -moz-outline-style: none; } | |
:-moz-any-link:focus { outline: none; -moz-outline-style: none; } | |
*, *:focus, *:active { outline: none; -moz-outline-style: none; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump --user username --password='password' databasename | gzip -9 > ./backup_database.sql.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Troubleshooting Mod_Security 2.5: | |
The first step is to identify which rule is blocking your users or breaking your site. To see what is happening, check your Apache Error log or your Mod_Security log. In your logs, you will see something like this: | |
Pattern match "(?:cd |\;|php |echo |perl |killall |python |rpm |yum |apt-get |emerge |lynx |links |mkdir |elinks |wget |lwp-(?:download|request|mirror|rget) |id|uname |cvs |svn |(?:s|r)(?:cp|sh) |net(?:stat|cat) |rexec |smbclient |t?ftp |ncftp |curl |telnet |g?cc |cp ..." at REQUEST_URI. [file "/etc/modsecurity/10_asl_rules.conf"] | |
[line "587"] [id "340037"] [rev "3"] [msg "Atomicorp.com - FREE UNSUPPORTED DELAYED FEED - WAF Rules: Generic command injection"] [severity "CRITICAL"] | |
yoursite.com 81.99.13.12 340037 [07/Jan/2011:22:43:29 --0800] | |
Pattern match "(?:cd |\;|php |echo |perl |killall |python |rpm |yum |apt-get |emerge |lynx |links |mkdir |elinks |wget |lwp-(?:download|request|mirror|rget) |id|uname |cvs |svn |(?:s|r)(?:cp|sh) |net(?:stat|cat) |rexec |smbclie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Log to your own logfile | |
Mage::log('My log entry', null, 'mylogfile.log'); | |
#Log to the system logfile | |
Mage::log('My log entry'); | |
#Log to the exception logfile | |
Mage::logException($e); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* #### General Contact #### */ | |
/* Sender Name */ | |
Mage::getStoreConfig('trans_email/ident_general/name'); | |
/* Sender Email */ | |
Mage::getStoreConfig('trans_email/ident_general/email'); | |
/* #### Sales Representative #### */ | |
/* Sender Name */ | |
Mage::getStoreConfig('trans_email/ident_sales/name'); | |
/* Sender Email */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ## Image Bullets ## */ | |
.my-list { list-style-image: url('./images/bullet.png'); } | |
/* ## Default Styles Reset ## */ | |
.std ol li { list-style: decimal outside none; display: list-item; margin-left: 1em; } | |
.std ul li { list-style: disc outside none; display: list-item; margin-left: 1em; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Editing Tips: | |
When editing any CMS Static Block or CMS Page, I highly recommend first clicking the button to hide the WYSIWYG editor, and copying all the existing code out to a safe location, that way you have a back up in case your edits go awry or mess up the page somehow. Then click the button to reenable the WYSIWYG editor and make your edits and save. Refresh the corresponding frontend page in your browser to make sure everything looks good. If you need to restore the page/block due to some error/glitch/problem simply re-edit that page/block, hide the WYSIWYG and copy the code you saved in your safe location back in and resave the page/block and everything will be back to how it was before your edit. | |
When editing formatted content it is better to click into that content and use the keyboard to delete and type the new content rather they select highlighting and typing. Same with editing links, it is better to click into them and click the link button or edit the text rather then select highlighting |
OlderNewer