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
| <reference name="head"> | |
| <block type="core/text" name="your_external_csv"> | |
| <action method="setText"> | |
| <text><![CDATA[<link rel="stylesheet" type="text/css" href="http://www.broadwaymerchandiseshop.com/skins/www.broadwaymerchandiseshop.com/style.css?ver=14">]]> | |
| </text> | |
| </action> | |
| </block> | |
| </reference> |
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 | |
| // Details | |
| $SETTINGS = array( | |
| "apiUser" => "your_api_username", | |
| "apiKey" => "your_api_password", | |
| "apiURL" => "http://magentohost/api/soap/?w…..", | |
| "default_attr_set_id" => 4, // should always be 4 | |
| "api_ignore_errors" => false, | |
| ); | |
| $csv_file = "path/to/your/csv_file.csv"; |
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 | |
| define('MAGENTO', realpath(dirname(__FILE__))); | |
| require_once MAGENTO . '/app/Mage.php'; | |
| Mage::app(); | |
| $entity_type_id = Mage::getModel('catalog/product')->getResource()->getTypeId(); | |
| prepareCollection($entity_type_id); | |
| function prepareCollection($ent_type_id){ | |
| $resource = Mage::getSingleton('core/resource'); |
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 | |
| define('MAGENTO', realpath(dirname(__FILE__))); | |
| require_once MAGENTO . '/../app/Mage.php'; | |
| Mage::app(); | |
| // $fileName = MAGENTO . '/var/import/importAttrib.csv'; | |
| $fileName = 'importAttrib.csv'; | |
| // getCsv($fileName); | |
| getAttributeCsv($fileName); | |
| function getAttributeCsv($fileName){ |
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(); | |
| $sendToEmailAddress = 'addressedto@test.com'; | |
| $sendToName = 'AddressedTo Name'; | |
| //I set date in php because I want to set it also in different format as email subject | |
| $dateStart = mktime(0, 0, 0, date('m'), date('d')-7, date('Y')); | |
| $dateEnd = mktime(23, 59, 59, date('m'), date('d'), date('Y')); |
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); | |
| Mage::app('default'); | |
| Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
| try { | |
| $allTypes = Mage::app()->useCache(); | |
| foreach($allTypes as $type => $value) { |
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
| <html><head><title>Find String</title></head><body> | |
| <?php | |
| // ini_set('max_execution_time', '0'); | |
| // ini_set('set_time_limit', '0'); | |
| find_files('.'); | |
| function find_files($seed) { | |
| if(! is_dir($seed)) return false; | |
| $files = array(); | |
| $dirs = array($seed); | |
| while(NULL !== ($dir = array_pop($dirs))) |
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
| SELECT DISTINCT customer_email, customer_firstname, customer_lastname, | |
| SUM(subtotal_invoiced) AS Total | |
| FROM `sales_flat_order` AS a | |
| GROUP BY customer_email | |
| ORDER BY SUM(subtotal_invoiced) DESC |
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
| SELECT AVG( orders_num ) | |
| FROM ( | |
| SELECT created_at, COUNT( DISTINCT order_id ) orders_num | |
| FROM `sales_flat_order_item` | |
| WHERE created_at > "2016-07-01 00:00:00" | |
| AND created_at < "2017-01-01 00:00:00" | |
| GROUP BY CAST( created_at AS DATE ) | |
| )orders_per_day |
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 'abstract.php'; | |
| class Cmtickle_Demo_Shell_Tool extends Mage_Shell_Abstract | |
| { | |
| private $_readConnection = null; | |
| protected function _getReadConnection() | |
| { |