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
| for img in `grep "<image id=" vendor/magento/theme-frontend-blank/etc/view.xml | \ | |
| awk -F= '{ print $2 }' | \ | |
| sed 's/ type//' | \ | |
| tr -d '"'`; do \ | |
| echo $img; \ | |
| grep --exclude view.xml -rl $img vendor/magento/ ; \ | |
| done | |
| # outputs: |
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
| SELECT table_schema as `Database`, table_name AS `Table`, | |
| round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
| FROM information_schema.TABLES | |
| ORDER BY (data_length + index_length) ASC; |
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
| enru@v1:~$ git diff app/code/core/Mage/Checkout/controllers/OnepageController.php | |
| diff --git a/app/code/core/Mage/Checkout/controllers/OnepageController.php b/app/code/core/Mage/Checkout/controllers/OnepageController.php | |
| index c1ea4a5..ab920ee 100644 | |
| --- a/app/code/core/Mage/Checkout/controllers/OnepageController.php | |
| +++ b/app/code/core/Mage/Checkout/controllers/OnepageController.php | |
| @@ -211,6 +211,10 @@ class Mage_Checkout_OnepageController extends Mage_Checkout_Controller_Action | |
| public function successAction() | |
| { | |
| $session = $this->getOnepage()->getCheckout(); | |
| +//test |
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
| UPDATE wp_posts SET post_content = replace(post_content, 'http://www.foo.com', 'http://www.bar.com'); | |
| UPDATE wp_posts SET guid = replace(guid, 'http://www.foo.com', 'http://www.bar.com'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.foo.com', 'http://www.bar.com'); | |
| UPDATE wp_options SET option_value = 'http://www.bar.com' WHERE option_name = 'siteurl'; | |
| UPDATE wp_options SET option_value = 'http://www.bar.com' WHERE option_name = 'home'; |
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
| <?php | |
| $mage_filename = './app/Mage.php'; | |
| require_once $mage_filename; | |
| umask(0); | |
| Mage::app('admin'); | |
| error_reporting(E_ALL); | |
| Mage::app()->cleanCache(); | |
| Mage::dispatchEvent('adminhtml_cache_flush_system'); |
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
| for f in `find app/code/local/Mage/ -type f`; do | |
| original=`echo $f | sed 's/local/core/'`; | |
| if [ -e $original ]; then | |
| diff -u $original $f; | |
| fi | |
| done |
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
| UPDATE wp_posts SET post_content = replace(post_content, 'http://ONE', 'http://TWO'); | |
| UPDATE wp_posts SET guid = replace(guid, 'http://ONE', 'http://TWO'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://ONE', 'http://TWO'); | |
| UPDATE wp_options SET option_value = 'http://TWO' WHERE option_name = 'siteurl'; | |
| UPDATE wp_options SET option_value = 'http://TWO' WHERE option_name = 'home'; |
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
| // dev wp config | |
| define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST']); | |
| define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST']); | |
| define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']); |
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
| <!-- Basic Product Information --> | |
| <? | |
| // only use products with enabled parents | |
| $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId()); | |
| if(isset($parentIds[0])) { | |
| $status = Mage::getResourceModel('catalog/product')->getAttributeRawValue($parentIds[0], 'status', 1); | |
| if($status != 1) $myPattern=null; | |
| } | |
| ?> | |
| <g:id><? return substr($product->getId(), 0, 50); ?></g:id> |
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
| function getProductUrlWithAttributes($product, $storeId) { | |
| $url = $product->setStoreId($storeId)->getProductUrl(); | |
| $urlHash = array(); | |
| $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId()); | |
| if(isset($parentIds[0])) { | |
| $parent = Mage::getModel('catalog/product')->load($parentIds[0]); | |
| $url = $parent->setStoreId($storeId)->getProductUrl(); |
NewerOlder