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
| var maskBehavior = function (val) { | |
| return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; | |
| }, | |
| options = {onKeyPress: function(val, e, field, options) { | |
| field.mask(maskBehavior.apply({}, arguments), options); | |
| } | |
| }; | |
| $('.phone').mask(maskBehavior, options); |
| var gulp = require('gulp'); | |
| var cleanCSS = require('gulp-clean-css'); | |
| var minify = require('gulp-minify'); | |
| gulp.task('default', [ | |
| 'css', | |
| 'requireJsMinify', | |
| 'jsMinify' |
| # Get Customers taxvat | |
| SELECT ce.*, ea.attribute_code, cev.value | |
| FROM customer_entity AS ce | |
| LEFT JOIN eav_attribute AS ea ON ce.entity_type_id = ea.entity_type_id AND ea.backend_type = 'varchar' | |
| LEFT JOIN customer_entity_varchar AS cev ON ce.entity_id = cev.entity_id AND ea.attribute_id = cev.attribute_id | |
| WHERE ea.attribute_code = 'taxvat'; | |
| # Get Customer Data from orders | |
| SELECT `increment_id`, `customer_id`, `customer_firstname`, `customer_email`, `customer_taxvat` FROM `sales_flat_order`; |
| # Instructions for syncing a local folder with a remote FTP or SFTP server | |
| # The only requirement is homebrew. To get git-ftp: | |
| brew update && brew install git-ftp | |
| # Initialize a git repo in the directory you want to sync. Track all files, and commit them to your repo: | |
| git init | |
| git add -A && git commit -m "Committed all files" |
In the background script we have:
chrome.webRequest.onBeforeRequest.addListener(function (details) {
if (details.method === 'HEAD') {
if (details.url.endsWith('?start')) {
ringSound.play();
} else if (details.url.endsWith('?stop')) {
ringSound.pause();
ringSound.currentTime = 0;
| <?php | |
| /** | |
| * Create Shopping Cart Sales Rule with Specific Coupon Code Programmatically | |
| */ | |
| // All customer group ids | |
| $customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds(); | |
| // SalesRule Rule model | |
| $rule = Mage::getModel('salesrule/rule'); |
sudo apt-get update && sudo apt-get install -y git wget unzip
git clone https://github.com/OpenMage/magento-mirror.git ./ ;
tar -xf compressed-magento-sample-data-1.9.1.0.tgz ;
cp -rv magento-sample-data-1.9.1.0/* ./ ;
| /** | |
| * WordPress snippet | |
| * Admin page redirection | |
| * Put this inside theme setup function | |
| */ | |
| global $pagenow; | |
| if ( is_admin() && 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) { |