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 | |
$dbConfig = Mage::getConfig()->getNode('global/resources/report_database/connection'); | |
if (!$dbConfig) { | |
return; | |
} | |
/* @var $db Magento_Db_Adapter_Pdo_Mysql */ | |
$db = Mage::getSingleton('core/resource')->getConnection('core_read'); | |
$db->closeConnection(); | |
//update values | |
$dbConfig = $dbConfig->asArray(); |
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 | |
ini_set('display_errors', 1); | |
ini_set('log_errors', 1); | |
error_reporting(E_ALL); | |
require 'app/Mage.php'; | |
Mage::app('admin', 'store'); | |
/* @var $customers Mage_Customer_Model_Resource_Customer_Collection */ | |
$customers = Mage::getResourceModel('customer/customer_collection'); | |
$customers->addAttributeToSelect('*'); | |
$customers->setPageSize((isset($argv[1]) && is_numeric($argv[1]))?$argv[1]:2000); |
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
Array | |
( | |
[gallery] => Array | |
( | |
[1810] => Array | |
( | |
[path] => g/0000430/11.jpg | |
[orig_path] => /1/1/11.jpg | |
) |
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 | |
/** | |
* @package Develpr_Sqs | |
* @author Kevin Mitchell <kevin@develpr.com> | |
* @copyright Massachusetts Institute of Technology License (MITL) | |
* @license http://opensource.org/licenses/MIT | |
*/ | |
require(Mage::getBaseDir('lib') . '/develpr_sqs/aws.phar'); | |
$autoloadFuncs = spl_autoload_functions(); |
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
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 30; |
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
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<urn:salesOrderList soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> | |
<sessionId xsi:type="xsd:string">?</sessionId> | |
<filters xsi:type="urn:filters"> | |
<complex_filter SOAP-ENC:arrayType="ns1:complexFilter[0]" xsi:type="ns1:complexFilterArray"> | |
<item xsi:type="ns1:complexFilter"> | |
<key xsi:type="xsd:string">increment_id</key> | |
<value xsi:type="ns1:associativeEntity"> |
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 | |
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', 'SOME SKU'); | |
$attributes = $product->getTypeInstance(true)->getSetAttributes($product); | |
/* @var $mediaGalleryAttribute Mage_Catalog_Model_Resource_Eav_Attribute */ | |
$mediaGalleryAttribute = $attributes['media_gallery']; | |
//FILL IN $path somehow | |
$mediaGalleryAttribute->getBackend()->addImage($product, $path, null, false, false); | |
$product->save(); |
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 | |
/* @var $collection Mage_Sales_Model_Resource_Order_Collection */ | |
$collection = Mage::getResourceModel('sales/order_collection'); | |
$reflection = new ReflectionMethod( Mage_Sales_Model_Order, '_setState'); | |
$reflection->setAccessible(true); | |
foreach ($collection as $order) { | |
/* @var $order Mage_Sales_Model_Order */ | |
$reflection->invoke($order, 'complete', 'bulk_complete', 'force complete', false, false); | |
$order->save(); | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<config> | |
<global> | |
<sales> | |
<quote> | |
<item> | |
<product_attributes> | |
<reel_enable/> | |
</product_attributes> | |
</item> |
OlderNewer