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
rsync -avz --dry-run SOURCE DESTINATION | |
rsync -avz --dry-run SSH_USER@IP:/REMOTE_ASBOLUTE_PATH/media/ media/ | |
--dry-run is to test if everything is fine, always do it first ;p | |
Remove it then to launch the real action |
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 init | |
git remote add origin PATH/TO/REPO | |
git fetch | |
git checkout -t origin/master |
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
UPDATE catalog_product_entity_int SET value = 2 | |
WHERE attribute_id = ( | |
SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'status' AND entity_type_id = ( | |
SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product' | |
) | |
) | |
AND entity_id IN ( | |
SELECT catalog_product_entity.entity_id | |
FROM catalog_product_entity_media_gallery | |
RIGHT OUTER JOIN catalog_product_entity ON catalog_product_entity.entity_id = catalog_product_entity_media_gallery.entity_id |
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
# SQL Query | |
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect_rewrite`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect`; | |
TRUNCATE TABLE `enterprise_url_rewrite_product_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_category_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite`; | |
TRUNCATE TABLE `enterprise_catalog_product_rewrite`; | |
TRUNCATE TABLE `enterprise_catalog_category_rewrite`; |
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
## Update order email addresses ## | |
UPDATE `sales_flat_order` | |
SET `customer_email` = CONCAT('test__', `customer_email`) | |
WHERE `customer_email` NOT IN ('[email protected]', '[email protected]') | |
AND `customer_email` NOT LIKE 'test__%'; | |
## Update customer email addresses ## | |
UPDATE `customer_entity` | |
SET `email` = CONCAT('test__', `email`) | |
WHERE `email` NOT IN ('[email protected]', '[email protected]') |
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 | |
/********************** | |
****** DISABLE ******* | |
**********************/ | |
/** var Mage_Core_Model_Config $config */ | |
$config = Mage::app()->getConfig(); | |
/** |
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 | |
/** Full reindex script */ | |
/** | |
* @var array | |
*/ | |
$processes = array(); | |
/** | |
* @var Mage_Core_Model_Factory $factory |
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
############################################################ | |
# From the directory which contains the composer.json file # | |
############################################################ | |
curl -s http://getcomposer.org/installer | php | |
php composer.phar install |
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 | |
/** | |
* Check if out of stock options of configurable products should be displayed | |
*/ | |
public function checkDisplayOutOfStockOptions() | |
{ | |
$currentProduct = Mage::registry('current_product'); | |
if ($currentProduct && $currentProduct->isConfigurable()) { | |
if (Mage::getStoreConfigFlag(Mage_CatalogInventory_Helper_Data::XML_PATH_SHOW_OUT_OF_STOCK)) { |
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 | |
/** | |
* Customer/Customer Address Attributes Installer | |
*/ | |
try { | |
/* @var $installer Mage_Customer_Model_Entity_Setup */ | |
$installer = $this; | |
$installer->startSetup(); |