Skip to content

Instantly share code, notes, and snippets.

View mattisbusycom's full-sized avatar

Matthew M Kaufman mattisbusycom

View GitHub Profile
// app.js
angular.module('cs_demo', [
'controllers',
'elasticjs.service',
'ui.bootstrap'
]);
.so-cl-production {
padding-top: 10px;
}
.icon {
width: 32px;
height: 32px;
}
.icon-account-login {
//Controller Action
public function find() {
if ($this->request->is('ajax')) {
$this->autoRender = false;
$country_name = $this->request->query('term');
$results = $this->Country->find('all', array(
'conditions' => array('Country.name LIKE ' => '%' . $country_name . '%')
<?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
SET SQL_MODE = '';
SET @rownum=0;
UPDATE eav_attribute_option
LEFT JOIN (
SELECT tmp.*, @rownum:=@rownum+1 AS rank FROM (
SELECT eao.*, eaov.`value`
FROM eav_attribute_option eao
LEFT JOIN `eav_attribute_option_value` eaov ON eao.option_id=eaov.option_id AND eaov.store_id=0
WHERE attribute_id = 292
ORDER BY CAST(CAST(eaov.value AS DECIMAL(3,0)) as UNSIGNED INTEGER), eaov.value
<block type="cms/block" name="block_name">
<action method="setBlockId"><id>block_code</id></action>
</block>
{{block type="cms/block" block_id="block_code"}}
{{block type="catalog/product_list" category_id="79" template="catalog/product/list_random.phtml"}}
<?php
/** @var $collection Mage_Catalog_Model_Resource_Category_Collection */
$collection = Mage::getModel('catalog/category', array('disable_flat' => true))->getCollection();
// ... custom stuff

Multi-Toggle Navigation

The multi-toggle is basically just nested accordions. The user taps on the parent category to reveal children categories underneath. Once enough screen real estate becomes available, they convert to the usual multi-level dropdown we’re used to seeing.

A Pen by Brad Frost on CodePen.

License.