Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
<?php | |
/** | |
* Product Attribute Installer | |
*/ | |
try { | |
/* @var $installer Mage_Catalog_Model_Resource_Setup */ | |
$installer = $this; | |
$installer->startSetup(); |
#!/usr/bin/env ruby | |
# Batch encodes videos from a list of editing points | |
# Author: Werner Robitza <werner.robitza@univie.ac.at> | |
FFMPEG = "ffmpeg" # => path to the FFmpeg executable | |
COPY = false # => if set to true, just does a bitstream copy | |
# => if set to false, encoding options below are used | |
OVERWRITE = "-n" # => set to "-n" if you just want to keep files that exist |
<?php | |
if(!is_numeric($_GET['id']))die('Please specify a category ID'); | |
$catId = $_GET['id']; | |
$xml = simplexml_load_file('app/etc/local.xml'); | |
$host = $xml->global->resources->default_setup->connection->host; | |
$username = $xml->global->resources->default_setup->connection->username; | |
$password = $xml->global->resources->default_setup->connection->password; |
### Events during order submit process | |
`core_copy_fieldset_customer_account_to_quote` | |
`core_copy_fieldset_sales_convert_quote_to_order` | |
`sales_convert_quote_to_order` | |
`core_copy_fieldset_sales_convert_quote_address_to_order` | |
`sales_convert_quote_address_to_order` | |
`core_copy_fieldset_sales_convert_quote_address_to_order_address` | |
`sales_convert_quote_address_to_order_address` |
<?php | |
/* | |
* /app/design/frontend/default/your_theme/template/page/intercom-io.phtml | |
*/ | |
// Settings for the intercom.io app. | |
if( $this->helper('customer')->isLoggedIn() ): ?> | |
<?php $customer = Mage::helper('customer')->getCustomer()->getData(); ?> | |
<script id="IntercomSettingsScriptTag"> |
<?php | |
class EcomDev_Optimization_Model_Rule_Observer extends Mage_CatalogRule_Model_Observer | |
{ | |
protected $_preloadedPrices = array(); | |
public function beforeCollectTotals(Varien_Event_Observer $observer) | |
{ | |
$quote = $observer->getQuote(); | |
$date = Mage::app()->getLocale()->storeTimeStamp($quote->getStoreId()); |
<?php | |
/** | |
* Optimized version of attribute source options model | |
* | |
* That allows to preload options once and reuse them instead of doing calls to db all the time | |
* | |
*/ | |
class EcomDev_Optimization_Model_Resource_Attribute_Source_Table | |
extends Mage_Eav_Model_Entity_Attribute_Source_Table |
<?php | |
require_once 'app/Mage.php'; | |
Mage::app('default'); | |
$productIds = array(100, 101, 102); | |
$option = array( | |
'title' => 'Test Option', | |
'type' => 'file', | |
'is_require' => 1, |
# HAProxy config | |
mkdir /etc/haproxy | |
cat > /etc/haproxy/haproxy.cfg << EOF | |
global | |
maxconn 4096 | |
defaults | |
mode http | |