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
-- Admin emails | |
UPDATE admin_user AS tb SET tb.email = CONCAT('customer', tb.user_id, '@mailinator.com'); | |
-- Customers | |
UPDATE customer_entity AS tb SET tb.email = CONCAT('customer', tb.entity_id, '@mailinator.com'); | |
-- Customers Grid | |
UPDATE customer_grid_flat AS tb SET tb.email = CONCAT('customer', tb.entity_id, '@mailinator.com'); | |
-- Newsletter Subscribers |
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
# Customers | |
UPDATE customer_entity AS tb SET tb.email = CONCAT('customer', tb.entity_id, '@mailinator.com'); | |
# Newsletter Subscribers | |
UPDATE newsletter_subscriber AS tb SET tb.subscriber_email = REPLACE (tb.subscriber_email,(SUBSTRING_INDEX(SUBSTR(tb.subscriber_email, INSTR(tb.subscriber_email, '@') + 1),'.',5)), 'mailinator.com'); | |
# Sales Flat Orders | |
UPDATE sales_flat_order AS tb SET tb.customer_email = REPLACE (tb.customer_email,(SUBSTRING_INDEX(SUBSTR(tb.customer_email, INSTR(tb.customer_email, '@') + 1),'.',5)), 'mailinator.com'); | |
# Sales Flat Orders Address |
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
#!/usr/bin/env bash | |
add_composer_repository () { | |
name=$1 | |
type=$2 | |
url=$3 | |
echo "adding composer repository ${url}" | |
${composer} config ${composerParams} repositories.${name} ${type} ${url} | |
} | |
add_venia_sample_data_repository () { |
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
################################################################ | |
# NODE: 8.11.2 | |
# NPM: 5.6.0 (I prob should upgrade this one) | |
# MySQL: 5.7 | |
# PHP: 7.1 | |
################################################################ | |
################################################################ | |
################################ | |
### DOWNLOAD AND PREPARE MAGENTO TO INSTALL | |
# assuming you are in /<YOUR_PROJECT_FOLDER>/ |
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
/** | |
* US phone format: | |
* - 1 followed by a digit different from 0, followed by 9 digits (18884622592) | |
* - a digit different from 0, followed by 9 digits (8884622592) | |
*/ | |
function main(target){ | |
return /(^[1]{0,1}[1-9]{1}[0-9]{9}$)/.test(target); | |
}; | |
/** |
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
# Magento 2 install common tasks | |
# alias | |
nano ~/.bash_profile | |
alias mage='php bin/magento' | |
# git ignore filemode changes | |
git config core.filemode false | |
# other git global configs |
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
$storeId = '0'; | |
$appEmulation = Mage::getSingleton('core/app_emulation'); | |
// start emulation | |
$envInfo = $appEmulation->startEnvironmentEmulation($storeId); | |
/** | |
* do your stuff in that Store | |
*/ |
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
# extracted from http://www.atwix.com/magento/process-magento-indexes-from-command-line/ | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
# INDEXES NAMES LIST | |
# catalog_product_attribute | |
# catalog_product_price | |
# catalog_url | |
# catalog_product_flat | |
# catalog_category_flat | |
# catalog_category_product |
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
/** | |
* Webshopapps_Invoicing | |
* File: app/code/community/Webshopapps/Invoicing/Sales/Model/Order/Invoice.php | |
* | |
* Change addAttachment() function at the end of the file, to use this content | |
*/ | |
public function addAttachment($mailTemplate,$pdf, $filename) { | |
$file=$pdf->render(); | |
$mailTemplate->getMail()->createAttachment( |
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
# Clear cache | |
rm -Rf var/cache/* | |
# Disable Magento Compilation | |
php -f shell/compiler.php -- disable | |
php -f shell/compiler.php -- clear | |
# Remove all compiled files | |
rm -Rf includes/src/* |
NewerOlder