+---------------------------------------------+
| Tables_in_mage |
+---------------------------------------------+
| admin_assert |
| admin_role |
| admin_rule |
| admin_user |
| adminnotification_inbox |
| api2_acl_attribute |
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 | |
$langs = array( | |
0 => '1 produkt', | |
1 => '%d produkty', | |
2 => '%d produktów', | |
); | |
$n = 9; | |
$plural = (($n==1)?(0):((((($n%10)>=2)&&(($n%10)<=4))&&((($n%100)<10)||(($n%100)>=20)))?(1):2)); |
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 'app/Mage.php'; | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
// Reset admin path. | |
$config = Mage::getSingleton('core/config'); | |
$config->saveConfig('admin/url/custom_path', 'admin', 'default', 0); | |
$config->saveConfig('web/unsecure/base_url', '{{base_url}}', 'default', 0); | |
$config->saveConfig('web/secure/base_url', '{{base_url}}', 'default', 0); | |
$config->saveConfig('web/cookie/cookie_domain', '', 'default', 0); |
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 | |
class SomeParent { | |
public function test() { | |
echo 'parent'; | |
} | |
} | |
class Element1 extends SomeParent { | |
public function 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
diff --git a/app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php b/app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php | |
index 6c815ed68827dded619ecac227eda53ec860abf6..aa8e7d3812d7179fc254b47cbacbf89295a8a3f0 100644 | |
--- a/app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php | |
+++ b/app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php | |
@@ -278,13 +278,17 @@ abstract class Mage_ImportExport_Model_Import_Entity_Abstract | |
$this->_dataSourceModel->cleanBunches(); | |
while ($source->valid() || $bunchRows) { | |
+ //if the row scope isn't default we aren't finished with this entity | |
+ if ($startNewBunch && $source->valid() && !$this->_isRowScopeDefault($source->current())) { |
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 | |
class Snowdog_Math_Helper_Data extends Mage_Core_Helper_Abstract | |
{ | |
/** | |
* Greatest common divisor using Euclid's algorithm | |
* | |
* @param int $a | |
* @param int $b | |
* @return int |
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 | |
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__)); | |
$invalidFiles = array(); | |
foreach ($files as $file) { | |
if ($file->isLink() || $file->isDir()) { | |
continue; | |
} | |
$fileName = $file->getFilename(); | |
if ($fileName == 'config.xml') { |
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
TRUNCATE dataflow_batch_export; | |
TRUNCATE dataflow_batch_import; | |
TRUNCATE log_customer; | |
TRUNCATE log_quote; | |
TRUNCATE log_summary; | |
TRUNCATE log_summary_type; | |
TRUNCATE log_url; | |
TRUNCATE log_url_info; | |
TRUNCATE log_visitor; | |
TRUNCATE log_visitor_info; |
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 customer_entity SET email = REPLACE(email, '@', '-test@abcxyz123-'); | |
UPDATE sales_flat_order SET customer_email = REPLACE(customer_email, '@', '-test@abcxyz123-'); | |
UPDATE sales_flat_order_address SET email = REPLACE(email, '@', '-test@abcxyz123-'); | |
UPDATE sales_flat_order_grid SET customer_email = REPLACE(customer_email, '@', '-test@abcxyz123-'); |
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
alias ll='ls -l' | |
alias json='python -mjson.tool' |