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 $_maincategorylisting=$this->getCurrentCategory()?> | |
<?php $_categories=$this->getCurrentChildCategories()?> | |
<?php if($_categories->count()):?> | |
<?php foreach ($_categories as $_category):?> | |
<?php if($_category->getIsActive()): | |
$cur_category=Mage::getModel('catalog/category')->load($_category->getId()); | |
$layer = Mage::getSingleton('catalog/layer'); | |
$layer->setCurrentCategory($cur_category); | |
$catName = $this->getCurrentCategory()->getName(); | |
// Test if the current category has an image assigned to it or not |
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
//Replace | |
$menuIdentifiers = Mage::getModel('core/variable')->loadByCode('top_cms_menu')->getValue('text'); | |
//With | |
$menuIdentifiers = Mage::getModel('core/variable') | |
->setStoreId(Mage::app()->getStore()->getId()) | |
->loadByCode('top_cms_menu')->getValue('text'); |
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
$collection = Mage::getModel('cms/page')->getCollection(); | |
$collection->addFieldToFilter('identifier', array('in' => $menuIdentifiersArray)); | |
$collection->addFieldToFilter('is_active', 1); | |
//Add this line | |
$collection->getSelect()->order("find_in_set(identifier,'".implode(',',$menuIdentifiersArray)."')"); |
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 | |
/* CMS Tabs */ | |
$menuIdentifiers = Mage::getModel('core/variable') | |
->setStoreId(Mage::app()->getStore()->getId()) | |
->loadByCode('top_cms_menu')->getValue('text'); | |
$menuIdentifiersArray = explode(',', $menuIdentifiers); | |
$currentPageIdentifier = Mage::getBlockSingleton('cms/page')->getPage()->getIdentifier(); | |
$collection = Mage::getModel('cms/page')->getCollection(); |
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
a:8:{s:12:"attribute_id";a:14:{s:11:"SCHEMA_NAME";N;s:10:"TABLE_NAME";s:22:"customer_eav_attribute";s:11:"COLUMN_NAME";s:12:"attribute_id";s:15:"COLUMN_POSITION";i:1;s:9:"DATA_TYPE";s:8:"smallint";s:7:"DEFAULT";N;s:8:"NULLABLE";b:0;s:6:"LENGTH";N;s:5:"SCALE";N;s:9:"PRECISION";N;s:8:"UNSIGNED";b:1;s:7:"PRIMARY";b:1;s:16:"PRIMARY_POSITION";i:1;s:8:"IDENTITY";b:0;}s:10:"is_visible";a:14:{s:11:"SCHEMA_NAME";N;s:10:"TABLE_NAME";s:22:"customer_eav_attribute";s:11:"COLUMN_NAME";s:10:"is_visible";s:15:"COLUMN_POSITION";i:2;s:9:"DATA_TYPE";s:8:"smallint";s:7:"DEFAULT";s:1:"1";s:8:"NULLABLE";b:0;s:6:"LENGTH";N;s:5:"SCALE";N;s:9:"PRECISION";N;s:8:"UNSIGNED";b:1;s:7:"PRIMARY";b:0;s:16:"PRIMARY_POSITION";N;s:8:"IDENTITY";b:0;}s:12:"input_filter";a:14:{s:11:"SCHEMA_NAME";N;s:10:"TABLE_NAME";s:22:"customer_eav_attribute";s:11:"COLUMN_NAME";s:12:"input_filter";s:15:"COLUMN_POSITION";i:3;s:9:"DATA_TYPE";s:7:"varchar";s:7:"DEFAULT";N;s:8:"NULLABLE";b:1;s:6:"LENGTH";s:3:"255";s:5:"SCALE";N;s:9:"PRECISION";N;s:8:"UNSIGNED";N;s:7 |
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
/** | |
* Collect all email templates system config paths | |
* | |
* @return array | |
*/ | |
public function getEmailTemplatesSystemConfigPaths() | |
{ | |
$paths = array(); | |
$configSections = Mage::getSingleton('adminhtml/config')->getSections(); |
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
protected function _connect() { | |
$config = new Zend_Config( | |
array( | |
'database' => array( | |
'adapter' => 'Pdo_Mssql', | |
'params' => array( | |
'host' => '127.0.0.1', | |
'dbname' => 'test', | |
'username' => 'webuser', |
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
$action = Mage::app()->getFrontController()->getAction(); | |
/* Detect blog category view page */ | |
if ($action->getFullActionName() == 'blog_cat_view') { | |
bla bla bla | |
} | |
/* Detect blog post view page */ | |
if ($action->getFullActionName() == 'blog_post_view') { | |
bla bla bla |
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('DS', DIRECTORY_SEPARATOR); | |
function _getExtractSchemaStatement($sqlFileName, $db) | |
{ | |
$dumpSchema = 'mysqldump' . ' '; | |
$dumpSchema .= '--no-data' . ' '; | |
$dumpSchema .= '-u ' . $db['user'] . ' '; | |
$dumpSchema .= '-p' . $db['pass'] . ' '; | |
$dumpSchema .= '-h ' . $db['host'] . ' '; |
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
<script type="text/javascript"> | |
//<![CDATA[ | |
// submit buttons are not needed when submitting with ajax | |
$('review_submit').hide(); | |
if ($('update_shipping_method_submit')) { | |
$('update_shipping_method_submit').hide(); | |
} | |
<?php if ($this->getUseAjax()):?> | |
OrderReviewController.prototype._submitOrder = function() { |
OlderNewer