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 | |
final class Mage | |
{ | |
// ... | |
public static function dispatchEvent($name, array $data = array()) | |
{ | |
$e = new Exception(); | |
Mage::log( | |
$name . ': ' . implode(', ', array_keys($data)) . "\n" |
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
#!/bin/bash | |
################################################################################ | |
# FUNCTIONS | |
################################################################################ | |
# 1. Check required system tools | |
_check_installed_tools() { | |
local missed="" |
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 | |
class Paypal | |
{ | |
/** | |
* API Version | |
*/ | |
const VERSION = 51.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
[xdebug] | |
xdebug.default_enable=1 | |
xdebug.remote_enable=1 | |
xdebug.remote_handler=dbgp | |
xdebug.remote_host=localhost | |
xdebug.remote_port=9000 | |
xdebug.remote_autostart=1 | |
xdebug.profiler_enable_trigger=1 | |
zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so" |
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 | |
$range = array_merge(range('a', 'z'), range('A', 'Z'), range(0, 9), array('_')); | |
foreach ($range as $a) foreach ($range as $b) mkdir("$a/$b", 0777, true); | |
$db = new PDO('mysql:127.0.0.1;dbname=magento', 'root', 'root'); | |
//$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); | |
$result = $db->query('select distinct value from catalog_product_entity_media_gallery'); |
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 | |
$code = 'color'; | |
$opts = Mage::getSingleton('eav/config') | |
->getAttribute('catalog_product', $code) | |
->getSource() | |
->getAllOptions(false); | |
foreach($opts as $opt) { |
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 | |
include 'app/Mage.php'; | |
Mage::setIsDeveloperMode(true); | |
ini_set('display_errors', 1); | |
umask(0); | |
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; | |
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; | |
Mage::app($mageRunCode, $mageRunType); |
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 | |
/** | |
* Short description of module | |
* | |
* PHP version 5 | |
* | |
* @category Kering | |
* @package Kering_Modulename | |
* @author Kering Magento Team <magento@kering.com> | |
* @copyright 2015 Kering |
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 | |
eu_flat.entity_id, | |
eu_flat.sku, | |
def_eav.value default_eav_price, | |
eu_eav.value eu_eav_price, | |
eu_flat.price eu_flat_price | |
from catalog_product_flat_3 eu_flat | |
inner join catalog_product_entity_decimal eu_eav | |
on eu_flat.entity_id = eu_eav.entity_id | |
and eu_eav.attribute_id = 75 |
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); | |
include 'app/Mage.php'; | |
Mage::setIsDeveloperMode(true); | |
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; | |
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; | |
Mage::app($mageRunCode, $mageRunType); | |
$mail = new Zend_Mail(); |