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
/* @var $installer Mage_Core_Model_Resource_Setup */ | |
/* @var $storeObj Mage_Core_Model_Store */ | |
$installer = Mage::getResourceModel('core/setup','core_setup'); | |
foreach (Mage::app()->getStores(false,true) as $storeCode => $storeObj) { | |
switch($storeCode){ | |
case 'somecode': | |
$path = 'design/theme/default'; //or one of design/theme/{layout|locale|skin|template} |
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',true); | |
error_reporting(E_ALL | E_STRICT); | |
require 'app/Mage.php'; | |
Mage::setIsDeveloperMode(true); | |
umask(0); |
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',true); | |
error_reporting(E_ALL | E_STRICT); | |
require 'app/Mage.php'; | |
Mage::setIsDeveloperMode(true); | |
umask(0); |
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 | |
/** | |
* Working with Magento outside of the normal routing dispatch | |
* flow of Mage::run()? Mage::app(); is the way to go. This | |
* workbench script can be a quick way to check on various | |
* parts of the app, including configuration, which can be | |
* handy when verifying custom modules. | |
*/ | |
//set some PHP params for ease of debugging | |
ini_set('display_errors',true); |
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> | |
<modules> | |
<Training_Practice> | |
<version>0.1.0.0</version> | |
</Training_Practice> | |
</modules> | |
<global> | |
<models> | |
<!-- Mage::getModel('catalog/product') --> |
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"?> | |
<layout> | |
<default> | |
<block name="ben" type="core/text"> | |
<action method="setText"> | |
<text>SOME TEXT</text> | |
</action> | |
</block> | |
<reference name="header"> | |
<action method="insert"> |
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',true); | |
include 'app/Mage.php'; | |
//Mage::setIsDeveloperMode(true); | |
Mage::app() | |
->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL,Mage_Core_Model_App_Area::PART_EVENTS) | |
->loadAreaPart(Mage_Core_Model_App_Area::AREA_FRONTEND,Mage_Core_Model_App_Area::PART_EVENTS); | |
echo Mage::app()->getLayout()->createBlock('core/text')->setText('Foo')->toHtml(); |
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 | |
/** | |
* ref http://davidwalsh.name/basic-php-file-handling-create-open-read-write-append-close-delete | |
*/ | |
header('Content-Type: text/plain'); | |
//##Create a File | |
//$my_file = 'file.txt'; | |
//$handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); //implicitly creates file |
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
Verifying that +benmarks is my blockchain ID. https://onename.com/benmarks |
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 | |
/** | |
* Working with Magento outside of the normal routing dispatch | |
* flow of Mage::run()? Mage::app(); is the way to go. This | |
* workbench script can be a quick way to check on various | |
* parts of the app, including configuration, which can be | |
* handy when verifying custom modules. | |
*/ | |
//set some PHP params for ease of debugging | |
ini_set('display_errors',true); |
OlderNewer