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
#!/usr/bin/perl -w | |
# Script to check free diskspace and email notifications. Change the email and alert levels and you should be good to go. | |
# Script PJ Blaakmeer - www.blaakmeer.com | |
use strict; | |
# Alert levels Warning and Critical - Below what percent level of free disk space do you want an alert? | |
my $alert1 = 10; #Warning level free space below 30% | |
my $alert2 = 5; #Critical level free space below 10% | |
# Put the email address to notify here |
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 | |
$enterprise = Mage::getConfig()->getNode('modules/Enterprise_PageCache/active'); | |
$checkForVersion = ($enterprise ? '1.12' : '1.7.0.0'); | |
if(version_compare(Mage::getVersion(), $checkForVersion, '<')) { | |
$this->setTemplate('blockip/sales_order_view_info_16xx.phtml'); | |
} else { | |
$this->setTemplate('blockip/sales_order_view_info_17xx.phtml'); | |
} |
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
<catalogsearch_result_index translate="label"> | |
<reference name="head"> | |
<action method="setRobots"><value>NOINDEX,NOFOLLOW</value></action> | |
</reference> | |
</catalogsearch_result_index> | |
<catalogsearch_advanced_index translate="label"> | |
<reference name="head"> | |
<action method="setRobots"><value>NOINDEX,NOFOLLOW</value></action> | |
</reference> | |
</catalogsearch_advanced_index> |
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 | |
require 'app/Mage.php'; | |
error_reporting(E_ALL | E_STRICT); | |
ini_set('html_errors', 1); | |
Mage::setIsDeveloperMode(true); | |
ini_set('display_errors', 1); | |
$orderId = $_GET['order_id']; |
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 @ATTRIBUTE_ID := attribute_id FROM eav_attribute WHERE attribute_code = 'ATTRIBUTE_CODE'; | |
UPDATE eav_attribute SET backend_model = 'eav/entity_attribute_backend_array', backend_type = 'varchar', frontend_input = 'multiselect' WHERE attribute_id = @ATTRIBUTE_ID; | |
INSERT INTO catalog_product_entity_varchar (entity_type_id, attribute_id, store_id, entity_id, value) SELECT entity_type_id, attribute_id, store_id, entity_id, value FROM catalog_product_entity_int WHERE attribute_id = @ATTRIBUTE_ID; | |
DELETE FROM catalog_product_entity_int WHERE attribute_id = @ATTRIBUTE_ID; |
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
<? | |
// Preliminary work | |
error_reporting(E_ALL); | |
$start = microtime(true); | |
require 'app/Mage.php'; | |
ini_set('default_socket_timeout',48000); | |
$resource = Mage::getModel('core/resource'); |
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 | |
chdir(dirname(__FILE__)); | |
require_once '../app/Mage.php'; | |
Mage::app(); | |
umask(0); | |
require_once 'countries.php'; // import lists with all countries | |
// UK Island shipping rates; http://www.crearegroup-ecommerce.co.uk/blog/magento-advice/shipping-rates-to-the-uk-islands.php |
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 | |
$worldString = "AF - Afghanistan | |
AL - Albania | |
DZ - Algeria | |
AS - American Samoa | |
AD - Andorra | |
AO - Angola | |
AI - Anguilla | |
AQ - Antarctica |
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
tag_save_after | |
admin_roles_save_after | |
admin_user_save_after | |
review_save_after | |
catalogsearch_query_save_after | |
sales_order_save_after | |
sales_quote_address_save_after | |
sales_quote_payment_save_after | |
sales_quote_item_save_after | |
sales_quote_save_after |
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 | |
chdir(dirname(__FILE__)); | |
require_once '../app/Mage.php'; | |
@$app = Mage::app($argv[1]); | |
$catalogId = $app->getStore()->getRootCategoryId(); | |
$category = Mage::getModel ('catalog/category'); |