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 | |
set_time_limit(1600); | |
ini_set('memory_limit', '-1'); | |
include_once 'app/Mage.php'; | |
umask(0); | |
Mage::app(); | |
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; | |
$_storeId = null; |
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
# 1.CentOS 6.3 | |
# yum install make gcc | |
cd /opt | |
wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz | |
tar zxf redis-2.6.14.tar.gz | |
cd redis-2.6.14 | |
make | |
make install |
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 | |
error_reporting(0); ini_set('display_errors', 1); | |
// define('MAGENTO_ROOT', getcwd()); | |
define('MAGENTO_ROOT', dirname(dirname(__FILE__))); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
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 | |
// define('MAGENTO_ROOT', getcwd()); | |
define('MAGENTO_ROOT', dirname(dirname(__FILE__))); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
// umask(0); | |
ini_set('display_errors', 1); |
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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Academic Free License (AFL 3.0) | |
* that is bundled with this package in the file LICENSE_AFL.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/afl-3.0.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 | |
/** | |
* Product list template | |
* | |
* @see Mage_Catalog_Block_Product_List | |
*/ | |
?> | |
<?php | |
$_productCollection = $this->getCollection(); | |
$helper = $this->helper('shoppersettings/image'); |
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
$store_id = Mage::app()->getStore()->getId(); | |
$rootId = Mage::app()->getStore($store_id)->getRootCategoryId(); | |
$catCollection = $_product->getCategoryCollection()->addAttributeToSelect('name')->addUrlRewriteToResult() | |
->addIsActiveFilter()->addFieldToFilter('path', array('like'=> "1/$rootId/%"))->setOrder('id','ASC'); | |
$cache = Mage::app()->getCache(); // [TODO] Cache the collection result not sure if this works | |
$cache->setLifetime(28800); | |
$catCollection->initCache($cache,'customcategoryfilter_', array('collections')); |
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 | |
error_reporting(~0); ini_set('display_errors', 1); | |
// adjust for where your file is, ours is in protected subdirectory of / | |
define('MAGENTO_ROOT', dirname(dirname(__FILE__))); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
umask(0); | |
Mage::app(); |