Version Notes
Please note: first test all modules in a test store then install theme on your original store. Always make backup of your store before installation.
Download this release
Release Info
Developer | Hassan Barza |
Extension | Codnitive_Sidenav |
Version | 1.6.93 |
Comparing to | |
See all releases |
Code changes from version 1.6.72 to 1.6.93
- app/code/community/Codnitive/{Sidenav/Block/Page/Html/Head.php → Extifcon/Helper/Data.php} +10 -19
- app/code/community/Codnitive/Extifcon/Model/Compiler.php +428 -0
- app/code/community/Codnitive/Extifcon/Model/Core/Layout.php +145 -0
- app/code/community/Codnitive/Extifcon/etc/adminhtml.xml +48 -0
- app/code/community/Codnitive/Extifcon/etc/config.xml +110 -0
- app/code/community/Codnitive/Extifcon/etc/system.xml +47 -0
- app/code/community/Codnitive/Sidenav/etc/config.xml +1 -6
- app/design/frontend/base/default/layout/sidenav.xml +4 -2
- app/etc/modules/Codnitive_Extifcon.xml +36 -0
- app/etc/modules/Codnitive_Sidenav.xml +1 -1
- package.xml +4 -4
- skin/frontend/default/default/images/arrows.gif +0 -0
- skin/frontend/default/default/images/blue_arrows.gif +0 -0
- skin/frontend/default/default/images/green_arrows.gif +0 -0
- skin/frontend/default/default/images/orange_arrows.gif +0 -0
- skin/frontend/default/modern/images/arrows.gif +0 -0
app/code/community/Codnitive/{Sidenav/Block/Page/Html/Head.php → Extifcon/Helper/Data.php}
RENAMED
@@ -10,31 +10,22 @@
|
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
* If you did not receive a copy of the license and are unable to
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
*
|
15 |
* @category Codnitive
|
16 |
-
* @package
|
17 |
* @author Hassan Barza <support@codnitive.com>
|
18 |
* @copyright Copyright (c) 2011 CODNITIVE Co. (http://www.codnitive.com)
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
22 |
-
|
23 |
-
class Codnitive_Sidenav_Block_Page_Html_Head extends Mage_Page_Block_Html_Head
|
24 |
{
|
25 |
|
26 |
-
|
27 |
-
* Construct parent and adds necessary css and js files
|
28 |
-
*
|
29 |
-
*/
|
30 |
-
protected function _construct()
|
31 |
-
{
|
32 |
-
parent::_construct();
|
33 |
-
$config = Mage::getModel('sidenav/config');
|
34 |
-
if ($config->getCollapsible() && $config->checkActive()) {
|
35 |
-
$this->addCss('css/sidenavcollapse.css');
|
36 |
-
$this->addItem('skin_js', 'js/sidenavcollapse.js');
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
}
|
10 |
* http://opensource.org/licenses/osl-3.0.php
|
11 |
* If you did not receive a copy of the license and are unable to
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately. *
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Codnitive
|
22 |
+
* @package Codnitive_Extifcon
|
23 |
* @author Hassan Barza <support@codnitive.com>
|
24 |
* @copyright Copyright (c) 2011 CODNITIVE Co. (http://www.codnitive.com)
|
25 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
*/
|
27 |
|
28 |
+
class Codnitive_Extifcon_Helper_Data extends Mage_Core_Helper_Data
|
|
|
29 |
{
|
30 |
|
31 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Codnitive/Extifcon/Model/Compiler.php
ADDED
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Codnitive
|
22 |
+
* @package Codnitive_Extifcon
|
23 |
+
* @author Hassan Barza <support@codnitive.com>
|
24 |
+
* @copyright Copyright (c) 2011 CODNITIVE Co. (http://www.codnitive.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Extended ifconfig compiler
|
31 |
+
*
|
32 |
+
* @category Codnitive
|
33 |
+
* @package Codnitive_Extifcon
|
34 |
+
* @author Hassan Barza <support@codnitive.com>
|
35 |
+
*/
|
36 |
+
class Codnitive_Extifcon_Model_Compiler
|
37 |
+
{
|
38 |
+
/**
|
39 |
+
* Converts operation string to array of opration
|
40 |
+
*
|
41 |
+
* @param array $node
|
42 |
+
* @return array
|
43 |
+
*/
|
44 |
+
public function extractor($node)
|
45 |
+
{
|
46 |
+
$modules = explode(';', $this->spaceRemover($node['modules']));
|
47 |
+
$options = explode(';', $this->spaceRemover($node['options']));
|
48 |
+
$conditions = explode(';', $this->spaceRemover($node['conditions']));
|
49 |
+
|
50 |
+
if (count($options) < count($modules)) {
|
51 |
+
Mage::throwException(Mage::helper('extifcon')->__('There is not enough option(s) for specified module(s).'));
|
52 |
+
}
|
53 |
+
if (count($options) > count($modules)) {
|
54 |
+
Mage::throwException(Mage::helper('extifcon')->__('There is not enough module(s) for specified option(s).'));
|
55 |
+
}
|
56 |
+
|
57 |
+
$modulesNum = count($modules);
|
58 |
+
$comparesRes = array();
|
59 |
+
|
60 |
+
for ($i = 0; $i < $modulesNum; $i++) {
|
61 |
+
$option[$i] = explode(',', $options[$i]);
|
62 |
+
$condition[$i] = explode(',', $conditions[$i]);
|
63 |
+
|
64 |
+
for ($j = 0, $optionNum = count($option[$i]); $j < $optionNum; $j++) {
|
65 |
+
$ifconfig[$i][$j] = trim((string)$modules[$i]) . trim((string)$option[$i][$j]);
|
66 |
+
$con[$i][$j] = isset($condition[$i][$j]) ? trim((string)$condition[$i][$j]) : true;
|
67 |
+
$comparesRes[] = $this->getAdminConfig($ifconfig[$i][$j]) === $this->getXmlCondition($con[$i][$j]);
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
return $comparesRes;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
*
|
76 |
+
*/
|
77 |
+
public function validator($node)
|
78 |
+
{
|
79 |
+
$message = $node['operation']
|
80 |
+
. ' - Action\'s method: ' . $node['method']
|
81 |
+
. ', module(s): ' . $node['modules']
|
82 |
+
. ', option(s): ' . $node['options'];
|
83 |
+
|
84 |
+
$operation = $this->spaceRemover((string)$node['operation']);
|
85 |
+
$removedValids = preg_replace('/AND|and|OR|or|\.|\+|\d+|\(+|\)+/', '', $operation);
|
86 |
+
$invalids = preg_replace('/\s+/', '', $removedValids);
|
87 |
+
if (!empty($invalids)) {
|
88 |
+
$invalids = $this->spaceRemover($removedValids);
|
89 |
+
Mage::throwException("Invalid operator(s) ({$invalids}) in operation: {$message}");
|
90 |
+
}
|
91 |
+
|
92 |
+
$oParNum = substr_count($operation, '(');
|
93 |
+
$cParNum = substr_count($operation, ')');
|
94 |
+
if ($oParNum != $cParNum) {
|
95 |
+
Mage::throwException("Missing parenthesis in operation: {$message}");
|
96 |
+
}
|
97 |
+
|
98 |
+
$operation = preg_replace('/\(+|\)+/', '', $operation);
|
99 |
+
if (preg_match('/AND|and|OR|or|\.|\+/', $operation)) {
|
100 |
+
$operatorsNum = preg_match_all('/AND|and|OR|or|\.|\+/', $operation, $preDigMatchs);
|
101 |
+
$operandsNum = preg_match_all('/\d+/', $operation, $posDigMatchs);
|
102 |
+
|
103 |
+
if ($operatorsNum >= $operandsNum) {
|
104 |
+
Mage::throwException("Missing operand(s) in operation: {$message}");
|
105 |
+
}
|
106 |
+
if ($operatorsNum < $operandsNum - 1) {
|
107 |
+
Mage::throwException("Missing operator(s) in operation: {$message}");
|
108 |
+
}
|
109 |
+
return true;
|
110 |
+
}
|
111 |
+
|
112 |
+
return is_numeric($operation) ? true : false;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Returns array of funded tokens
|
117 |
+
*
|
118 |
+
* @param string $operation
|
119 |
+
* @return array
|
120 |
+
*/
|
121 |
+
public function getToken($operation)
|
122 |
+
{
|
123 |
+
return $this->_token($operation);
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Converts operation string to array of opration
|
128 |
+
*
|
129 |
+
* @param string $operation
|
130 |
+
* @return array
|
131 |
+
*/
|
132 |
+
private function _token($operation)
|
133 |
+
{
|
134 |
+
$len = strlen($operation);
|
135 |
+
$tokens = array();
|
136 |
+
|
137 |
+
for ($i = 0, $offset = 0; $i < $len;) {
|
138 |
+
switch ($operation[$i]) {
|
139 |
+
case '(':
|
140 |
+
$tokens[] = '(';
|
141 |
+
$offset++;
|
142 |
+
$i++;
|
143 |
+
break;
|
144 |
+
|
145 |
+
case ')':
|
146 |
+
$tokens[] = ')';
|
147 |
+
$offset++;
|
148 |
+
$i++;
|
149 |
+
break;
|
150 |
+
|
151 |
+
case '.':
|
152 |
+
$tokens[] = '&&';
|
153 |
+
$offset++;
|
154 |
+
$i++;
|
155 |
+
break;
|
156 |
+
|
157 |
+
case '+':
|
158 |
+
$tokens[] = '||';
|
159 |
+
$offset++;
|
160 |
+
$i++;
|
161 |
+
break;
|
162 |
+
|
163 |
+
default:
|
164 |
+
preg_match(
|
165 |
+
'/^AND|^and|^OR|^or|^\d+/',
|
166 |
+
substr($operation, $offset), $match, PREG_OFFSET_CAPTURE
|
167 |
+
);
|
168 |
+
if ($match) {
|
169 |
+
switch ($match[0][0]) {
|
170 |
+
case 'AND':
|
171 |
+
case 'and':
|
172 |
+
$tokens[] = '&&';
|
173 |
+
$i += strlen($match[0][0]);
|
174 |
+
$offset = $i;
|
175 |
+
break 2;
|
176 |
+
|
177 |
+
case 'OR':
|
178 |
+
case 'or':
|
179 |
+
$tokens[] = '||';
|
180 |
+
$i += strlen($match[0][0]);
|
181 |
+
$offset = $i;
|
182 |
+
break 2;
|
183 |
+
|
184 |
+
default:
|
185 |
+
$tokens[] = $match[0][0];
|
186 |
+
$i += strlen($match[0][0]);
|
187 |
+
$offset = $i;
|
188 |
+
break 2;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
else {
|
192 |
+
// $tokens[] = 'error';
|
193 |
+
$offset++;
|
194 |
+
$i++;
|
195 |
+
}
|
196 |
+
break;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
return $tokens;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Converts Infix notation to Postfix notation
|
204 |
+
*
|
205 |
+
* My algorithm is based on "Shunting-yard" algorithm which uses
|
206 |
+
* Reverse Polish Notation (RPN) but don't need to associativity
|
207 |
+
* for right or left associate. In my algorithm each operator's operands
|
208 |
+
* put in left, so all operators have left associativity.
|
209 |
+
* Quick reference:
|
210 |
+
* http://en.wikipedia.org/wiki/Shunting-yard_algorithm
|
211 |
+
* http://en.wikipedia.org/wiki/Reverse_Polish_notation
|
212 |
+
* Useful reference:
|
213 |
+
* http://javascript.crockford.com/tdop/tdop.html
|
214 |
+
*
|
215 |
+
* @param array $conditions
|
216 |
+
* @param array $tokens
|
217 |
+
* @return boolean
|
218 |
+
*/
|
219 |
+
private function _rpn($conditions, $tokens)
|
220 |
+
{
|
221 |
+
$outputStack = array();
|
222 |
+
$operatorStack = array();
|
223 |
+
|
224 |
+
if (empty($tokens)) {
|
225 |
+
for ($i = 0, $conLen = count($conditions); $i < $conLen; $i++) {
|
226 |
+
$tokens[] = $i;
|
227 |
+
$tokens[] = '&&';
|
228 |
+
}
|
229 |
+
array_pop($tokens);
|
230 |
+
}
|
231 |
+
|
232 |
+
for ($i = 0, $len = count($tokens); $i < $len; $i++) {
|
233 |
+
if (is_numeric($tokens[$i])) {
|
234 |
+
$condition = $conditions[$tokens[$i]];
|
235 |
+
$outputStack[] = $condition !== null
|
236 |
+
? $condition
|
237 |
+
: Mage::throwException(Mage::helper('extifcon')->__('Specified operands are more than condition(s).'));
|
238 |
+
}
|
239 |
+
else {
|
240 |
+
$stackEnd = end($operatorStack);
|
241 |
+
$newToken = $tokens[$i];
|
242 |
+
|
243 |
+
if ($stackEnd === false) {
|
244 |
+
$operatorStack[] = $newToken;
|
245 |
+
}
|
246 |
+
else {
|
247 |
+
$seScore = $this->_rating($stackEnd);
|
248 |
+
$ntScore = $this->_rating($newToken);
|
249 |
+
|
250 |
+
if ($ntScore > 0 && $ntScore <= 100) {
|
251 |
+
if ($ntScore > $seScore) {
|
252 |
+
$operatorStack[] = $newToken;
|
253 |
+
}
|
254 |
+
else if ($ntScore <= $seScore) {
|
255 |
+
if ($seScore === 100) {
|
256 |
+
$operatorStack[] = $newToken;
|
257 |
+
}
|
258 |
+
else {
|
259 |
+
$outputStack[] = array_pop($operatorStack);
|
260 |
+
$operatorStack[] = $newToken;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
}
|
264 |
+
else if ($ntScore === 0) {
|
265 |
+
while ($this->_rating(end($operatorStack)) < 100) {
|
266 |
+
$outputStack[] = array_pop($operatorStack);
|
267 |
+
}
|
268 |
+
array_pop($operatorStack);
|
269 |
+
}
|
270 |
+
}
|
271 |
+
}
|
272 |
+
}
|
273 |
+
for ($i = 0, $stackLen = count($operatorStack); $i < $stackLen; $i++) {
|
274 |
+
$outputStack[] = array_pop($operatorStack);
|
275 |
+
}
|
276 |
+
|
277 |
+
return $outputStack;
|
278 |
+
}
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Returns operation resault
|
282 |
+
*
|
283 |
+
* @param array $conditions
|
284 |
+
* @param array $tokens
|
285 |
+
* @return boolean
|
286 |
+
*/
|
287 |
+
public function operation($conditions, $tokens)
|
288 |
+
{
|
289 |
+
return $this->_compare($this->_rpn($conditions, $tokens));
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Compares conditions together and return final result
|
294 |
+
*
|
295 |
+
* @param array $outputStack
|
296 |
+
* @return boolean
|
297 |
+
*/
|
298 |
+
private function _compare($outputStack)
|
299 |
+
{
|
300 |
+
$res = array();
|
301 |
+
$len = count($outputStack);
|
302 |
+
|
303 |
+
if ($len > 1) {
|
304 |
+
for ($i = 0; $i < $len; $i++) {
|
305 |
+
if (is_bool($outputStack[$i])) {
|
306 |
+
continue;
|
307 |
+
}
|
308 |
+
else if ($outputStack[$i] === '&&') {
|
309 |
+
$con1 = isset($outputStack[$i - 2]) && is_bool($outputStack[$i - 2]);
|
310 |
+
$con2 = isset($outputStack[$i - 1]) && is_bool($outputStack[$i - 1]);
|
311 |
+
|
312 |
+
if ($con1 && $con2) {
|
313 |
+
$outputStack[$i] = $outputStack[$i - 2] && $outputStack[$i - 1];
|
314 |
+
unset($outputStack[$i - 2], $outputStack[$i - 1]);
|
315 |
+
}
|
316 |
+
else {
|
317 |
+
return $this->_compare(array_values($outputStack));
|
318 |
+
}
|
319 |
+
}
|
320 |
+
else if ($outputStack[$i] === '||') {
|
321 |
+
$con1 = isset($outputStack[$i - 2]) && is_bool($outputStack[$i - 2]);
|
322 |
+
$con2 = isset($outputStack[$i - 1]) && is_bool($outputStack[$i - 1]);
|
323 |
+
|
324 |
+
if ($con1 && $con2) {
|
325 |
+
$outputStack[$i] = $outputStack[$i - 2] || $outputStack[$i - 1];
|
326 |
+
unset($outputStack[$i - 2], $outputStack[$i - 1]);
|
327 |
+
}
|
328 |
+
else {
|
329 |
+
return $this->_compare(array_values($outputStack));
|
330 |
+
}
|
331 |
+
}
|
332 |
+
}
|
333 |
+
}
|
334 |
+
|
335 |
+
return end($outputStack);
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Changes condition in XML file to string or
|
340 |
+
* to boolean if needed
|
341 |
+
*
|
342 |
+
* @param $condition
|
343 |
+
* @return mixed
|
344 |
+
*/
|
345 |
+
public function getXmlCondition($condition)
|
346 |
+
{
|
347 |
+
$condition = (string)$condition;
|
348 |
+
switch ($condition) {
|
349 |
+
case '0':
|
350 |
+
case 'false':
|
351 |
+
$condition = false;
|
352 |
+
break;
|
353 |
+
|
354 |
+
case '1':
|
355 |
+
case 'true':
|
356 |
+
case '':
|
357 |
+
$condition = true;
|
358 |
+
break;
|
359 |
+
}
|
360 |
+
return $condition;
|
361 |
+
}
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Changes condition in XML file to string or
|
365 |
+
* to boolean if needed
|
366 |
+
*
|
367 |
+
* @param $condition
|
368 |
+
* @return mixed
|
369 |
+
*/
|
370 |
+
public function getAdminConfig($configPath)
|
371 |
+
{
|
372 |
+
$config = (string)Mage::getStoreConfig($configPath);
|
373 |
+
switch ($config) {
|
374 |
+
case '0':
|
375 |
+
case 'false':
|
376 |
+
case '':
|
377 |
+
$config = false;
|
378 |
+
break;
|
379 |
+
|
380 |
+
case '1':
|
381 |
+
case 'true':
|
382 |
+
$config = true;
|
383 |
+
break;
|
384 |
+
}
|
385 |
+
return $config;
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Ratings tokens and returns given rate to token
|
390 |
+
* as its score
|
391 |
+
*
|
392 |
+
* @param string $token
|
393 |
+
* @return integer(0-100)
|
394 |
+
*/
|
395 |
+
private function _rating($token)
|
396 |
+
{
|
397 |
+
switch ($token) {
|
398 |
+
case '(':
|
399 |
+
return 100;
|
400 |
+
break;
|
401 |
+
|
402 |
+
case '&&':
|
403 |
+
return 80;
|
404 |
+
break;
|
405 |
+
|
406 |
+
case '||':
|
407 |
+
return 79;
|
408 |
+
break;
|
409 |
+
|
410 |
+
case ')':
|
411 |
+
return 0;
|
412 |
+
break;
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
/**
|
417 |
+
* Removes all spaces from a string
|
418 |
+
*
|
419 |
+
* @param string $string
|
420 |
+
* @return string
|
421 |
+
*/
|
422 |
+
public function spaceRemover($string)
|
423 |
+
{
|
424 |
+
$string = preg_replace('/ +/', ' ', (string)$string);
|
425 |
+
return trim($string);
|
426 |
+
}
|
427 |
+
|
428 |
+
}
|
app/code/community/Codnitive/Extifcon/Model/Core/Layout.php
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Codnitive
|
22 |
+
* @package Codnitive_Extifcon
|
23 |
+
* @author Hassan Barza <support@codnitive.com>
|
24 |
+
* @copyright Copyright (c) 2011 CODNITIVE Co. (http://www.codnitive.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Layout model
|
31 |
+
*
|
32 |
+
* @category Codnitive
|
33 |
+
* @package Codnitive_Extifcon
|
34 |
+
* @author Hassan Barza <support@codnitive.com>
|
35 |
+
*/
|
36 |
+
class Codnitive_Extifcon_Model_Core_Layout extends Mage_Core_Model_Layout
|
37 |
+
{
|
38 |
+
/**
|
39 |
+
* Checks ifconfig and conditions to run action or not
|
40 |
+
*
|
41 |
+
* @param Varien_Simplexml_Element $node
|
42 |
+
* @param Varien_Simplexml_Element $parent
|
43 |
+
* @return Codnitive_Extifcon_Model_Core_Layout
|
44 |
+
*/
|
45 |
+
protected function _generateAction($node, $parent)
|
46 |
+
{
|
47 |
+
$compiler = Mage::getModel('extifcon/compiler');
|
48 |
+
|
49 |
+
if (isset($node['ifconfig']) && ($configPath = (string)$node['ifconfig'])) {
|
50 |
+
$condition = true;
|
51 |
+
if (isset($node['condition'])) {
|
52 |
+
$condition = $compiler->getXmlCondition($compiler->spaceRemover($node['condition']));
|
53 |
+
}
|
54 |
+
$config = $compiler->getAdminConfig($compiler->spaceRemover($configPath));
|
55 |
+
|
56 |
+
if ($config !== $condition) {
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
else if (isset($node['modules']) && isset($node['options'])) {
|
61 |
+
$finalResult = false;
|
62 |
+
$extracted = $compiler->extractor($node);
|
63 |
+
$operation = $compiler->spaceRemover((string)$node['operation']);
|
64 |
+
$valideOpe = $operation != '' ? $compiler->validator($node) : true;
|
65 |
+
|
66 |
+
if ($valideOpe) {
|
67 |
+
$tokens = $compiler->getToken($operation);
|
68 |
+
$finalResult = $compiler->operation($extracted, $tokens);
|
69 |
+
}
|
70 |
+
if ($finalResult !== true) {
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
$this->_runAction($node, $parent);
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* If all ifconfig conditions are ok then action runs
|
80 |
+
*
|
81 |
+
* @param Varien_Simplexml_Element $node
|
82 |
+
* @param Varien_Simplexml_Element $parent
|
83 |
+
* @return Codnitive_Extifcon_Model_Core_Layout
|
84 |
+
*/
|
85 |
+
private function _runAction($node, $parent)
|
86 |
+
{
|
87 |
+
$method = (string)$node['method'];
|
88 |
+
if (!empty($node['block'])) {
|
89 |
+
$parentName = (string)$node['block'];
|
90 |
+
} else {
|
91 |
+
$parentName = $parent->getBlockName();
|
92 |
+
}
|
93 |
+
|
94 |
+
$_profilerKey = 'BLOCK ACTION: '.$parentName.' -> '.$method;
|
95 |
+
Varien_Profiler::start($_profilerKey);
|
96 |
+
|
97 |
+
if (!empty($parentName)) {
|
98 |
+
$block = $this->getBlock($parentName);
|
99 |
+
}
|
100 |
+
if (!empty($block)) {
|
101 |
+
|
102 |
+
$args = (array)$node->children();
|
103 |
+
unset($args['@attributes']);
|
104 |
+
|
105 |
+
foreach ($args as $key => $arg) {
|
106 |
+
if (($arg instanceof Mage_Core_Model_Layout_Element)) {
|
107 |
+
if (isset($arg['helper'])) {
|
108 |
+
$helperName = explode('/', (string)$arg['helper']);
|
109 |
+
$helperMethod = array_pop($helperName);
|
110 |
+
$helperName = implode('/', $helperName);
|
111 |
+
$arg = $arg->asArray();
|
112 |
+
unset($arg['@']);
|
113 |
+
$args[$key] = call_user_func_array(array(Mage::helper($helperName), $helperMethod), $arg);
|
114 |
+
} else {
|
115 |
+
/**
|
116 |
+
* if there is no helper we hope that this is assoc array
|
117 |
+
*/
|
118 |
+
$arr = array();
|
119 |
+
foreach($arg as $subkey => $value) {
|
120 |
+
$arr[(string)$subkey] = $value->asArray();
|
121 |
+
}
|
122 |
+
if (!empty($arr)) {
|
123 |
+
$args[$key] = $arr;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
if (isset($node['json'])) {
|
130 |
+
$json = explode(' ', (string)$node['json']);
|
131 |
+
foreach ($json as $arg) {
|
132 |
+
$args[$arg] = Mage::helper('core')->jsonDecode($args[$arg]);
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
$this->_translateLayoutNode($node, $args);
|
137 |
+
call_user_func_array(array($block, $method), $args);
|
138 |
+
}
|
139 |
+
|
140 |
+
Varien_Profiler::stop($_profilerKey);
|
141 |
+
|
142 |
+
return $this;
|
143 |
+
}
|
144 |
+
|
145 |
+
}
|
app/code/community/Codnitive/Extifcon/etc/adminhtml.xml
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
15 |
+
* versions in the future. If you wish to customize Magento for your
|
16 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
17 |
+
*
|
18 |
+
* @category Codnitive
|
19 |
+
* @package Codnitive_Sidnav
|
20 |
+
* @author Hassan Barza <support@codnitive.com>
|
21 |
+
* @copyright Copyright (c) 2011 CODNITIVE Co. (http://www.codnitive.com)
|
22 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<config>
|
26 |
+
<acl>
|
27 |
+
<resources>
|
28 |
+
<all>
|
29 |
+
<title>Allow Everything</title>
|
30 |
+
</all>
|
31 |
+
<admin>
|
32 |
+
<children>
|
33 |
+
<system>
|
34 |
+
<children>
|
35 |
+
<config>
|
36 |
+
<children>
|
37 |
+
<codnitiveadvance>
|
38 |
+
<title>CODNITIVE Developer</title>
|
39 |
+
</codnitiveadvance>
|
40 |
+
</children>
|
41 |
+
</config>
|
42 |
+
</children>
|
43 |
+
</system>
|
44 |
+
</children>
|
45 |
+
</admin>
|
46 |
+
</resources>
|
47 |
+
</acl>
|
48 |
+
</config>
|
app/code/community/Codnitive/Extifcon/etc/config.xml
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
15 |
+
* versions in the future. If you wish to customize Magento for your
|
16 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
17 |
+
*
|
18 |
+
* @category Codnitive
|
19 |
+
* @package Codnitive_Extifcon
|
20 |
+
* @author Hassan Barza <support@codnitive.com>
|
21 |
+
* @copyright Copyright (c) 2011 CODNITIVE Co. (http://www.codnitive.com)
|
22 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<config>
|
26 |
+
<modules>
|
27 |
+
<Codnitive_Extifcon>
|
28 |
+
<version>1.6.05 Beta</version>
|
29 |
+
<title>Extended ifconfig</title>
|
30 |
+
<link><![CDATA[http://www.codnitive.com/]]></link>
|
31 |
+
</Codnitive_Extifcon>
|
32 |
+
</modules>
|
33 |
+
<global>
|
34 |
+
<models>
|
35 |
+
<core>
|
36 |
+
<rewrite>
|
37 |
+
<layout>Codnitive_Extifcon_Model_Core_Layout</layout>
|
38 |
+
</rewrite>
|
39 |
+
</core>
|
40 |
+
<extifcon>
|
41 |
+
<class>Codnitive_Extifcon_Model</class>
|
42 |
+
</extifcon>
|
43 |
+
</models>
|
44 |
+
<helpers>
|
45 |
+
<extifcon>
|
46 |
+
<class>Codnitive_Extifcon_Helper</class>
|
47 |
+
</extifcon>
|
48 |
+
</helpers>
|
49 |
+
<resources>
|
50 |
+
<extifcon_setup>
|
51 |
+
<setup>
|
52 |
+
<module>Codnitive_Extifcon</module>
|
53 |
+
</setup>
|
54 |
+
<connection>
|
55 |
+
<use>core_setup</use>
|
56 |
+
</connection>
|
57 |
+
</extifcon_setup>
|
58 |
+
<extifcon_write>
|
59 |
+
<connection>
|
60 |
+
<use>core_write</use>
|
61 |
+
</connection>
|
62 |
+
</extifcon_write>
|
63 |
+
<extifcon_read>
|
64 |
+
<connection>
|
65 |
+
<use>core_read</use>
|
66 |
+
</connection>
|
67 |
+
</extifcon_read>
|
68 |
+
</resources>
|
69 |
+
<!--<blocks>
|
70 |
+
<extifcon>
|
71 |
+
<class>Codnitive_Extifcon_Block</class>
|
72 |
+
</extifcon>
|
73 |
+
</blocks>-->
|
74 |
+
</global>
|
75 |
+
|
76 |
+
<adminhtml>
|
77 |
+
<acl>
|
78 |
+
<resources>
|
79 |
+
<all>
|
80 |
+
<title>Allow Everything</title>
|
81 |
+
</all>
|
82 |
+
<admin>
|
83 |
+
<children>
|
84 |
+
<system>
|
85 |
+
<children>
|
86 |
+
<config>
|
87 |
+
<children>
|
88 |
+
<codnitiveadvance>
|
89 |
+
<title>CODNITIVE Developer</title>
|
90 |
+
</codnitiveadvance>
|
91 |
+
</children>
|
92 |
+
</config>
|
93 |
+
</children>
|
94 |
+
</system>
|
95 |
+
</children>
|
96 |
+
</admin>
|
97 |
+
</resources>
|
98 |
+
</acl>
|
99 |
+
|
100 |
+
<translate>
|
101 |
+
<modules>
|
102 |
+
<Codnitive_Extifcon>
|
103 |
+
<files>
|
104 |
+
<default>Codnitive_Extifcon.csv</default>
|
105 |
+
</files>
|
106 |
+
</Codnitive_Extifcon>
|
107 |
+
</modules>
|
108 |
+
</translate>
|
109 |
+
</adminhtml>
|
110 |
+
</config>
|
app/code/community/Codnitive/Extifcon/etc/system.xml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
15 |
+
* versions in the future. If you wish to customize Magento for your
|
16 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
17 |
+
*
|
18 |
+
* @category Codnitive
|
19 |
+
* @package Codnitive_Sidenav
|
20 |
+
* @author Hassan Barza <support@codnitive.com>
|
21 |
+
* @copyright Copyright (c) 2011 CODNITIVE Co. (http://www.codnitive.com)
|
22 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<config>
|
26 |
+
<sections>
|
27 |
+
<codnitiveadvance translate="label" module="extifcon">
|
28 |
+
<label>Developer</label>
|
29 |
+
<tab>codall</tab>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>300</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<groups>
|
36 |
+
<extifcon translate="label" module="extifcon">
|
37 |
+
<label>Extended ifconfig</label>
|
38 |
+
<sort_order>10</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>0</show_in_website>
|
41 |
+
<show_in_store>0</show_in_store>
|
42 |
+
<comment><![CDATA[This extension is part of CODNITIVE Core which extends Magento Core.]]></comment>
|
43 |
+
</extifcon>
|
44 |
+
</groups>
|
45 |
+
</codnitiveadvance>
|
46 |
+
</sections>
|
47 |
+
</config>
|
app/code/community/Codnitive/Sidenav/etc/config.xml
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
<config>
|
26 |
<modules>
|
27 |
<Codnitive_Sidenav>
|
28 |
-
<version>1.6.
|
29 |
<title>Sidebar Navigation Menu Professional</title>
|
30 |
<link><![CDATA[http://www.codnitive.com/]]></link>
|
31 |
</Codnitive_Sidenav>
|
@@ -65,11 +65,6 @@
|
|
65 |
</sidenav_read>
|
66 |
</resources>
|
67 |
<blocks>
|
68 |
-
<page>
|
69 |
-
<rewrite>
|
70 |
-
<html_head>Codnitive_Sidenav_Block_Page_Html_Head</html_head>
|
71 |
-
</rewrite>
|
72 |
-
</page>
|
73 |
<sidenav>
|
74 |
<class>Codnitive_Sidenav_Block</class>
|
75 |
</sidenav>
|
25 |
<config>
|
26 |
<modules>
|
27 |
<Codnitive_Sidenav>
|
28 |
+
<version>1.6.93</version>
|
29 |
<title>Sidebar Navigation Menu Professional</title>
|
30 |
<link><![CDATA[http://www.codnitive.com/]]></link>
|
31 |
</Codnitive_Sidenav>
|
65 |
</sidenav_read>
|
66 |
</resources>
|
67 |
<blocks>
|
|
|
|
|
|
|
|
|
|
|
68 |
<sidenav>
|
69 |
<class>Codnitive_Sidenav_Block</class>
|
70 |
</sidenav>
|
app/design/frontend/base/default/layout/sidenav.xml
CHANGED
@@ -38,9 +38,11 @@ Default layout
|
|
38 |
<default>
|
39 |
<reference name="head">
|
40 |
<action method="addCss" ifconfig="codnitivecatalog/sidenav/active"><stylesheet>css/sidenav.css</stylesheet></action>
|
|
|
|
|
41 |
</reference>
|
42 |
<reference name="top.menu">
|
43 |
-
<action method="unsetChild"
|
44 |
</reference>
|
45 |
|
46 |
<!-- Mage_Codnitive_Catalog -->
|
@@ -69,7 +71,7 @@ Catalog view
|
|
69 |
<action method="unsetChild" ifconfig="codnitivecatalog/sidenav/active"><name>catalog.leftnav</name></action>
|
70 |
</reference>-->
|
71 |
<reference name="catalog.leftnav">
|
72 |
-
<action method="unsetChild"
|
73 |
</reference>
|
74 |
</catalog_category_layered>
|
75 |
|
38 |
<default>
|
39 |
<reference name="head">
|
40 |
<action method="addCss" ifconfig="codnitivecatalog/sidenav/active"><stylesheet>css/sidenav.css</stylesheet></action>
|
41 |
+
<action method="addCss" modules="codnitivecatalog/sidenav/" options="active,collapsible" conditions="1,1" operation="0.1"><stylesheet>css/sidenavcollapse.css</stylesheet></action>
|
42 |
+
<action method="addItem" modules="codnitivecatalog/sidenav/" options="active,collapsible" conditions="1,1" operation="0.1"><type>skin_js</type><name>js/sidenavcollapse.js</name></action>
|
43 |
</reference>
|
44 |
<reference name="top.menu">
|
45 |
+
<action method="unsetChild" modules="codnitivecatalog/sidenav/" options="active,remove_top_nav" conditions="1,1" operation="0.1"><name>catalog.topnav</name></action>
|
46 |
</reference>
|
47 |
|
48 |
<!-- Mage_Codnitive_Catalog -->
|
71 |
<action method="unsetChild" ifconfig="codnitivecatalog/sidenav/active"><name>catalog.leftnav</name></action>
|
72 |
</reference>-->
|
73 |
<reference name="catalog.leftnav">
|
74 |
+
<action method="unsetChild" modules="codnitivecatalog/sidenav/" options="active,remove_layered_nav" conditions="1,1" operation="0.1"><name>category_filter</name></action>
|
75 |
</reference>
|
76 |
</catalog_category_layered>
|
77 |
|
app/etc/modules/Codnitive_Extifcon.xml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
15 |
+
* versions in the future. If you wish to customize Magento for your
|
16 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
17 |
+
*
|
18 |
+
* @category Codnitive
|
19 |
+
* @package Codnitive_Extifcon
|
20 |
+
* @author Hassan Barza <support@codnitive.com>
|
21 |
+
* @copyright Copyright (c) 2011 CODNITIVE Co. (http://www.codnitive.com)
|
22 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
23 |
+
*/
|
24 |
+
-->
|
25 |
+
<config>
|
26 |
+
<modules>
|
27 |
+
<Codnitive_Extifcon>
|
28 |
+
<active>true</active>
|
29 |
+
<codePool>community</codePool>
|
30 |
+
<depends>
|
31 |
+
<Mage_Core />
|
32 |
+
</depends>
|
33 |
+
<version>1.6.05</version>
|
34 |
+
</Codnitive_Extifcon>
|
35 |
+
</modules>
|
36 |
+
</config>
|
app/etc/modules/Codnitive_Sidenav.xml
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
<Mage_Page />
|
33 |
<Mage_Catalog />
|
34 |
</depends>
|
35 |
-
<version>1.6.
|
36 |
</Codnitive_Sidenav>
|
37 |
</modules>
|
38 |
</config>
|
32 |
<Mage_Page />
|
33 |
<Mage_Catalog />
|
34 |
</depends>
|
35 |
+
<version>1.6.93</version>
|
36 |
</Codnitive_Sidenav>
|
37 |
</modules>
|
38 |
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Codnitive_Sidenav</name>
|
4 |
-
<version>1.6.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/gpl-3.0.html">GNU General Public License, version 3 (GPLv3)</license>
|
7 |
<channel>community</channel>
|
@@ -11,9 +11,9 @@
|
|
11 |
With this navigation menu users can navigate to all site categories simply and fast.</description>
|
12 |
<notes>Please note: first test all modules in a test store then install theme on your original store. Always make backup of your store before installation.</notes>
|
13 |
<authors><author><name>Hassan Barza</name><user>hbarza</user><email>support@codnitive.com</email></author></authors>
|
14 |
-
<date>2012-01-
|
15 |
-
<time>16:
|
16 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Codnitive_Codall.xml" hash="1796ad4371c55c268c71be72d7b2876f"/><file name="Codnitive_Sidenav.xml" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Codnitive_Sidenav</name>
|
4 |
+
<version>1.6.93</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/gpl-3.0.html">GNU General Public License, version 3 (GPLv3)</license>
|
7 |
<channel>community</channel>
|
11 |
With this navigation menu users can navigate to all site categories simply and fast.</description>
|
12 |
<notes>Please note: first test all modules in a test store then install theme on your original store. Always make backup of your store before installation.</notes>
|
13 |
<authors><author><name>Hassan Barza</name><user>hbarza</user><email>support@codnitive.com</email></author></authors>
|
14 |
+
<date>2012-01-09</date>
|
15 |
+
<time>16:13:23</time>
|
16 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Codnitive_Codall.xml" hash="1796ad4371c55c268c71be72d7b2876f"/><file name="Codnitive_Sidenav.xml" hash="05734389bdac767d7634a258bbcb4572"/><file name="Codnitive_Extifcon.xml" hash="99cedf4ae035c0d40704d8cece496a8c"/></dir></target><target name="magelocal"><dir name="Codnitive"><dir name="Codall"><dir><dir name="Block"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><file name="Contact.php" hash="62e20a1f93c1b0394a5b1f1fefe09447"/><file name="ECD.php" hash="c6aafe57abdba2fcf6b7555c5f10345c"/><dir name="Extensions"><file name="List.php" hash="a337458b525e4b20feb68f898c3a6b8e"/></dir><file name="PCD.php" hash="bb824cfd2a340ba4b4f70b442b7316e8"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="db05202ae83bf9e4cc4454acb5fd8615"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0bed954bf2a459b1f5d6a25050d770d7"/><file name="config.xml" hash="2be2d94e2d6f870a24fc114ddbe27bda"/><file name="system.xml" hash="a54d0a2284f244afc9b8b294cba2e11d"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Codnitive_Codall.csv" hash="bea852e5e3c3f17c54d3c21e96115c68"/><file name="Codnitive_Sidenav.csv" hash="4778113a82ee845460a7b5bf8fe35c81"/></dir><dir name="fa_IR"><file name="Codnitive_Codall.csv" hash="3691ccfe6c605575aace69417351e0f7"/><file name="Codnitive_Sidenav.csv" hash="caf933bc40493f5edab311e319c001de"/></dir></target><target name="magecommunity"><dir name="Codnitive"><dir><dir name="Extifcon"><dir name="Helper"><file name="Data.php" hash="1999f1fe091a96f20c448f142e380f3e"/></dir><dir name="Model"><file name="Compiler.php" hash="22d2ae5a6407ea9dee6bb15bc4694f41"/><dir name="Core"><file name="Layout.php" hash="2617a3a763768b30bd4c67c8243ce892"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="eba1716a8a274dcafd1bb646b94ef84e"/><file name="config.xml" hash="bd7c3e1b4fdc821860e667b00c84f599"/><file name="system.xml" hash="10f6bb263f7a75a4359c2fd0d1ea26ef"/></dir></dir><dir name="Sidenav"><dir name="Block"><file name="Navigation.php" hash="431b1d46db0b59bd89714f641935305c"/></dir><dir name="Helper"><file name="Category.php" hash="31f8b4c1f7391567a8396ea763d65f0f"/><file name="Data.php" hash="b9ea5a08afe28a117cb5c47ac6738896"/></dir><dir name="Model"><dir name="Config"><file name="ColumnOptions.php" hash="6196bfe8ca72a223ca468968a323c753"/><file name="ParentOptions.php" hash="fe28b0bcd0752bd11539256f85414a3b"/><file name="ThumbSizeOptions.php" hash="5a5930e3fe754fe3f1996f3344d4b4ab"/></dir><file name="Config.php" hash="014867ec2cc7319081b07c74fc7f4c03"/></dir><dir name="etc"><file name="adminhtml.xml" hash="fbd1336cfc8228ef03b56128f395d6c9"/><file name="config.xml" hash="05ac7f75988ec0ef8c5fd2ce10303cc1"/><file name="system.xml" hash="11d70403543d3078eb828739b5be54b9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="sidenav.xml" hash="799262194fb4a846027d873fb2045146"/></dir><dir name="template"><dir name="codnitive"><dir name="catalog"><dir name="navigation"><file name="customer.phtml" hash="735ff0d9563a73624d0cc36b80fb2807"/><file name="left.phtml" hash="d0dbc580be8ec02cb314444a8dda2244"/><file name="right.phtml" hash="7f8a880978554ed8405121b00a4539d1"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="blank"><dir name="css"><file name="sidenav.css" hash="365a3fe8b0eaae130a2e364886f4badd"/></dir></dir><dir name="default"><dir name="css"><file name="sidenav.css" hash="c4e9a58b76a22403b7ee91a008c43681"/><file name="sidenavcollapse.css" hash="70e2cec086adbc77ed5f87c2e20a6fc5"/></dir><dir name="images"><file name="bkg_block-sidebarnav-actions.gif" hash="da2970eac0a22c850b19ee3680475d51"/><file name="bkg_block-sidebarnav-layered-dd.gif" hash="6ae6f8184e87de496fb74eeec65737c9"/><file name="bkg_block-sidebarnav-title.gif" hash="a269d8b84748540f9a4a4fb316d333ba"/><file name="arrows.gif" hash="9ea413987d4d17cc4de907a24dcbd268"/><file name="blue_arrows.gif" hash="151e6e7e3827265ed306ced85d165b38"/><file name="green_arrows.gif" hash="17c0766b23745095e6ee99067cedda19"/><file name="orange_arrows.gif" hash="36437d09042a820bd60952a44e287875"/></dir><dir name="js"><file name="sidenavcollapse.js" hash="c81b0b412fe684953e0936332d042915"/></dir></dir><dir name="f002"><dir name="css"><file name="sidenav.css" hash="ae0471527d041e05ab862a53a350ab91"/></dir></dir><dir name="modern"><dir name="css"><file name="sidenav.css" hash="a36ef40d5d57ab2122a1420be8f4895d"/><file name="sidenavcollapse.css.bak" hash="4ba9b8e5af018e0ff64813589e820528"/></dir><dir name="images"><file name="bkg_block-sidebarnav-actions.gif" hash="1f29cb35ff7946056eecd61ad3dabdfd"/><file name="bkg_block-sidebarnav-title.gif" hash="1e7d3408f8fc509f4e6e2869557d3c1d"/><file name="arrows.gif" hash="17c0766b23745095e6ee99067cedda19"/></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|
skin/frontend/default/default/images/arrows.gif
CHANGED
Binary file
|
skin/frontend/default/default/images/blue_arrows.gif
CHANGED
Binary file
|
skin/frontend/default/default/images/green_arrows.gif
CHANGED
Binary file
|
skin/frontend/default/default/images/orange_arrows.gif
CHANGED
Binary file
|
skin/frontend/default/modern/images/arrows.gif
CHANGED
Binary file
|