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
$id=1; // get Customer Id | |
$customer = Mage::getModel('customer/customer')->load($id); | |
$transaction = Mage::getModel('core/resource_transaction'); | |
$storeId = $customer->getStoreId(); | |
$reservedOrderId = Mage::getSingleton('eav/config')->getEntityType('order')->fetchNewIncrementId($storeId); | |
$order = Mage::getModel('sales/order') | |
->setIncrementId($reservedOrderId) | |
->setStoreId($storeId) |
<?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 |
set @increment_id='300001114'; | |
select @order_id:=entity_id from sales_flat_order where increment_id=@increment_id; | |
delete from sales_flat_order where entity_id=@order_id; | |
delete from sales_flat_order_grid where increment_id=@increment_id; | |
delete from sales_flat_order_payment where parent_id=@order_id; | |
delete from sales_flat_order_status_history where parent_id=@order_id; | |
select @tax_id:=tax_id from `sales_order_tax` where order_id=@order_id; | |
delete from sales_order_tax_item where tax_id=@tax_id; | |
<?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"> |
DELETE FROM catalog_product_bundle_option_value WHERE store_id <> 0; | |
DELETE FROM catalog_product_entity_datetime WHERE store_id <> 0; | |
DELETE FROM catalog_product_entity_decimal WHERE store_id <> 0; | |
DELETE FROM catalog_product_entity_gallery WHERE store_id <> 0; | |
DELETE FROM catalog_product_entity_int WHERE store_id <> 0; | |
DELETE FROM catalog_product_entity_media_gallery_value WHERE store_id <> 0; | |
DELETE FROM catalog_product_entity_text WHERE store_id <> 0; | |
DELETE FROM catalog_product_entity_varchar WHERE store_id <> 0; | |
DELETE FROM catalog_product_option_price WHERE store_id <> 0; |
function addMediaGalleryAttributeToCollection(Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection $_productCollection) { | |
$_mediaGalleryAttributeId = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'media_gallery')->getAttributeId(); | |
$_read = Mage::getSingleton('core/resource')->getConnection('catalog_read'); | |
$_mediaGalleryData = $_read->fetchAll(' | |
SELECT | |
main.entity_id, `main`.`value_id`, `main`.`value` AS `file`, | |
`value`.`label`, `value`.`position`, `value`.`disabled`, `default_value`.`label` AS `label_default`, | |
`default_value`.`position` AS `position_default`, | |
`default_value`.`disabled` AS `disabled_default` |