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
-- MySQL dump 10.13 Distrib 5.5.47, for debian-linux-gnu (x86_64) | |
-- | |
-- created with: | |
-- mysqldump -u -p -n -d -t --skip-opt --no-create-info --triggers magentoee | sed -e 's/DEFINER=[^*]*\*/\*/' > triggers14.2.3.sql | |
-- | |
-- Host: localhost Database: magentoee | |
-- ------------------------------------------------------ | |
-- Server version 5.5.47-0ubuntu0.12.04.1 | |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; | |
/*!40103 SET TIME_ZONE='+00:00' */; |
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
isset is_null ===null ==null empty | |
null | F | T | T | T | T | | |
unset | F | T | T | T | T | | |
"" | T | F | F | T | T | | |
[] | T | F | F | T | T | | |
0 | T | F | F | T | T | | |
false | T | F | F | T | T | | |
true | T | F | F | F | F | | |
1 | T | F | F | F | F | | |
\0 | T | F | F | F | F | |
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
# Delete all color option values (attribute 80 default) | |
DELETE ov.* | |
FROM eav_attribute_option_value AS ov | |
JOIN eav_attribute_option AS o | |
ON o.option_id = ov.option_id | |
WHERE o.attribute_id = 80; |
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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `catalog_product_bundle_option`; | |
TRUNCATE TABLE `catalog_product_bundle_option_value`; | |
TRUNCATE TABLE `catalog_product_bundle_price_index`; | |
TRUNCATE TABLE `catalog_product_bundle_selection`; | |
TRUNCATE TABLE `catalog_product_bundle_selection_price`; | |
TRUNCATE TABLE `catalog_product_bundle_stock_index`; | |
TRUNCATE TABLE `catalog_product_entity_datetime`; | |
TRUNCATE TABLE `catalog_product_entity_decimal`; | |
TRUNCATE TABLE `catalog_product_entity_gallery`; |
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 | |
/* | |
* Removes a specific attribute. | |
* [email protected] | |
* | |
* Usage: php -f attribute-remove.php [attribute_name] | |
*/ | |
require_once 'abstract.php'; |
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 | |
require_once 'app/Mage.php'; | |
umask(0); | |
$app = Mage::app('default'); | |
Mage::getSingleton('core/session', array('name' => 'adminhtml')); | |
// supply username | |
$user = Mage::getModel('admin/user')->loadByUsername('adminusername'); |
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
INSERT INTO `eav_entity_attribute` ( | |
`entity_type_id`, | |
`attribute_set_id`, | |
`attribute_group_id`, | |
`attribute_id`, | |
`sort_order` | |
) | |
( | |
SELECT | |
'ENTITY_TYPE_ID' AS entity_type_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
<?php | |
/** | |
* Pull in the database details from the Magento configuration | |
*/ | |
$localXml = __DIR__ .DS.'app/etc/local.xml'; | |
if (file_exists($localXml)) { | |
// Load in the local.xml and retrieve the database settings | |
$xml = simplexml_load_file($localXml); |
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 | |
// def closest (num, arr): | |
// curr = arr[0] | |
// foreach val in arr: | |
// if abs (num - val) < abs (num - curr): | |
// curr = val | |
// return curr | |
function closestnumber($number, $candidates) { |
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
Overwrite the maintenance change in index.php file conditional with the follow, using a more unique User Agent is recommended. | |
Chrome/Firefox/etc. most browsers offer means via extensions or development tools to set a customer User Agent. Utliziing this | |
you can bypass the maintance mode for Testing when you don't have a Static IP: | |
# If user agent is "QA" bypass maintenance mode (customize user agent for more uniqueness) | |
if (file_exists($maintenanceFile) && $_SERVER['HTTP_USER_AGENT'] != "QA") { | |
include_once dirname(__FILE__) . '/errors/503.php'; | |
exit; | |
} |