customtoolbar_module - Version 0.1.3

Version Notes

compatible patch supee 6788

Download this release

Release Info

Developer Biztech
Extension customtoolbar_module
Version 0.1.3
Comparing to
See all releases


Code changes from version 0.1.2 to 0.1.3

app/code/local/Biztech/All/Helper/Data.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
-
3
- class Biztech_All_Helper_Data extends Mage_Core_Helper_Abstract
4
- {
5
-
6
- }
 
 
 
 
 
 
app/code/local/Biztech/All/Model/All.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- class Biztech_All_Model_All extends Mage_Core_Model_Abstract
4
- {
5
- public function _construct()
6
- {
7
- parent::_construct();
8
- $this->_init('all/all');
9
- }
10
- }
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/All/Model/Mysql4/All.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- class Biztech_All_Model_Mysql4_All extends Mage_Core_Model_Mysql4_Abstract
4
- {
5
- public function _construct()
6
- {
7
- // Note that the all_id refers to the key field in your database table.
8
- $this->_init('all/all', 'all_id');
9
- }
10
- }
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/All/Model/Mysql4/All/Collection.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- class Biztech_All_Model_Mysql4_All_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
- {
5
- public function _construct()
6
- {
7
- parent::_construct();
8
- $this->_init('all/all');
9
- }
10
- }
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/All/Model/Source/Updates/Type.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
- /**
3
-
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the EULA
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
- */
11
-
12
- class Biztech_All_Model_Source_Updates_Type extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
13
- {
14
- const TYPE_UPDATE_RELEASE = 'UPDATE_RELEASE';
15
- const TYPE_INSTALLED_UPDATE = 'INSTALLED_UPDATE';
16
- public function toOptionArray()
17
- {
18
- return array(
19
- array('value' => self::TYPE_INSTALLED_UPDATE, 'label' => Mage::helper('all')->__('My extensions updates')),
20
- array('value' => self::TYPE_UPDATE_RELEASE, 'label' => Mage::helper('all')->__('All extensions updates')),
21
- );
22
- }
23
-
24
- public function getAllOptions()
25
- {
26
- return $this->toOptionArray();
27
- }
28
-
29
-
30
- public function getLabel($value)
31
- {
32
- $options = $this->toOptionArray();
33
- foreach ($options as $v) {
34
- if ($v['value'] == $value) {
35
- return $v['label'];
36
- }
37
- }
38
- return '';
39
- }
40
-
41
- public function getGridOptions()
42
- {
43
- $items = $this->getAllOptions();
44
- $out = array();
45
- foreach ($items as $item) {
46
- $out[$item['value']] = $item['label'];
47
- }
48
- return $out;
49
- }
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/All/Model/Status.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- class Biztech_All_Model_Status extends Varien_Object
4
- {
5
- const STATUS_ENABLED = 1;
6
- const STATUS_DISABLED = 2;
7
-
8
- static public function getOptionArray()
9
- {
10
- return array(
11
- self::STATUS_ENABLED => Mage::helper('all')->__('Enabled'),
12
- self::STATUS_DISABLED => Mage::helper('all')->__('Disabled')
13
- );
14
- }
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/All/Model/Update.php DELETED
@@ -1,86 +0,0 @@
1
- <?php
2
-
3
- class Biztech_All_Model_Update extends Mage_Core_Helper_Abstract
4
- {
5
-
6
- const UPDATE_NOTIFICATION_FEED_URL = 'http://store.biztechconsultancy.com/rss/catalog/new/store_id/1/';
7
- public function getInterests()
8
- {
9
- $types = @explode(',', Mage::getStoreConfig('all/all_general/interests'));
10
- return $types;
11
- }
12
- public function isExtensionInstalled($code)
13
- {
14
-
15
- $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
16
- foreach ($modules as $moduleName) {
17
- if ($moduleName == $code) {
18
- return true;
19
- }
20
- }
21
- return false;
22
- }
23
-
24
- public function check()
25
- {
26
- if ((time() - Mage::app()->loadCache('biztech_all_updates_feed_lastcheck')) > Mage::getStoreConfig('all/all_general/check_frequency')) {
27
- $this->refresh();
28
- }
29
- }
30
-
31
- public function refresh()
32
- {
33
- $types = array();
34
- $feedData = array();
35
- $extensio_module = array();
36
- try{
37
- $xml = file_get_contents(self::UPDATE_NOTIFICATION_FEED_URL);
38
- $xml = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);//LIBXML_NOCDATA LIBXML_NOWARNING
39
-
40
- $interests = $this->getInterests();
41
- if(!empty($interests[0])){
42
- $isInterestedInSelfUpgrades = in_array(Biztech_All_Model_Source_Updates_Type::TYPE_INSTALLED_UPDATE, $interests);
43
- $isInterestedInAllUpgrades = in_array(Biztech_All_Model_Source_Updates_Type::TYPE_UPDATE_RELEASE, $interests);
44
- $modules = Mage::getConfig()->getNode('modules')->children();
45
- $modulesArray = (array)$modules;
46
- foreach($xml->channel->item as $keys=>$extensions) {
47
- $types[] = (string) $extensions->update_notifications->type;
48
- $extensions_name = (string)$extensions->update_notifications->extensions;
49
-
50
- if((string)$extensions->update_notifications->date!=""&&(string)$extensions->update_notifications->extension_title!=""&&(string)$extensions->update_notifications->extension_content!=""&&(string)$extensions->update_notifications->product_url!=""){
51
- if(!$isInterestedInAllUpgrades){
52
- if ($this->isExtensionInstalled($extensions_name)) {
53
- $feedData[] = array(
54
- 'severity' => 4,
55
- 'date_added' => (string) $extensions->update_notifications->date,
56
- 'title' => (string)$extensions->update_notifications->extension_title,
57
- 'description' => (string)$extensions->update_notifications->extension_content,
58
- 'url' => (string)$extensions->update_notifications->product_url,
59
- );
60
- }
61
- } else{
62
- $feedData[] = array(
63
- 'severity' => 4,
64
- 'date_added' => (string)$extensions->update_notifications->date,
65
- 'title' => (string)$extensions->update_notifications->extension_title,
66
- 'description' => (string)$extensions->update_notifications->extension_content,
67
- 'url' => (string)$extensions->update_notifications->product_url,
68
- );
69
- }
70
- }
71
- }
72
- if ($feedData) {
73
- foreach($feedData as $data){
74
- if ((array_intersect($types,$interests) && $isInterestedInSelfUpgrades)) {
75
- Mage::getModel('adminnotification/inbox')->parse(array_reverse(array($data)));
76
- }
77
- }
78
- }
79
- Mage::app()->saveCache(time(), 'biztech_all_updates_feed_lastcheck');
80
- return true;
81
- }
82
- }catch (Exception $e) {
83
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
84
- }
85
- }
86
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/All/etc/config.xml DELETED
@@ -1,123 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * @category Biztech
5
- * @package Biztech_All
6
- * @author ModuleCreator
7
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
- */
9
- -->
10
- <config>
11
- <modules>
12
- <Biztech_All>
13
- <version>0.1.0</version>
14
- </Biztech_All>
15
- </modules>
16
- <frontend>
17
- <routers>
18
- <all>
19
- <use>standard</use>
20
- <args>
21
- <module>Biztech_All</module>
22
- <frontName>all</frontName>
23
- </args>
24
- </all>
25
- </routers>
26
-
27
- </frontend>
28
- <admin>
29
- <routers>
30
- <all>
31
- <use>admin</use>
32
- <args>
33
- <module>Biztech_All</module>
34
- <frontName>all</frontName>
35
- </args>
36
- </all>
37
- </routers>
38
- </admin>
39
- <adminhtml>
40
-
41
- <acl>
42
- <resources>
43
- <all>
44
- <title>Allow Everything</title>
45
- </all>
46
- <admin>
47
- <children>
48
- <Biztech_All>
49
- <title>All Module</title>
50
- <sort_order>10</sort_order>
51
- </Biztech_All>
52
- </children>
53
- </admin>
54
- </resources>
55
- </acl>
56
- <events>
57
- <controller_action_predispatch>
58
- <observers>
59
-
60
- <bzall_upds>
61
- <type>singleton</type>
62
- <class>all/update</class>
63
- <method>check</method>
64
- </bzall_upds>
65
- </observers>
66
- </controller_action_predispatch>
67
- </events>
68
-
69
- </adminhtml>
70
- <global>
71
- <models>
72
- <all>
73
- <class>Biztech_All_Model</class>
74
- <resourceModel>all_mysql4</resourceModel>
75
- </all>
76
- <all_mysql4>
77
- <class>Biztech_All_Model_Mysql4</class>
78
- <entities>
79
- <all>
80
- <table>all</table>
81
- </all>
82
- </entities>
83
- </all_mysql4>
84
- </models>
85
- <resources>
86
- <all_setup>
87
- <setup>
88
- <module>Biztech_All</module>
89
- </setup>
90
- <connection>
91
- <use>core_setup</use>
92
- </connection>
93
- </all_setup>
94
- <all_write>
95
- <connection>
96
- <use>core_write</use>
97
- </connection>
98
- </all_write>
99
- <all_read>
100
- <connection>
101
- <use>core_read</use>
102
- </connection>
103
- </all_read>
104
- </resources>
105
- <blocks>
106
- <all>
107
- <class>Biztech_All_Block</class>
108
- </all>
109
- </blocks>
110
- <helpers>
111
- <all>
112
- <class>Biztech_All_Helper</class>
113
- </all>
114
- </helpers>
115
- </global>
116
- <default>
117
- <all>
118
- <all_general>
119
- <check_frequency>86400</check_frequency>
120
- </all_general>
121
- </all>
122
- </default>
123
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/All/etc/system.xml DELETED
@@ -1,46 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <config>
3
- <tabs>
4
- <biztech translate="label" module="all">
5
- <label>Biztech Extensions</label>
6
- <sort_order>400</sort_order>
7
- </biztech>
8
- </tabs>
9
- <sections>
10
- <all translate="label" module="all">
11
- <label>Info</label>
12
- <tab>biztech</tab>
13
- <frontend_type>text</frontend_type>
14
- <sort_order>10</sort_order>
15
- <show_in_default>1</show_in_default>
16
- <show_in_website>1</show_in_website>
17
- <show_in_store>1</show_in_store>
18
- <groups>
19
-
20
- <all_general translate="label">
21
- <label>General</label>
22
- <frontend_type>text</frontend_type>
23
- <sort_order>10</sort_order>
24
- <show_in_default>1</show_in_default>
25
- <show_in_website>1</show_in_website>
26
- <show_in_store>1</show_in_store>
27
- <fields>
28
-
29
- <interests translate="label">
30
- <label>I'd like to be informed by Biztech about:</label>
31
- <comment></comment>
32
- <frontend_type>multiselect</frontend_type>
33
- <sort_order>100</sort_order>
34
- <show_in_default>1</show_in_default>
35
- <show_in_website>1</show_in_website>
36
- <show_in_store>1</show_in_store>
37
- <can_be_empty>1</can_be_empty>
38
- <source_model>all/source_updates_type</source_model>
39
- </interests>
40
-
41
- </fields>
42
- </all_general>
43
- </groups>
44
- </all>
45
- </sections>
46
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/Customtoolbar/controllers/IndexController (copy).php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Biztech_Customtoolbar_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ public function fillattvaluesAction()
10
+ {
11
+ $att_code = $this->getRequest()->getParam('att_code');
12
+ $json = array();
13
+ $att = Mage::getSingleton('eav/config')->getAttribute('catalog_product', $att_code);
14
+ $options = $att->getSource()->getAllOptions();
15
+
16
+ foreach($options as $option)
17
+ {
18
+ $json[] = array(
19
+ 'lable' => $option['label'],
20
+ 'value' => $option['value']
21
+ );
22
+ }
23
+ $this->getResponse()->setBody(Zend_Json::encode($json));
24
+ }
25
+
26
+
27
+ }
app/code/local/Biztech/Customtoolbar/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Biztech_Customtoolbar>
6
- <version>0.1.2</version>
7
  </Biztech_Customtoolbar>
8
  </modules>
9
  <frontend>
@@ -24,17 +24,18 @@
24
  </updates>
25
  </layout>
26
  </frontend>
27
- <admin>
28
  <routers>
29
- <customtoolbar>
30
- <use>admin</use>
31
- <args>
32
- <module>Biztech_Customtoolbar</module>
33
- <frontName>customtoolbar</frontName>
34
- </args>
35
- </customtoolbar>
36
  </routers>
37
  </admin>
 
38
  <adminhtml>
39
  <acl>
40
  <resources>
3
  <config>
4
  <modules>
5
  <Biztech_Customtoolbar>
6
+ <version>0.1.3</version>
7
  </Biztech_Customtoolbar>
8
  </modules>
9
  <frontend>
24
  </updates>
25
  </layout>
26
  </frontend>
27
+ <admin>
28
  <routers>
29
+ <adminhtml>
30
+ <args>
31
+ <modules>
32
+ <customtoolbar after="Mage_Adminhtml">Biztech_Customtoolbar_Adminhtml</customtoolbar>
33
+ </modules>
34
+ </args>
35
+ </adminhtml>
36
  </routers>
37
  </admin>
38
+
39
  <adminhtml>
40
  <acl>
41
  <resources>
app/design/frontend/default/default/template/customtoolbar/toolbar (copy).phtml ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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 design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Product list toolbar
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List_Toolbar
32
+ */
33
+ ?>
34
+ <style type="text/css" >
35
+ #loading-mask .update-popup { position:fixed; top:45%; left:45%; width:300px; margin-left:-105px; padding:15px 30px; background:#fff; color:#d85909; font-weight:bold; text-align:center; z-index:400; webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px;}
36
+ </style>
37
+ <?php
38
+ if($this->getCollection()->getSize()): ?>
39
+ <div class="toolbar">
40
+ <div class="pager">
41
+ <p class="amount">
42
+ <?php if($this->getLastPageNum()>1): ?>
43
+ <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
44
+ <?php else: ?>
45
+ <strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
46
+ <?php endif; ?>
47
+ </p>
48
+
49
+ <div class="limiter">
50
+ <label><?php echo $this->__('Show') ?></label>
51
+ <select onchange="setLocation(this.value)">
52
+ <?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
53
+ <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
54
+ <?php echo $_limit ?>
55
+ </option>
56
+ <?php endforeach; ?>
57
+ </select> <?php echo $this->__('per page') ?>
58
+ </div>
59
+
60
+
61
+ <?php echo $this->getPagerHtml() ?>
62
+
63
+ </div>
64
+
65
+ <?php if( $this->isExpanded() ): ?>
66
+ <div class="sorter">
67
+ <?php if( $this->isEnabledViewSwitcher() ): ?>
68
+ <p class="view-mode">
69
+ <?php $_modes = $this->getModes(); ?>
70
+ <?php if($_modes && count($_modes)>1): ?>
71
+ <label><?php echo $this->__('View as') ?>:</label>
72
+ <?php foreach ($this->getModes() as $_code=>$_label): ?>
73
+ <?php if($this->isModeActive($_code)): ?>
74
+ <strong title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></strong>&nbsp;
75
+ <?php else: ?>
76
+ <a href="<?php echo $this->getModeUrl($_code) ?>" title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></a>&nbsp;
77
+ <?php endif; ?>
78
+ <?php endforeach; ?>
79
+ <?php endif; ?>
80
+ </p>
81
+ <?php endif; ?>
82
+
83
+ <div class="sort-by" style="padding-right: 0px;">
84
+ <label><?php echo $this->__('Sort By') ?></label>
85
+ <select onchange="setLocation(this.value)">
86
+ <?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
87
+ <option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
88
+ <?php echo $this->__($_order) ?>
89
+ </option>
90
+ <?php endforeach; ?>
91
+ </select>
92
+ <?php if($this->getCurrentDirection() == 'desc'): ?>
93
+ <a href="<?php echo $this->getOrderUrl(null, 'asc') ?>" title="<?php echo $this->__('Set Ascending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_desc_arrow.gif') ?>" alt="<?php echo $this->__('Set Ascending Direction') ?>" class="v-middle" /></a>
94
+ <?php else: ?>
95
+ <a href="<?php echo $this->getOrderUrl(null, 'desc') ?>" title="<?php echo $this->__('Set Descending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_asc_arrow.gif') ?>" alt="<?php echo $this->__('Set Descending Direction') ?>" class="v-middle" /></a>
96
+ <?php endif; ?>
97
+ </div>
98
+
99
+
100
+
101
+ <?php
102
+ if(Mage::getStoreConfig('customtoolbar/customtoolbar_general/enabled') == 1):
103
+ ?>
104
+ <div class="filter-by" style="float: left; padding-left: 10px;">
105
+ <?php
106
+ $entity_type_id =Mage::getModel('catalog/product')->getResource()->getTypeId();
107
+ $attributes = Mage::getResourceModel('eav/entity_attribute_collection')->setEntityTypeFilter($entity_type_id)->addFieldToFilter("backend_type",array("eq"=>'int'))->addFieldToFilter("frontend_input",array("eq"=>'select'))->addFieldToFilter("used_for_filter_by",array("eq"=>'1'));
108
+ ?>
109
+ <table><tr><td>
110
+ <label><?php echo $this->__('Filter By') ?></label></td>
111
+ <td>
112
+ <select onchange="fillattvalue(this.value)" id="attributes" style="width: 82px;">
113
+ <option value="select"><?php echo $this->__('Please Select') ?></option>
114
+ <?php foreach($attributes as $attribute): ?>
115
+ <option value="<?php echo $attribute->getAttributeCode(); ?>">
116
+ <?php echo $attribute->getFrontendLabel() ?>
117
+ </option>
118
+ <?php endforeach; ?>
119
+ </select></td>
120
+ <td id="attvalue" style="display: none; padding-left: 10px; "></td>
121
+ </tr></table>
122
+ </div>
123
+ <?php endif ?>
124
+ </div>
125
+ <?php endif; ?>
126
+ </div>
127
+ <?php endif ?>
128
+
129
+
130
+ <script language ="javascript" type="text/javascript">
131
+ function fillattvalue(item)
132
+ {
133
+ var parameters = {att_code : item }
134
+ var url = '<?php echo Mage::helper('adminhtml')->getUrl('customtoolbar/index/fillattvalues'); ?>';
135
+ var e = document.getElementById("attributes");
136
+ var select_index = e.options[e.selectedIndex].value;
137
+ if(select_index == "select")
138
+ {
139
+ document.getElementById('attvalue').style.display='none';
140
+ }
141
+ else
142
+ {
143
+ document.getElementById('loading-mask').style.display = 'block';
144
+ new Ajax.Request(url, {
145
+ method: 'post',
146
+ //asynchronous: false,
147
+ onSuccess: function(transport) {
148
+ document.getElementById('loading-mask').style.display='block';
149
+ if(transport.responseText) {
150
+ var response = transport.responseText;
151
+ response = response.evalJSON();
152
+ var total_length = response.length;
153
+ var html='';
154
+ var cur_url = location.href;
155
+ var cur_att = document.getElementById("attributes").value;
156
+ var cur_cat_url ='<?php echo Mage::getBaseUrl().Mage::getModel('catalog/layer')->getCurrentCategory()->getUrlPath() ?>'
157
+ html+= '<select onchange="setLocation(this.value)" style="width:82px">';
158
+ html+= '<option value="">Please Select</option>';
159
+ for (var i=1;i<total_length;i++){
160
+ var inner_parameters = {
161
+ lable : response[i]['lable'],
162
+ value : response[i]['value']
163
+ }
164
+ <?php $is_anchor = Mage::getModel('catalog/layer')->getCurrentCategory()->getIsAnchor();
165
+ if($is_anchor == 1){ ?>
166
+ var baseURL = cur_cat_url + "?" + cur_att +"=" + response[i]['value'];
167
+ <?php } else { ?>
168
+ //var baseURL = cur_url.substring(0, cur_url.indexOf('/', 14))+ "/index.php/catalogsearch/result/?q=" + response[i]['lable'];
169
+ var baseURL = '<?php echo Mage::getBaseUrl() ?>' + "catalogsearch/advanced/result/?"+item+"[]=" + response[i]['value'];
170
+ <?php } ?>
171
+ html+= '<option value="'+baseURL+'">';
172
+ html+= response[i]['lable'];
173
+ html+='</option>';
174
+ }
175
+ html+='</select>'
176
+ document.getElementById('attvalue').innerHTML=html;
177
+ document.getElementById('loading-mask').style.display='none';
178
+ document.getElementById('attvalue').style.display='inline-block';
179
+ }
180
+ },
181
+ parameters:parameters
182
+ });
183
+ }
184
+ }
185
+
186
+ </script>
187
+
188
+ <div id="loading-mask" class="update-box" style="display:none;">
189
+ <div class="update-popup" style="background: url(<?php echo $this->getSkinUrl('images/main-bg.png') ?>) repeat;">
190
+ <p><?php echo $this->__('Please wait....') ?></p>
191
+ </div>
192
+ </div>
package.xml CHANGED
@@ -1,26 +1,25 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>customtoolbar_module</name>
4
- <version>0.1.2</version>
5
- <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Custom toolbar allows the users to filter the products based on the attributes of products. </summary>
10
  <description>Custom toolbar allows the users to filter the products based on the attributes of products. This is very convenient tool both for the purchaser and the customers.&#xD;
11
  Online store owners who deal with huge bulk of products, can drive the maximum out of this extension. They can easily organize their products so that their clients don&#x2019;t face any difficulty in finding the specific products with specific quality.&#xD;
12
- You can filter your products based on any attribute as per your choice. For instance you can provide elements such as color, size, manufacturer, category etc to filter the products. When customers select any of these attributes, another drop down box appears to allow them to finish their selection. For e.g. if a client wants to filter some product based on color, then when he/she choose color from the filter drop down box, another drop down box appears from where they can select any color of their choice.&#xD;
13
- Advantages&#xD;
14
- &#x2022; This Magento module allows you to provide layered navigation for your products for the ease of visitors. This layered navigation facility saves lot of time of customer&#x2019;s required in shopping. Thus they become returning customers and the sale improves automatically.&#xD;
15
- &#x2022; Instead of going deep down the navigation system to find the availability of some product fulfilling certain requirement, this extension helps viewers to filter products right from the beginning. This toolbar is present on category list page for the convenience of the clients.&#xD;
16
- &#x2022; The custom Toolbar module allows your customers to get quick access to regularly used product with specific characteristics.&#xD;
17
- &#x2022; The extension consists of friendly user interface making it easier to use. It can be installed quickly and with ease. &#xD;
18
- </description>
19
- <notes>Bug fixing</notes>
20
  <authors><author><name>Biztech</name><user>biztechcon</user><email>sales@biztechconsultancy.com</email></author></authors>
21
- <date>2014-06-13</date>
22
- <time>10:43:31</time>
23
- <contents><target name="mageetc"><dir name="modules"><file name="Biztech_Customtoolbar.xml" hash="6cd053117e062b8334759941b84c7806"/></dir><dir name="Biztech"><file name="All" hash=""/></dir></target><target name="magelocal"><dir name="Biztech"><dir name="Customtoolbar"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Attribute"><dir name="Edit"><dir name="Tab"><file name="Main.php" hash="46b5eac785f0f40e551b8a43eb71f4ed"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="82893973976fdab398b0d061e8426390"/></dir><dir name="controllers"><file name="IndexController.php" hash="19b0c174b4ee577fa83122e20da6ac79"/></dir><dir name="etc"><file name="config.xml" hash="0ac999598aab40703399d0c724ee4f33"/><file name="system.xml" hash="3ccc36394334e30115890a5edffba211"/></dir><dir name="sql"><dir name="customtoolbar_setup"><file name="mysql4-install-0.1.0.php" hash="127973676228a67a8600437da0d08866"/></dir></dir></dir><dir name="All"><dir name="Helper"><file name="Data.php" hash="e856726fd089e7f73ca7de450b696419"/></dir><dir name="Model"><file name="All.php" hash="a9aeeb9c6d7be9cf20414f405efc878d"/><dir name="Mysql4"><dir name="All"><file name="Collection.php" hash="a1909236183d126f38e628b85bb57e81"/></dir><file name="All.php" hash="f02542393eb26eadfb9b92d901d2ac12"/></dir><dir name="Source"><dir name="Updates"><file name="Type.php" hash="fa695bf4764c2d93c7436ed54bde89ba"/></dir></dir><file name="Status.php" hash="30a6f0da7d9d45e1082da532d5f8dabc"/><file name="Update.php" hash="83ceddbab4d621545b9c7c4bccdec7c0"/></dir><dir name="etc"><file name="config.xml" hash="4a017647b9d0bb08f59234fd72f06e4b"/><file name="system.xml" hash="17262087dc933d934e09ac04cafb4c51"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="customtoolbar.xml" hash="33b5081676020676c9e374f54a6da200"/></dir><dir name="template"><dir name="customtoolbar"><file name="toolbar.phtml" hash="ed67c81872dfb5444c98377ceedcfbd8"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><file name="main-bg.png" hash="615e539beac7fc4ad7b6aa7e519ca2ee"/></dir></dir></dir></dir></target></contents>
24
  <compatible/>
25
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>customtoolbar_module</name>
4
+ <version>0.1.3</version>
5
+ <stability>devel</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Custom toolbar allows the users to filter the products based on the attributes of products.</summary>
10
  <description>Custom toolbar allows the users to filter the products based on the attributes of products. This is very convenient tool both for the purchaser and the customers.&#xD;
11
  Online store owners who deal with huge bulk of products, can drive the maximum out of this extension. They can easily organize their products so that their clients don&#x2019;t face any difficulty in finding the specific products with specific quality.&#xD;
12
+ You can filter your products based on any attribute as per your choice. For instance you can provide elements such as color, size, manufacturer, category etc to filter the products. When customers select any of these attributes, another drop down box appears to allow them to finish their selection. For e.g. if a client wants to filter some product based on color, then when he/she choose color from the filter drop down box, another drop down box appears from where they can select any color of their choice.&#xD;
13
+ Advantages&#xD;
14
+ &#x2022; This Magento module allows you to provide layered navigation for your products for the ease of visitors. This layered navigation facility saves lot of time of customer&#x2019;s required in shopping. Thus they become returning customers and the sale improves automatically.&#xD;
15
+ &#x2022; Instead of going deep down the navigation system to find the availability of some product fulfilling certain requirement, this extension helps viewers to filter products right from the beginning. This toolbar is present on category list page for the convenience of the clients.&#xD;
16
+ &#x2022; The custom Toolbar module allows your customers to get quick access to regularly used product with specific characteristics.&#xD;
17
+ &#x2022; The extension consists of friendly user interface making it easier to use. It can be installed quickly and with ease.</description>
18
+ <notes>compatible patch supee 6788 </notes>
 
19
  <authors><author><name>Biztech</name><user>biztechcon</user><email>sales@biztechconsultancy.com</email></author></authors>
20
+ <date>2016-03-14</date>
21
+ <time>05:40:43</time>
22
+ <contents><target name="magelocal"><dir name="Biztech"><dir name="Customtoolbar"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Attribute"><dir name="Edit"><dir name="Tab"><file name="Main.php" hash="46b5eac785f0f40e551b8a43eb71f4ed"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="82893973976fdab398b0d061e8426390"/></dir><dir name="controllers"><file name="IndexController (copy).php" hash="19b0c174b4ee577fa83122e20da6ac79"/><file name="IndexController.php" hash="19b0c174b4ee577fa83122e20da6ac79"/></dir><dir name="etc"><file name="config.xml" hash="1c0025737d8bb58d85297b74f5bcfd43"/><file name="system.xml" hash="3ccc36394334e30115890a5edffba211"/></dir><dir name="sql"><dir name="customtoolbar_setup"><file name="mysql4-install-0.1.0.php" hash="127973676228a67a8600437da0d08866"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="customtoolbar.xml" hash="33b5081676020676c9e374f54a6da200"/></dir><dir name="template"><dir name="customtoolbar"><file name="toolbar (copy).phtml" hash="ed67c81872dfb5444c98377ceedcfbd8"/><file name="toolbar.phtml" hash="ed67c81872dfb5444c98377ceedcfbd8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Biztech_Customtoolbar.xml" hash="6cd053117e062b8334759941b84c7806"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><file name="main-bg.png" hash="615e539beac7fc4ad7b6aa7e519ca2ee"/></dir></dir></dir></dir></target></contents>
23
  <compatible/>
24
+ <dependencies><required><php><min>5.0.1</min><max>6.0.0</max></php></required></dependencies>
25
  </package>