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
find . -type f -exec chmod 644 {} \; | |
find . -type d -exec chmod 755 {} \; | |
chown -R beautyse.beautyse beauty_test/ |
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
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
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
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
[alias] | |
# one-line log | |
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
a = add | |
ap = add -p | |
c = commit --verbose | |
ca = commit -a --verbose | |
cm = commit -m | |
cam = commit -a -m |
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
SET FOREIGN_KEY_CHECKS = 0; | |
SET GROUP_CONCAT_MAX_LEN=32768; | |
SET @tables = NULL; | |
SELECT GROUP_CONCAT(table_name) INTO @tables | |
FROM information_schema.tables | |
WHERE table_schema = (SELECT DATABASE()); | |
SELECT IFNULL(@tables,'dummy') INTO @tables; | |
SET @tables = CONCAT('DROP TABLE IF EXISTS ', @tables); | |
PREPARE stmt FROM @tables; |
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
I’ve seen recently this issue - editing and saving products in admin deleted existing images from frontend. | |
On evaluation it appeared that the images, while showing on the frontend, did not appear in the admin product edit Images tab at all. | |
Inspection of the database tables revealed that while EAV records contained image names (used on frontend), the image gallery (used in admin) was missing the relevant entries, so it appears that CSV import does not populate gallery table. | |
This problem will happen with both new and updated products, when new image names are added with CSV. | |
I’ve made an SQL statement that will fill the missing records, and which you will need to run each time after importing products with images using CSV: | |
INSERT INTO catalog_product_entity_media_gallery (attribute_id, entity_id, `value`) | |
SELECT ga.attribute_id, v.entity_id, v.value | |
FROM catalog_product_entity_varchar v | |
INNER JOIN eav_entity_type et ON et.entity_type_code='catalog_product' |
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
<?php | |
include_once '../app/Mage.php'; | |
Mage::app()->setCurrentStore( Mage_Core_Model_App::ADMIN_STORE_ID ); | |
// Get the current page from $_GET | |
$curPage = intval(Mage::app()->getRequest()->getParam('page')); | |
$curPage = $curPage < 1 ? 1 : $curPage; | |
// Get all configurable and grouped products | |
$products = Mage::getModel('catalog/product') |
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
ALWAYS BACKUP YOUR DATABASES BEFORE THIS OPERATION | |
SELECT * FROM `wp_posts` o | |
LEFT OUTER JOIN `wp_posts` r | |
ON o.post_parent = r.ID | |
WHERE r.id IS null AND o.post_type = 'product_variation' | |
DELETE o FROM `wp_posts` o | |
LEFT OUTER JOIN `wp_posts` r |
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
git tag | grep pantheon_live_ | sort -k1.15n | tail -1 | |
git reset --hard pantheon_live_{result from above} |
OlderNewer