This file contains hidden or 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
| http://stackoverflow.com/questions/9842342/building-a-site-with-twig-php-template-engine | |
| If you're using several PHP files then it's wise to create template renderer class, which will bootstrap Twig classes, set options and take care of finding and rendering requested templates: | |
| <?php | |
| // Use correct path to Twig's autoloader file | |
| require_once '/path/to/lib/Twig/Autoloader.php'; | |
| // Twig's autoloader will take care of loading required classes | |
| Twig_Autoloader::register(); |
This file contains hidden or 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
| background-image:url('../images/bg.png'); | |
| background-repeat:no-repeat; | |
| background-size:contain; | |
| background-position:center; |
This file contains hidden or 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
| $.ajax({ | |
| url: "", | |
| context: document.body, | |
| success: function(s,x){ | |
| $(this).html(s); | |
| } | |
| }); | |
This file contains hidden or 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
| Works on all browsers, this is all you need. | |
| function commaSeparateNumber(val){ | |
| while (/(\d+)(\d{3})/.test(val.toString())){ | |
| val = val.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); | |
| } | |
| return val; | |
| } |
This file contains hidden or 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
| UTF8 w/o BOM |
This file contains hidden or 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
| http://www.opensourceforwebtechnologies.com/category/magento-theme/ | |
| http://www.opensourceforwebtechnologies.com/category/magento-theme/ |
This file contains hidden or 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
| http://fishpig.co.uk/magento/tutorials/direct-sql-queries/ | |
| Yes you can run direct sql queries within Magento, the best way to do this is to use the read write resource. You can insatiate it with: | |
| $resource = Mage::getSingleton('core/resource'); | |
| $readConnection = $resource->getConnection('core_read'); | |
| $writeConnection = $resource->getConnection('core_write'); | |
| To run a select you can do something like this: |
This file contains hidden or 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
| http://stackoverflow.com/questions/16352864/how-to-display-image-in-place-of-checkbox | |
| http://jsfiddle.net/pKM3x/ |
This file contains hidden or 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
| http://fredibach.ch/jquery-plugins/tabselect.php |
This file contains hidden or 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
| https://www.bemaged.com/en/blog/use-magento-swatches-in-custom-theme/ | |
| http://magento.stackexchange.com/questions/45948/how-to-use-magento-1-9-1-0-configurable-swatches-in-default-package-theme-or-a |