Techinflo_Mystore - Version 1.0.1

Version Notes

My STORE extension sorts the products based on user preferences saved,
user will see only he/his preferred range of products.


User Store preferences based on following terms and able to save the user specific preferences.

1. My store tab for the specific user to buy his own preferable products.

2. User can set their product preferences based on the following terms.

Based on
- Categories like Men, Women, Kid etc
- Price ranges
- Brand ranges

3. Saving the user preferences and showing the same preference ranged products on revisits.

4. Allowing the user to set preferences and filter the products of their preference.

5. User is able to change or update his preferences periodically.

Set Up Information



1. Please ensure that the store is having atleast one product associated with atleast one category under the root category.




2. Ensure that the brand dropdown attribute is created for the products with attribute code 'brand'. and give appropriate options for it.




3. Associate the brand name with each product.



Download this release

Release Info

Developer Techinflo
Extension Techinflo_Mystore
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

Files changed (21) hide show
  1. app/code/local/Mage/Mystore/Helper/Data.php +11 -0
  2. app/code/local/Techinflo/MyStoreWidget/etc/config.xml +1 -1
  3. app/code/local/Techinflo/Mystore/controllers/new 2.txt +0 -104
  4. app/code/local/Techinflo/Mystore/etc/config.xml +2 -2
  5. app/code/local/Techinflo/MystoreOption/etc/config.xml +1 -1
  6. app/design/frontend/default/default/layout/customer.rar +0 -0
  7. app/design/frontend/default/default/layout/mystorewidget.xml +418 -0
  8. app/design/frontend/default/default/layout/page.xml +194 -0
  9. app/design/frontend/default/default/layout/pay.xml +13 -0
  10. app/design/frontend/default/default/layout/techinflo/customer/mystore.xml +24 -0
  11. app/design/frontend/default/default/layout/techinflo/local.xml +24 -0
  12. app/design/frontend/default/default/template/catalog/product/list.phtml +509 -0
  13. app/design/frontend/default/default/template/catalog/product/list/toolbar.phtml +97 -0
  14. app/design/frontend/default/default/template/catalog/product/list_dummy.phtml +329 -0
  15. app/design/frontend/default/default/template/techinflo/customer/form/register.phtml +430 -0
  16. app/design/frontend/default/default/template/techinflo/customer/page.phtml +333 -0
  17. app/design/frontend/default/default/template/techinflo/page/html/header.phtml +35 -0
  18. app/design/frontend/default/default/template/techinflo/page/html/topmenu.phtml +364 -0
  19. app/design/frontend/default/default/template/techinflo/page/html/topmenu_dummy.phtml +369 -0
  20. app/design/frontend/default/default/template/techinflo/page/template/links.phtml +345 -0
  21. package.xml +24 -19
app/code/local/Mage/Mystore/Helper/Data.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Mage_Mystore_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+ public function isEnabled()
6
+ {
7
+ return Mage::getStoreConfig('techinflo/mystoreoption/active');
8
+ }
9
+ }
10
+
11
+ ?>
app/code/local/Techinflo/MyStoreWidget/etc/config.xml CHANGED
@@ -18,7 +18,7 @@
18
  <layout>
19
  <updates>
20
  <mystorewidget>
21
- <file>mystorewidget.xml</file>
22
  </mystorewidget>
23
  </updates>
24
  </layout>
18
  <layout>
19
  <updates>
20
  <mystorewidget>
21
+ <file>techinflo/catalog/mystorewidget.xml</file>
22
  </mystorewidget>
23
  </updates>
24
  </layout>
app/code/local/Techinflo/Mystore/controllers/new 2.txt DELETED
@@ -1,104 +0,0 @@
1
- $email = $this->getRequest()->getPost('email');
2
- $brand = $this->getRequest()->getPost('brand');
3
- $brands = $this->getRequest()->getPost('brands');
4
- $price = $this->getRequest()->getPost('price');
5
- $prices = $this->getRequest()->getPost('prices');
6
- $category = $this->getRequest()->getPost('category');
7
- $categories = $this->getRequest()->getPost('categories');
8
- $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
9
- $sql = "INSERT INTO `customer_mystore_prefference` (`customer_email`,`brand`,`category`,`price`,`brands`,`categories`,`prices`) VALUES ('$email','$brand','$category','$price','$brands','$categories','$prices')";
10
- $connection->query($sql);
11
-
12
-
13
-
14
- if($this->getRequest()->getPost('brand') = 'off')
15
- {
16
- $brand = 'off';
17
- $brands = 'off';
18
- }
19
-
20
- else {
21
- $brand = $this->getRequest()->getPost('brand');
22
- $brands = $this->getRequest()->getPost('brands');
23
- UPDATE `customer_mystore_prefference` SET brand =0,category =1,price =0,brands = NULL ,categories =1,prices = NULL WHERE customer_email = 'James@gmail.com'
24
-
25
-
26
- {
27
-
28
- $email = Mage::getSingleton('customer/session')->getCustomer()->getCustomer_email();
29
-
30
- if($this->getRequest()->isPost())
31
- {
32
-
33
-
34
- $brand = $this->getRequest()->getPost('brand') ;
35
- if($brand = '1')
36
- {
37
- $brands = $this->getRequest()->getPost('brands');
38
- }
39
- else
40
- {
41
- $brands = 'NULL';
42
- }
43
-
44
- $price = $this->getRequest()->getPost('price');
45
- if($price = '1')
46
- {
47
- $prices = $this->getRequest()->getPost('prices');
48
- }
49
- else
50
- {
51
- $prices = 'NULL';
52
- }
53
-
54
- $category = $this->getRequest()->getPost('category');
55
- if($categories = '1')
56
- {
57
- $categories = $this->getRequest()->getPost('categories');
58
- }
59
- else
60
- {
61
- $categories = 'NULL';
62
- }
63
-
64
- //$write = Mage::getSingleton('core/resource')->getConnection('core_write');
65
- $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
66
-
67
-
68
- $sql = "UPDATE `customer_mystore_prefference` SET brand =$brand,category =$category,price =$price,brands = $brands,categories =$categories,prices = $prices WHERE customer_email = '$email'";
69
-
70
- $connection->query($sql);
71
- }
72
-
73
-
74
-
75
-
76
- public function saveprefferenceAction() {
77
-
78
- if(Mage::getSingleton('customer/session')->isLoggedIn())
79
- {
80
- $email = $this->getRequest()->getPost('email');
81
- $brand = $this->getRequest()->getPost('brand');
82
- $brands = $this->getRequest()->getPost('brands');
83
- $price = $this->getRequest()->getPost('price');
84
- $prices = $this->getRequest()->getPost('prices');
85
- $category = $this->getRequest()->getPost('category');
86
- $categories = $this->getRequest()->getPost('categories');
87
- $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
88
-
89
-
90
- $sql = "UPDATE `customer_mystore_prefference` SET brand =$brand,category =$category,price =$price,brands = $brands,categories =$categories,prices = $prices WHERE customer_email = '$email'";
91
-
92
- $connection->query($sql);
93
- }
94
-
95
-
96
- }
97
-
98
- <?php
99
- $sql = "SELECT * FROM customer_mystore_prefference WHERE Customer_email='$email'";
100
- $connection = Mage::getSingleton('core/resource')->getConnection('core_read');
101
- foreach ($connection->fetchAll($sql) as $arr_row) {
102
- echo $arr_row['brand'];
103
- }
104
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Techinflo/Mystore/etc/config.xml CHANGED
@@ -50,8 +50,8 @@
50
  <layout>
51
  <updates>
52
  <techinflo>
53
- <!--app\design\frontend\default\default\layout\customer\mystore.xml-->
54
- <file>customer/mystore.xml</file>
55
  </techinflo>
56
  </updates>
57
  </layout>
50
  <layout>
51
  <updates>
52
  <techinflo>
53
+ <!--app\design\frontend\default\default\layout\customer\mystore.xml-->
54
+ <file>techinflo/customer/mystore.xml</file>
55
  </techinflo>
56
  </updates>
57
  </layout>
app/code/local/Techinflo/MystoreOption/etc/config.xml CHANGED
@@ -46,7 +46,7 @@
46
  <layout>
47
  <updates>
48
  <mystoreoption>
49
- <file>mystoreoption.xml</file>
50
  </mystoreoption>
51
  </updates>
52
  </layout>
46
  <layout>
47
  <updates>
48
  <mystoreoption>
49
+ <file>techinflo/local.xml</file>
50
  </mystoreoption>
51
  </updates>
52
  </layout>
app/design/frontend/default/default/layout/customer.rar ADDED
Binary file
app/design/frontend/default/default/layout/mystorewidget.xml ADDED
@@ -0,0 +1,418 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ Supported layout update handles (action):
29
+ - catalog_product_gallery
30
+ - catalog_product_compare_index
31
+
32
+ Supported layout update handles (special):
33
+ - default
34
+ - catalog_category_default
35
+ - catalog_category_layered
36
+ - catalog_product_view
37
+
38
+ -->
39
+ <layout version="1.0.0">
40
+
41
+ <!--
42
+ Default layout, loads most of the pages
43
+ -->
44
+
45
+ <default>
46
+
47
+ <!-- Mage_Catalog -->
48
+ <reference name="left">
49
+ <block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
50
+ <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
51
+ <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
52
+ <action method="setLinkUrl"><url>checkout/cart</url></action>
53
+ </block>
54
+ </reference>
55
+ <reference name="right">
56
+ <block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
57
+ <block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
58
+ <action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
59
+ <action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>
60
+ </block>
61
+ </reference>
62
+ <reference name="footer_links">
63
+ <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
64
+ </reference>
65
+ <block type="catalog/product_price_template" name="catalog_product_price_template" />
66
+ </default>
67
+
68
+
69
+ <!--
70
+ Category default layout
71
+ -->
72
+
73
+ <catalog_category_default translate="label">
74
+ <label>Catalog Category (Non-Anchor)</label>
75
+ <reference name="left">
76
+ <block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
77
+ </reference>
78
+ <reference name="content">
79
+ <block type="catalog/category_view" name="category.products" template="techinflo/catalog/category/view.phtml">
80
+ <block type="catalog/product_list" name="product_list" template="techinflo/catalog/product/list.phtml">
81
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="techinflo/catalog/product/list/toolbar.phtml">
82
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
83
+ <!-- The following code shows how to set your own pager increments -->
84
+ <!--
85
+ <action method="setDefaultListPerPage"><limit>4</limit></action>
86
+ <action method="setDefaultGridPerPage"><limit>9</limit></action>
87
+ <action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
88
+ <action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
89
+ <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
90
+ <action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
91
+ <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
92
+ -->
93
+ </block>
94
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
95
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
96
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
97
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
98
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
99
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
100
+ </block>
101
+ </block>
102
+ </reference>
103
+ </catalog_category_default>
104
+
105
+ <!--
106
+ Category layered navigation layout
107
+ -->
108
+
109
+ <catalog_category_layered translate="label">
110
+ <label>Catalog Category (Anchor)</label>
111
+ <reference name="left">
112
+ <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
113
+ </reference>
114
+ <reference name="content">
115
+ <block type="catalog/category_view" name="category.products" template="techinflo/catalog/category/view.phtml">
116
+ <block type="catalog/product_list" name="product_list" template="techinflo/catalog/product/list.phtml">
117
+ <!-- <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/su.phtml</template></action> -->
118
+ <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="techinflo/catalog/product/list/toolbar.phtml">
119
+ <block type="page/html_pager" name="product_list_toolbar_pager"/>
120
+ <!-- The following code shows how to set your own pager increments -->
121
+ <!--
122
+ <action method="setDefaultListPerPage"><limit>4</limit></action>
123
+ <action method="setDefaultGridPerPage"><limit>3</limit></action>
124
+ <action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
125
+ <action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
126
+ <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
127
+ <action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
128
+ <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
129
+ <action method="addPagerLimit"><mode>grid</mode><limit>3</limit></action>
130
+ <action method="addPagerLimit"><mode>grid</mode><limit>6</limit></action>
131
+ <action method="addPagerLimit"><mode>grid</mode><limit>9</limit></action>
132
+ <action method="addPagerLimit" translate="label"><mode>grid</mode><limit>all</limit><label>All</label></action>
133
+ -->
134
+ </block>
135
+ <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
136
+ <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
137
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
138
+ <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
139
+ <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
140
+ <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
141
+ </block>
142
+ </block>
143
+ </reference>
144
+ </catalog_category_layered>
145
+
146
+ <!--
147
+ Compare products page
148
+ -->
149
+
150
+ <catalog_product_compare_index translate="label">
151
+ <label>Catalog Product Compare List</label>
152
+ <!-- Mage_Catalog -->
153
+ <reference name="root">
154
+ <action method="setTemplate"><template>page/popup.phtml</template></action>
155
+ </reference>
156
+ <reference name="head">
157
+ <action method="addJs"><script>scriptaculous/scriptaculous.js</script></action>
158
+ <action method="addJs"><script>varien/product.js</script></action>
159
+ </reference>
160
+ <reference name="content">
161
+ <block type="catalog/product_compare_list" name="catalog.compare.list" template="catalog/product/compare/list.phtml"/>
162
+ </reference>
163
+ </catalog_product_compare_index>
164
+
165
+ <customer_account_index>
166
+ <reference name="right">
167
+ <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
168
+ </reference>
169
+ </customer_account_index>
170
+
171
+ <!--
172
+ Product view
173
+ -->
174
+
175
+ <catalog_product_view translate="label">
176
+ <label>Catalog Product View (Any)</label>
177
+ <!-- Mage_Catalog -->
178
+ <reference name="root">
179
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
180
+ </reference>
181
+ <reference name="head">
182
+ <action method="addJs"><script>varien/product.js</script></action>
183
+ <action method="addJs"><script>varien/configurable.js</script></action>
184
+
185
+ <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
186
+ <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
187
+ <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
188
+ </reference>
189
+ <reference name="content">
190
+ <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
191
+ <!--
192
+ <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/summary.phtml</template></action>
193
+ <action method="addReviewSummaryTemplate"><type>short</type><template>review/helper/summary_short.phtml</template></action>
194
+ <action method="addReviewSummaryTemplate"><type>...</type><template>...</template></action>
195
+ -->
196
+ <block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml"/>
197
+ <block type="core/text_list" name="alert.urls" as="alert_urls" translate="label">
198
+ <label>Alert Urls</label>
199
+ </block>
200
+
201
+ <action method="setTierPriceTemplate"><template>catalog/product/view/tierprices.phtml</template></action>
202
+
203
+ <block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
204
+ <action method="setColumnCount"><columns>4</columns></action>
205
+ <action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
206
+ </block>
207
+
208
+ <block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data" />
209
+ <block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
210
+ <action method="addToParentGroup"><group>detailed_info</group></action>
211
+ </block>
212
+ <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
213
+ <action method="addToParentGroup"><group>detailed_info</group></action>
214
+ </block>
215
+ <block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
216
+ <block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>
217
+
218
+ <block type="core/text_list" name="product.info.extrahint" as="extrahint" translate="label">
219
+ <label>Product View Extra Hint</label>
220
+ </block>
221
+
222
+ <block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label">
223
+ <label>Info Column Options Wrapper</label>
224
+ <block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/>
225
+ <block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
226
+ <action method="addOptionRenderer"><type>text</type><block>catalog/product_view_options_type_text</block><template>catalog/product/view/options/type/text.phtml</template></action>
227
+ <action method="addOptionRenderer"><type>file</type><block>catalog/product_view_options_type_file</block><template>catalog/product/view/options/type/file.phtml</template></action>
228
+ <action method="addOptionRenderer"><type>select</type><block>catalog/product_view_options_type_select</block><template>catalog/product/view/options/type/select.phtml</template></action>
229
+ <action method="addOptionRenderer"><type>date</type><block>catalog/product_view_options_type_date</block><template>catalog/product/view/options/type/date.phtml</template></action>
230
+ </block>
231
+ <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
232
+ </block>
233
+ <block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
234
+ <label>Bottom Block Options Wrapper</label>
235
+ <action method="insert"><block>product.tierprices</block></action>
236
+ <block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/>
237
+ <action method="append"><block>product.info.addtocart</block></action>
238
+ <action method="append"><block>product.info.addto</block></action>
239
+ </block>
240
+
241
+ <block type="core/template_facade" name="product.info.container1" as="container1">
242
+ <action method="setDataByKey"><key>alias_in_layout</key><value>container1</value></action>
243
+ <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
244
+ <action method="append"><block>product.info.options.wrapper</block></action>
245
+ <action method="append"><block>product.info.options.wrapper.bottom</block></action>
246
+ </block>
247
+ <block type="core/template_facade" name="product.info.container2" as="container2">
248
+ <action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>
249
+ <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
250
+ <action method="append"><block>product.info.options.wrapper</block></action>
251
+ <action method="append"><block>product.info.options.wrapper.bottom</block></action>
252
+ </block>
253
+ <action method="unsetCallChild"><child>container1</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
254
+ <action method="unsetCallChild"><child>container2</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
255
+ </block>
256
+ </reference>
257
+ <reference name="right">
258
+ <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
259
+ </reference>
260
+ </catalog_product_view>
261
+
262
+ <!--
263
+ Additional block dependant on product type
264
+ -->
265
+ <PRODUCT_TYPE_simple translate="label" module="catalog">
266
+ <label>Catalog Product View (Simple)</label>
267
+ <reference name="product.info">
268
+ <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
269
+ <block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
270
+ <label>Product Extra Info</label>
271
+ </block>
272
+ </block>
273
+ </reference>
274
+ </PRODUCT_TYPE_simple>
275
+ <PRODUCT_TYPE_configurable translate="label" module="catalog">
276
+ <label>Catalog Product View (Configurable)</label>
277
+ <reference name="product.info">
278
+ <block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/default.phtml">
279
+ <block type="core/text_list" name="product.info.configurable.extra" as="product_type_data_extra" translate="label">
280
+ <label>Product Extra Info</label>
281
+ </block>
282
+ </block>
283
+ </reference>
284
+ <reference name="product.info.options.wrapper">
285
+ <block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml"/>
286
+ </reference>
287
+ </PRODUCT_TYPE_configurable>
288
+ <PRODUCT_TYPE_grouped translate="label" module="catalog">
289
+ <label>Catalog Product View (Grouped)</label>
290
+ <reference name="product.info">
291
+ <block type="catalog/product_view_type_grouped" name="product.info.grouped" as="product_type_data" template="catalog/product/view/type/grouped.phtml">
292
+ <block type="core/text_list" name="product.info.grouped.extra" as="product_type_data_extra" translate="label">
293
+ <label>Product Extra Info</label>
294
+ </block>
295
+ </block>
296
+ </reference>
297
+ </PRODUCT_TYPE_grouped>
298
+ <PRODUCT_TYPE_virtual translate="label" module="catalog">
299
+ <label>Catalog Product View (Virtual)</label>
300
+ <reference name="product.info">
301
+ <block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
302
+ <block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
303
+ <label>Product Extra Info</label>
304
+ </block>
305
+ </block>
306
+ </reference>
307
+ </PRODUCT_TYPE_virtual>
308
+
309
+
310
+
311
+ <!--
312
+ Product send to friend
313
+ -->
314
+
315
+ <catalog_product_send translate="label">
316
+ <label>Catalog Product Email to a Friend</label>
317
+ <!-- Mage_Catalog -->
318
+ <reference name="root">
319
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
320
+ </reference>
321
+ <reference name="head">
322
+ <action method="addJs"><script>varien/product.js</script></action>
323
+ </reference>
324
+ <reference name="content">
325
+ <block type="catalog/product_send" name="product.send" template="catalog/product/send.phtml">
326
+ </block>
327
+ </reference>
328
+ </catalog_product_send>
329
+
330
+ <!--
331
+ Product additional images gallery popup
332
+ -->
333
+
334
+ <catalog_product_gallery translate="label">
335
+ <label>Catalog Product Image Gallery Popup</label>
336
+ <!-- Mage_Catalog -->
337
+ <reference name="root">
338
+ <action method="setTemplate"><template>page/popup.phtml</template></action>
339
+ </reference>
340
+ <reference name="content">
341
+ <block type="catalog/product_gallery" name="catalog_product_gallery" template="catalog/product/gallery.phtml"/>
342
+ </reference>
343
+ </catalog_product_gallery>
344
+
345
+ <!--
346
+ SEO Site Map
347
+ -->
348
+
349
+ <catalog_seo_sitemap translate="label">
350
+ <label>Catalog Seo Sitemap (Common)</label>
351
+ <remove name="right"/>
352
+ <remove name="left"/>
353
+
354
+ <reference name="root">
355
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
356
+ </reference>
357
+ <reference name="content">
358
+ <block type="page/template_container" name="seo.sitemap.container" template="catalog/seo/sitemap/container.phtml">
359
+ <block type="page/template_links" name="seo.sitemap.links" as="links" template="page/template/links.phtml"/>
360
+ <block type="page/html_pager" name="seo.sitemap.pager.top" as="pager_top" template="page/html/pager.phtml"/>
361
+ <block type="page/html_pager" name="seo.sitemap.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
362
+ </block>
363
+ </reference>
364
+ </catalog_seo_sitemap>
365
+
366
+ <catalog_seo_sitemap_category translate="label">
367
+ <label>Catalog Seo Sitemap (Category List)</label>
368
+ <reference name="head">
369
+ <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
370
+ </reference>
371
+ <update handle="catalog_seo_sitemap" />
372
+ <reference name="seo.sitemap.container">
373
+ <action method="setTitle" translate="title" module="catalog"><title>Categories</title></action>
374
+ <block type="catalog/seo_sitemap_category" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
375
+ <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
376
+ <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
377
+ <action method="setItemsTitle" translate="title" module="catalog"><title>categories</title></action>
378
+ </block>
379
+ </reference>
380
+ <reference name="seo.sitemap.links">
381
+ <action method="addLink" translate="label title" module="catalog"><label>Products Sitemap</label><url helper="catalog/map/getProductUrl"/><title>Products Sitemap</title></action>
382
+ </reference>
383
+ </catalog_seo_sitemap_category>
384
+
385
+ <catalog_seo_sitemap_category_tree translate="label">
386
+ <label>Catalog Seo Sitemap (Category Tree)</label>
387
+ <reference name="seo.sitemap.container">
388
+ <remove name="seo.sitemap.pager.top" />
389
+ <remove name="seo.sitemap.pager.bottom" />
390
+ <block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.top" as="pager_top" template="page/html/pager.phtml"/>
391
+ <block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
392
+ <remove name="seo.sitemap.sitemap" />
393
+ <block type="catalog/seo_sitemap_tree_category" name="seo.sitemap.sitemap_tree" as="sitemap" after="pager_top" template="catalog/seo/tree.phtml">
394
+ <action method="bindPager"><pager>seo.sitemap.tree.pager.top</pager></action>
395
+ <action method="bindPager"><pager>seo.sitemap.tree.pager.bottom</pager></action>
396
+ </block>
397
+ </reference>
398
+ </catalog_seo_sitemap_category_tree>
399
+
400
+ <catalog_seo_sitemap_product translate="label">
401
+ <label>Catalog Seo Sitemap (Product List)</label>
402
+ <reference name="head">
403
+ <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
404
+ </reference>
405
+ <update handle="catalog_seo_sitemap" />
406
+ <reference name="seo.sitemap.container">
407
+ <action method="setTitle" translate="title" module="catalog"><title>Products</title></action>
408
+ <block type="catalog/seo_sitemap_product" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
409
+ <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
410
+ <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
411
+ <action method="setItemsTitle" translate="title" module="catalog"><title>products</title></action>
412
+ </block>
413
+ </reference>
414
+ <reference name="seo.sitemap.links">
415
+ <action method="addLink" translate="label title" module="catalog"><label>Categories Sitemap</label><url helper="catalog/map/getCategoryUrl"/><title>Categories Sitemap</title></action>
416
+ </reference>
417
+ </catalog_seo_sitemap_product>
418
+ </layout>
app/design/frontend/default/default/layout/page.xml ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <layout version="0.1.0">
29
+ <!--
30
+ Default layout, loads most of the pages
31
+ -->
32
+
33
+ <default translate="label" module="page">
34
+ <label>All Pages</label>
35
+ <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
36
+
37
+ <block type="page/html_head" name="head" as="head">
38
+ <action method="addJs"><script>prototype/prototype.js</script></action>
39
+ <action method="addJs"><script>lib/ccard.js</script></action>
40
+ <action method="addJs"><script>prototype/validation.js</script></action>
41
+ <action method="addJs"><script>scriptaculous/builder.js</script></action>
42
+ <action method="addJs"><script>scriptaculous/effects.js</script></action>
43
+ <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
44
+ <action method="addJs"><script>scriptaculous/controls.js</script></action>
45
+ <action method="addJs"><script>scriptaculous/slider.js</script></action>
46
+ <action method="addJs"><script>varien/js.js</script></action>
47
+ <action method="addJs"><script>varien/form.js</script></action>
48
+ <action method="addJs"><script>varien/menu.js</script></action>
49
+ <action method="addJs"><script>mage/translate.js</script></action>
50
+ <action method="addJs"><script>mage/cookies.js</script></action>
51
+
52
+ <!-- Global JS function for the mystore prefference-->
53
+ <action method="addJs"><script>mystore/prefference.js</script></action>
54
+
55
+ <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
56
+
57
+ <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
58
+ <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
59
+ <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
60
+ <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
61
+
62
+ <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
63
+ <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
64
+ </block>
65
+
66
+ <block type="core/text_list" name="after_body_start" as="after_body_start" translate="label">
67
+ <label>Page Top</label>
68
+ </block>
69
+
70
+ <block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" />
71
+
72
+ <block type="page/html_header" name="header" as="header">
73
+ <block type="page/template_links" name="top.links" as="topLinks" template="techinflo/page/template/links.phtml"/>
74
+ <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
75
+ <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
76
+ <label>Navigation Bar</label>
77
+ <block type="page/html_topmenu" name="catalog.topnav" template="techinflo/page/html/topmenu.phtml"/>
78
+ </block>
79
+ <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
80
+ <label>Page Header</label>
81
+ <action method="setElementClass"><value>top-container</value></action>
82
+ </block>
83
+ <block type="page/html_welcome" name="welcome" as="welcome"/>
84
+ </block>
85
+
86
+ <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
87
+
88
+ <block type="core/text_list" name="left" as="left" translate="label">
89
+ <label>Left Column</label>
90
+ </block>
91
+
92
+ <block type="core/messages" name="global_messages" as="global_messages"/>
93
+ <block type="core/messages" name="messages" as="messages"/>
94
+
95
+ <block type="core/text_list" name="content" as="content" translate="label">
96
+ <label>Main Content Area</label>
97
+ </block>
98
+
99
+ <block type="core/text_list" name="right" as="right" translate="label">
100
+ <label>Right Column</label>
101
+ </block>
102
+
103
+ <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
104
+ <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
105
+ <label>Page Footer</label>
106
+ <action method="setElementClass"><value>bottom-container</value></action>
107
+ </block>
108
+ <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
109
+ <block type="page/template_links" name="footer_links" as="footer_links" />
110
+ </block>
111
+
112
+ <block type="core/text_list" name="before_body_end" as="before_body_end" translate="label">
113
+ <label>Page Bottom</label>
114
+ </block>
115
+ </block>
116
+
117
+ <block type="core/profiler" output="toHtml" name="core_profiler"/>
118
+ </default>
119
+
120
+ <print translate="label" module="page">
121
+ <label>All Pages (Print Version)</label>
122
+ <!-- Mage_Page -->
123
+ <block type="page/html" name="root" output="toHtml" template="page/print.phtml">
124
+
125
+ <block type="page/html_head" name="head" as="head">
126
+ <action method="addJs"><script>prototype/prototype.js</script></action>
127
+ <action method="addJs"><script>mage/translate.js</script></action>
128
+ <action method="addJs"><script>lib/ccard.js</script></action>
129
+ <action method="addJs"><script>prototype/validation.js</script></action>
130
+ <action method="addJs"><script>varien/js.js</script></action>
131
+
132
+ <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
133
+ <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
134
+ <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
135
+ <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
136
+
137
+ <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
138
+ <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
139
+
140
+ </block>
141
+
142
+ <block type="core/text_list" name="content" as="content" translate="label">
143
+ <label>Main Content Area</label>
144
+ </block>
145
+
146
+ </block>
147
+ </print>
148
+
149
+ <!-- Custom page layout handles -->
150
+ <page_empty translate="label">
151
+ <label>All Empty Layout Pages</label>
152
+ <reference name="root">
153
+ <action method="setTemplate"><template>page/empty.phtml</template></action>
154
+ <!-- Mark root page block that template is applied -->
155
+ <action method="setIsHandle"><applied>1</applied></action>
156
+ </reference>
157
+ </page_empty>
158
+
159
+ <page_one_column translate="label">
160
+ <label>All One-Column Layout Pages</label>
161
+ <reference name="root">
162
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
163
+ <!-- Mark root page block that template is applied -->
164
+ <action method="setIsHandle"><applied>1</applied></action>
165
+ </reference>
166
+ </page_one_column>
167
+
168
+ <page_two_columns_left translate="label">
169
+ <label>All Two-Column Layout Pages (Left Column)</label>
170
+ <reference name="root">
171
+ <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
172
+ <!-- Mark root page block that template is applied -->
173
+ <action method="setIsHandle"><applied>1</applied></action>
174
+ </reference>
175
+ </page_two_columns_left>
176
+
177
+ <page_two_columns_right translate="label">
178
+ <label>All Two-Column Layout Pages (Right Column)</label>
179
+ <reference name="root">
180
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
181
+ <!-- Mark root page block that template is applied -->
182
+ <action method="setIsHandle"><applied>1</applied></action>
183
+ </reference>
184
+ </page_two_columns_right>
185
+
186
+ <page_three_columns translate="label">
187
+ <label>All Three-Column Layout Pages</label>
188
+ <reference name="root">
189
+ <action method="setTemplate"><template>page/3columns.phtml</template></action>
190
+ <!-- Mark root page block that template is applied -->
191
+ <action method="setIsHandle"><applied>1</applied></action>
192
+ </reference>
193
+ </page_three_columns>
194
+ </layout>
app/design/frontend/default/default/layout/pay.xml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <pay_index_index>
6
+ <reference name="root">
7
+ <action method="setTemplate"><template>page/empty.phtml</template></action>
8
+ </reference>
9
+ <reference name="content">
10
+ <block type="core/template" template="pay/pay.phtml" />
11
+ </reference>
12
+ </pay_index_index>
13
+ </layout>
app/design/frontend/default/default/layout/techinflo/customer/mystore.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <layout version="0.1.0">
2
+ <!--xsl:if(Mage::getStoreConfig('techinflo/mystoreoption/active'))-->
3
+ <!--Techinflo\Customerpage\controllers\AccountpageController.php-->
4
+ <customer_accountpage_index translate="label">
5
+ <reference name="head">
6
+ <action method="addCss" ifconfig="techinflocookienotice/general/enabled">
7
+ <stylesheet>css/mystore/prefference.css</stylesheet>
8
+ </action>
9
+ </reference>
10
+
11
+ <label>My Store</label>
12
+ <reference name="head">
13
+ <action method="setTitle"><title>My Store</title></action> <!--Page Title-->
14
+ </reference>
15
+ <!-- Mage_Customer -->
16
+ <update handle="customer_account"/>
17
+ <reference name="my.account.wrapper">
18
+ <!--name in config file / Techinflo\Customerpage\Block\Customer.php-->
19
+ <block type="techinflo/customer" name="techinflo" before="-" template="techinflo/customer/page.phtml"/>
20
+ <!--<block type="catalog/product_list" name="catalog.product.list" alias="products_homepage" category_id="7" template="catalog/product/list.phtml"/>-->
21
+ </reference>
22
+ </customer_accountpage_index>
23
+ <!--/xsl:if-->
24
+ </layout>
app/design/frontend/default/default/layout/techinflo/local.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <layout version="1.0.0">
2
+ <!--add link to the customer panel-->
3
+ <!--xsl:if(Mage::getStoreConfig('techinflo/mystoreoption/active'))-->
4
+ <customer_account>
5
+ <reference name="customer_account_navigation">
6
+ <action method="addLink" translate="label" module="customer">
7
+ <name>mystore</name>
8
+ <!--Customer Block/AccountpageController.php-->
9
+ <path>customer/accountpage/</path>
10
+ <label>My Store</label>
11
+ </action>
12
+ </reference>
13
+ </customer_account>
14
+ <!--/xsl:if-->
15
+ <customer_account_create>
16
+ <reference name="customer_form_register">
17
+ <action method="setTemplate"><template>techinflo/customer/form/register.phtml</template></action>
18
+ <block type="persistent/form_remember" name="persistent.remember.me" template="persistent/remember_me.phtml" />
19
+ <block type="core/template" name="persistent.remember.me.tooltip" template="persistent/remember_me_tooltip.phtml" />
20
+ </reference>
21
+ </customer_account_create>
22
+ </layout>
23
+
24
+
app/design/frontend/default/default/template/catalog/product/list.phtml ADDED
@@ -0,0 +1,509 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2013 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 template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+ $enabled = Mage::getStoreConfig('techinflo/mystoreoption/active');
36
+ if($enabled){
37
+
38
+ $_productCollection=$this->getLoadedProductCollection();
39
+ $_helper = $this->helper('catalog/output');
40
+ ?>
41
+ <?php if(!$_productCollection->count()): ?>
42
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
43
+ <?php else: ?>
44
+
45
+ <div class="category-products">
46
+ <?php echo $this->getToolbarHtml() ?>
47
+ <?php // List mode ?>
48
+ <?php if($this->getMode()!='grid'): ?>
49
+ <?php $_iterator = 0;
50
+
51
+ $name = Mage::getModel('core/cookie')->get('User');
52
+
53
+ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
54
+
55
+ $cust_email = Mage::getSingleton('customer/session')->getCustomer()->getemail();
56
+ $email = " '$cust_email' ";
57
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
58
+
59
+ $sql = "SELECT `prices` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1;";
60
+ $sql2 = "SELECT `brands` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1;";
61
+
62
+ $results = $connection->fetchOne($sql);
63
+ $results2 = $connection->fetchOne($sql2);
64
+
65
+ $prices_array = array();
66
+ $brands_array_two = array();
67
+
68
+ $prices_array = explode(',', $results);
69
+ $brands_array_two = explode(',', $results2);
70
+
71
+ if($brands == '')
72
+ $brands = $brands_array_two;
73
+ else { $attribute_code = "brand";
74
+ $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
75
+ $options = $attribute_details->getSource()->getAllOptions(false);
76
+ foreach($options as $option){
77
+ $mybrands[] = $option['value'];
78
+ $mybrand[] = $option['label'];
79
+ }
80
+ $brands = $mybrands;
81
+ }
82
+
83
+ if($prices == '')
84
+ $prices = $prices_array;
85
+ else {
86
+ $prices[0] = 0;
87
+ $prices[1] = 9999999;
88
+ }
89
+
90
+ }
91
+
92
+ else if(!Mage::getSingleton('customer/session')->isLoggedIn()) {
93
+
94
+ if($name != '' )
95
+ {
96
+ $name = " '$name' ";
97
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
98
+
99
+ $sql2 = "SELECT `prices` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
100
+ $sql3 = "SELECT `brands` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
101
+
102
+ $results2 = $connection->fetchOne($sql2);
103
+ $results3 = $connection->fetchOne($sql3);
104
+
105
+ $results_array2 = array();
106
+ $results_array3 = array();
107
+
108
+ $prices_array = explode(',', $results2);
109
+ $brands_array_two = explode(',', $results3);
110
+
111
+ $brands = $brands_array_two;
112
+ $prices = $prices_array;
113
+
114
+ if($brands != '')
115
+ $brands = $brands_array_two;
116
+ else { $attribute_code = "brand";
117
+ $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
118
+ $options = $attribute_details->getSource()->getAllOptions(false);
119
+ foreach($options as $option){
120
+ $mybrands[] = $option['value'];
121
+ $mybrand[] = $option['label'];
122
+ }
123
+ $brands = $mybrands;
124
+ }
125
+
126
+ if($prices != '')
127
+ $prices = $prices_array;
128
+ else {
129
+ $prices[0] = 0;
130
+ $prices[1] = 9999999;
131
+ }
132
+ }
133
+ else {
134
+ if($brands != '')
135
+ $brands = $brands_array_two;
136
+ else { $attribute_code = "brand";
137
+ $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
138
+ $options = $attribute_details->getSource()->getAllOptions(false);
139
+ foreach($options as $option){
140
+ $mybrands[] = $option['value'];
141
+ $mybrand[] = $option['label'];
142
+ }
143
+ $brands = $mybrands;
144
+ }
145
+
146
+ if($prices != '')
147
+ $prices = $prices_array;
148
+ else {
149
+ $prices[0] = 0;
150
+ $prices[1] = 9999999;
151
+ }
152
+ }
153
+ }
154
+
155
+
156
+ //print_r($mybrand);
157
+ //print_r($prices);
158
+ ?>
159
+
160
+
161
+ <ol class="products-list" id="products-list">
162
+ <?php foreach ($_productCollection as $_product): ?>
163
+
164
+ <?php
165
+ /*Selected brand & price based products*/
166
+ if($brands != '' && $prices != '') {
167
+ foreach($brands as $brand)
168
+ {
169
+ $_productbrand = $_product['brand'];
170
+ $price = $_product['price'];
171
+ $min_price = $prices[0];
172
+ $max_price = $prices[1];
173
+
174
+ if($brand == $_productbrand) {
175
+ if($price >= $min_price && $price <= $max_price) {
176
+
177
+ /*End of the selected brand & price based products*/
178
+ ?>
179
+
180
+
181
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
182
+ <?php // Product Image ?>
183
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
184
+ <?php // Product description ?>
185
+ <div class="product-shop">
186
+ <div class="f-fix">
187
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
188
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
189
+ <?php if($_product->getRatingSummary()): ?>
190
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
191
+ <?php endif; ?>
192
+ <?php echo $this->getPriceHtml($_product, true) ?>
193
+
194
+ <?php if($_product->isSaleable()): ?>
195
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
196
+ <?php else: ?>
197
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
198
+ <?php endif; ?>
199
+ <div class="desc std">
200
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
201
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
202
+ </div>
203
+ <ul class="add-to-links">
204
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
205
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
206
+ <?php endif; ?>
207
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
208
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
209
+ <?php endif; ?>
210
+ </ul>
211
+ </div>
212
+ </div>
213
+ </li>
214
+
215
+ <?php }
216
+ }
217
+ }
218
+ }
219
+ ?>
220
+ <?php endforeach; ?>
221
+ </ol>
222
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
223
+
224
+ <?php else: ?>
225
+
226
+ <?php // Grid Mode
227
+
228
+ $name = Mage::getModel('core/cookie')->get('User');
229
+
230
+ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
231
+
232
+ $cust_email = Mage::getSingleton('customer/session')->getCustomer()->getemail();
233
+ $email = " '$cust_email' ";
234
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
235
+
236
+ $sql = "SELECT `prices` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1;";
237
+ $sql2 = "SELECT `brands` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1;";
238
+
239
+ $results = $connection->fetchOne($sql);
240
+ $results2 = $connection->fetchOne($sql2);
241
+
242
+ $prices_array = array();
243
+ $brands_array_two = array();
244
+
245
+ $prices_array = explode(',', $results);
246
+ $brands_array_two = explode(',', $results2);
247
+
248
+ if($brands == '')
249
+ $brands = $brands_array_two;
250
+ else { $attribute_code = "brand";
251
+ $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
252
+ $options = $attribute_details->getSource()->getAllOptions(false);
253
+ foreach($options as $option){
254
+ $mybrands[] = $option['value'];
255
+ $mybrand[] = $option['label'];
256
+ }
257
+ $brands = $mybrands;
258
+ }
259
+
260
+ if($prices == '')
261
+ $prices = $prices_array;
262
+ else {
263
+ $prices[0] = 0;
264
+ $prices[1] = 9999999;
265
+ }
266
+
267
+ }
268
+
269
+ else if(!Mage::getSingleton('customer/session')->isLoggedIn()) {
270
+ if($name != ''){
271
+ $name = " '$name' ";
272
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
273
+
274
+ $sql2 = "SELECT `prices` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
275
+ $sql3 = "SELECT `brands` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
276
+
277
+ $results2 = $connection->fetchOne($sql2);
278
+ $results3 = $connection->fetchOne($sql3);
279
+
280
+ $results_array2 = array();
281
+ $results_array3 = array();
282
+
283
+ $prices_array = explode(',', $results2);
284
+ $brands_array_two = explode(',', $results3);
285
+
286
+ $brands = $brands_array_two;
287
+ $prices = $prices_array;
288
+
289
+ if($brands != '')
290
+ $brands = $brands_array_two;
291
+ else { $attribute_code = "brand";
292
+ $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
293
+ $options = $attribute_details->getSource()->getAllOptions(false);
294
+ foreach($options as $option){
295
+ $mybrands[] = $option['value'];
296
+ $mybrand[] = $option['label'];
297
+ }
298
+ $brands = $mybrands;
299
+ }
300
+
301
+ if($prices != '')
302
+ $prices = $prices_array;
303
+ else {
304
+ $prices[0] = 0;
305
+ $prices[1] = 9999999;
306
+ }
307
+ }
308
+ else {
309
+ if($brands != '')
310
+ $brands = $brands_array_two;
311
+ else { $attribute_code = "brand";
312
+ $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
313
+ $options = $attribute_details->getSource()->getAllOptions(false);
314
+ foreach($options as $option){
315
+ $mybrands[] = $option['value'];
316
+ $mybrand[] = $option['label'];
317
+ }
318
+ $brands = $mybrands;
319
+ }
320
+
321
+ if($prices != '')
322
+ $prices = $prices_array;
323
+ else {
324
+ $prices[0] = 0;
325
+ $prices[1] = 9999999;
326
+ }
327
+ }
328
+ }
329
+
330
+
331
+ //print_r($mybrand);
332
+ //print_r($prices);
333
+ ?>
334
+
335
+ <?php $_collectionSize = $_productCollection->count() ?>
336
+ <?php $_columnCount = $this->getColumnCount(); ?>
337
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
338
+ <?php if ($i++%$_columnCount==0): ?>
339
+ <ul class="products-grid">
340
+ <?php endif; ?>
341
+
342
+ <?php
343
+ /*Selected brand & price based products*/
344
+ if($brands != '' && $prices != '') {
345
+ foreach($brands as $brand)
346
+ {
347
+ $_productbrand = $_product['brand'];
348
+ $price = $_product['price'];
349
+ $min_price = $prices[0];
350
+ $max_price = $prices[1];
351
+
352
+ if($brand == $_productbrand) {
353
+ if($price >= $min_price && $price <= $max_price) {
354
+
355
+ /*End of the selected brand & price based products*/
356
+ ?>
357
+
358
+
359
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
360
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
361
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
362
+ <?php if($_product->getRatingSummary()): ?>
363
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
364
+ <?php endif; ?>
365
+ <?php echo $this->getPriceHtml($_product, true) ?>
366
+
367
+ <div class="actions">
368
+ <?php if($_product->isSaleable()): ?>
369
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
370
+ <?php else: ?>
371
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
372
+ <?php endif; ?>
373
+ <ul class="add-to-links">
374
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
375
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
376
+ <?php endif; ?>
377
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
378
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
379
+ <?php endif; ?>
380
+ </ul>
381
+ </div>
382
+ </li>
383
+
384
+ <?php }
385
+ }
386
+ }
387
+ }
388
+ ?>
389
+
390
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
391
+ </ul>
392
+ <?php endif; ?>
393
+ <?php endforeach;
394
+ ?>
395
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
396
+ <?php endif; ?>
397
+
398
+ <div class="toolbar-bottom">
399
+ <?php echo $this->getToolbarHtml() ?>
400
+ </div>
401
+ </div>
402
+ <?php endif; ?>
403
+
404
+
405
+
406
+ <?php } else {
407
+ $_productCollection=$this->getLoadedProductCollection();
408
+ $_helper = $this->helper('catalog/output');
409
+ ?>
410
+ <?php if(!$_productCollection->count()): ?>
411
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
412
+ <?php else: ?>
413
+ <div class="category-products">
414
+ <?php echo $this->getToolbarHtml() ?>
415
+ <?php // List mode ?>
416
+ <?php if($this->getMode()!='grid'): ?>
417
+ <?php $_iterator = 0; ?>
418
+ <ol class="products-list" id="products-list">
419
+ <?php foreach ($_productCollection as $_product): ?>
420
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
421
+ <?php // Product Image ?>
422
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
423
+ <?php // Product description ?>
424
+ <div class="product-shop">
425
+ <div class="f-fix">
426
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
427
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
428
+ <?php if($_product->getRatingSummary()): ?>
429
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
430
+ <?php endif; ?>
431
+ <?php echo $this->getPriceHtml($_product, true) ?>
432
+ <?php if($_product->isSaleable()): ?>
433
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
434
+ <?php else: ?>
435
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
436
+ <?php endif; ?>
437
+ <div class="desc std">
438
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
439
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
440
+ </div>
441
+ <ul class="add-to-links">
442
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
443
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
444
+ <?php endif; ?>
445
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
446
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
447
+ <?php endif; ?>
448
+ </ul>
449
+ </div>
450
+ </div>
451
+ </li>
452
+ <?php endforeach; ?>
453
+ </ol>
454
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
455
+
456
+ <?php else: ?>
457
+
458
+ <?php // Grid Mode ?>
459
+
460
+ <?php $_collectionSize = $_productCollection->count() ?>
461
+ <?php $_columnCount = $this->getColumnCount(); ?>
462
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
463
+ <?php if ($i++%$_columnCount==0): ?>
464
+ <ul class="products-grid">
465
+ <?php endif ?>
466
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
467
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
468
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
469
+ <?php if($_product->getRatingSummary()): ?>
470
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
471
+ <?php endif; ?>
472
+ <?php echo $this->getPriceHtml($_product, true) ?>
473
+ <div class="actions">
474
+ <?php if($_product->isSaleable()): ?>
475
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
476
+ <?php else: ?>
477
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
478
+ <?php endif; ?>
479
+ <ul class="add-to-links">
480
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
481
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
482
+ <?php endif; ?>
483
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
484
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
485
+ <?php endif; ?>
486
+ </ul>
487
+ </div>
488
+ </li>
489
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
490
+ </ul>
491
+ <?php endif ?>
492
+ <?php endforeach ?>
493
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
494
+ <?php endif; ?>
495
+
496
+ <div class="toolbar-bottom">
497
+ <?php echo $this->getToolbarHtml() ?>
498
+ </div>
499
+
500
+
501
+
502
+ </div>
503
+ <?php endif; ?>
504
+
505
+ <?php }
506
+
507
+ ?>
508
+
509
+
app/design/frontend/default/default/template/catalog/product/list/toolbar.phtml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2013 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
+ <?php if($this->getCollection()->getSize()): ?>
35
+ <div class="toolbar">
36
+ <div class="pager">
37
+ <p class="amount">
38
+ <?php //if($this->getLastPageNum()>1): ?>
39
+ <?php //echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
40
+ <?php //else: ?>
41
+ <strong><?php //echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
42
+ <?php //endif; ?>
43
+ <?php echo $this->__('Selected My Store Items') ?>
44
+ </p>
45
+
46
+ <div class="limiter">
47
+ <label><?php echo $this->__('Show') ?></label>
48
+ <select onchange="setLocation(this.value)">
49
+ <?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
50
+ <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
51
+ <?php echo $_limit ?>
52
+ </option>
53
+ <?php endforeach; ?>
54
+ </select> <?php echo $this->__('per page') ?>
55
+ </div>
56
+
57
+ <?php echo $this->getPagerHtml() ?>
58
+
59
+ </div>
60
+
61
+ <?php if( $this->isExpanded() ): ?>
62
+ <div class="sorter">
63
+ <?php if( $this->isEnabledViewSwitcher() ): ?>
64
+ <p class="view-mode">
65
+ <?php $_modes = $this->getModes(); ?>
66
+ <?php if($_modes && count($_modes)>1): ?>
67
+ <label><?php echo $this->__('View as') ?>:</label>
68
+ <?php foreach ($this->getModes() as $_code=>$_label): ?>
69
+ <?php if($this->isModeActive($_code)): ?>
70
+ <strong title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></strong>&nbsp;
71
+ <?php else: ?>
72
+ <a href="<?php echo $this->getModeUrl($_code) ?>" title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></a>&nbsp;
73
+ <?php endif; ?>
74
+ <?php endforeach; ?>
75
+ <?php endif; ?>
76
+ </p>
77
+ <?php endif; ?>
78
+
79
+ <div class="sort-by">
80
+ <label><?php echo $this->__('Sort By') ?></label>
81
+ <select onchange="setLocation(this.value)">
82
+ <?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
83
+ <option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
84
+ <?php echo $this->__($_order) ?>
85
+ </option>
86
+ <?php endforeach; ?>
87
+ </select>
88
+ <?php if($this->getCurrentDirection() == 'desc'): ?>
89
+ <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>
90
+ <?php else: ?>
91
+ <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>
92
+ <?php endif; ?>
93
+ </div>
94
+ </div>
95
+ <?php endif; ?>
96
+ </div>
97
+ <?php endif ?>
app/design/frontend/default/default/template/catalog/product/list_dummy.phtml ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2013 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 template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+
36
+ $_productCollection=$this->getLoadedProductCollection();
37
+ $_helper = $this->helper('catalog/output');
38
+ ?>
39
+ <?php if(!$_productCollection->count()): ?>
40
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
41
+ <?php else: ?>
42
+
43
+ <div class="category-products">
44
+ <?php echo $this->getToolbarHtml() ?>
45
+ <?php // List mode ?>
46
+ <?php if($this->getMode()!='grid'): ?>
47
+ <?php $_iterator = 0; ?>
48
+ <ol class="products-list" id="products-list">
49
+ <?php foreach ($_productCollection as $_product): ?>
50
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
51
+ <?php // Product Image ?>
52
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
53
+ <?php // Product description ?>
54
+ <div class="product-shop">
55
+ <div class="f-fix">
56
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
57
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
58
+ <?php if($_product->getRatingSummary()): ?>
59
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
60
+ <?php endif; ?>
61
+ <?php echo $this->getPriceHtml($_product, true) ?>
62
+ <?php if($_product->isSaleable()): ?>
63
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
64
+ <?php else: ?>
65
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
66
+ <?php endif; ?>
67
+ <div class="desc std">
68
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
69
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
70
+ </div>
71
+ <ul class="add-to-links">
72
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
73
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
74
+ <?php endif; ?>
75
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
76
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
77
+ <?php endif; ?>
78
+ </ul>
79
+ </div>
80
+ </div>
81
+ </li>
82
+ <?php endforeach; ?>
83
+ </ol>
84
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
85
+
86
+ <?php else: ?>
87
+
88
+ <?php // Grid Mode
89
+
90
+ $name = Mage::getModel('core/cookie')->get('User');
91
+
92
+ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
93
+
94
+ $cust_email = Mage::getSingleton('customer/session')->getCustomer()->getemail();
95
+ $email = " '$cust_email' ";
96
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
97
+
98
+ $sql = "SELECT `prices` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1;";
99
+ $sql2 = "SELECT `brands` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1;";
100
+
101
+ $results = $connection->fetchOne($sql);
102
+ $results2 = $connection->fetchOne($sql2);
103
+
104
+ $prices_array = array();
105
+ $brands_array_two = array();
106
+
107
+ $prices_array = explode(',', $results);
108
+ $brands_array_two = explode(',', $results2);
109
+
110
+ }
111
+
112
+ else if(!Mage::getSingleton('customer/session')->isLoggedIn() && $name != '') {
113
+
114
+ $name = " '$name' ";
115
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
116
+
117
+ $sql2 = "SELECT `prices` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
118
+ $sql3 = "SELECT `brands` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
119
+
120
+ $results2 = $connection->fetchOne($sql2);
121
+ $results3 = $connection->fetchOne($sql3);
122
+
123
+ $results_array2 = array();
124
+ $results_array3 = array();
125
+
126
+ $prices_array = explode(',', $results2);
127
+ $brands_array_two = explode(',', $results3);
128
+
129
+ }
130
+
131
+ $brands = $brands_array_two;
132
+ $prices = $prices_array;
133
+
134
+ ?>
135
+
136
+ <?php $_collectionSize = $_productCollection->count() ?>
137
+ <?php $_columnCount = $this->getColumnCount(); ?>
138
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
139
+ <?php if ($i++%$_columnCount==0): ?>
140
+ <ul class="products-grid">
141
+ <?php endif; ?>
142
+
143
+ <?php
144
+ /*Selected brand & price based products*/
145
+ if($brands != '' && $prices != '') {
146
+ foreach($brands as $brand)
147
+ {
148
+ $_productbrand = $_product['brand'];
149
+ $price = $_product['price'];
150
+ $min_price = $prices[0];
151
+ $max_price = $prices[1];
152
+
153
+ if($brand == $_productbrand) {
154
+ if($price >= $min_price && $price <= $max_price) {
155
+
156
+ /*End of the selected brand & price based products*/
157
+ ?>
158
+
159
+
160
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
161
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
162
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
163
+ <?php if($_product->getRatingSummary()): ?>
164
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
165
+ <?php endif; ?>
166
+ <?php echo $this->getPriceHtml($_product, true) ?>
167
+
168
+ <strong><?php echo 'both are not null'; echo 'Brand:' .' '. $brand = $_product['brand'];?> </strong> <!-- To Test the brand name-->
169
+
170
+ <div class="actions">
171
+ <?php if($_product->isSaleable()): ?>
172
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
173
+ <?php else: ?>
174
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
175
+ <?php endif; ?>
176
+ <ul class="add-to-links">
177
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
178
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
179
+ <?php endif; ?>
180
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
181
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
182
+ <?php endif; ?>
183
+ </ul>
184
+ </div>
185
+ </li>
186
+
187
+ <?php }
188
+ }
189
+ }
190
+ }
191
+
192
+ else if($prices != '' && $brands == '') {
193
+ $brand = $_product['brand'];
194
+ $price = $_product['price'];
195
+ $min_price = $prices[0];
196
+ $max_price = $prices[1];
197
+
198
+ if($price >= $min_price && $price <= $max_price) {
199
+
200
+ /*End of the selected brand & price based products*/
201
+ ?>
202
+
203
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
204
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
205
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
206
+ <?php if($_product->getRatingSummary()): ?>
207
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
208
+ <?php endif; ?>
209
+ <?php echo $this->getPriceHtml($_product, true) ?>
210
+
211
+ <strong><?php
212
+ echo 'brands are null';
213
+ echo 'Brand:' .' '. $brand = $_product['brand'];?> </strong> <!-- To Test the brand name-->
214
+
215
+ <div class="actions">
216
+ <?php if($_product->isSaleable()): ?>
217
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
218
+ <?php else: ?>
219
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
220
+ <?php endif; ?>
221
+ <ul class="add-to-links">
222
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
223
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
224
+ <?php endif; ?>
225
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
226
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
227
+ <?php endif; ?>
228
+ </ul>
229
+ </div>
230
+ </li>
231
+
232
+ <?php }
233
+
234
+ }
235
+
236
+
237
+ else if($brands != '' && $prices == '') {
238
+ foreach($brands as $brand)
239
+ {
240
+ $_productbrand = $_product['brand'];
241
+ $price = $_product['price'];
242
+ $min_price = $prices[0];
243
+ $max_price = $prices[1];
244
+
245
+ if($brand == $_productbrand) {
246
+
247
+ /*End of the selected brand & price based products*/
248
+ ?>
249
+
250
+
251
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
252
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
253
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
254
+ <?php if($_product->getRatingSummary()): ?>
255
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
256
+ <?php endif; ?>
257
+ <?php echo $this->getPriceHtml($_product, true) ?>
258
+
259
+ <strong><?php
260
+ echo 'prices are null';
261
+ echo 'Brand:' .' '. $brand = $_product['brand'];?> </strong> <!-- To Test the brand name-->
262
+
263
+ <div class="actions">
264
+ <?php if($_product->isSaleable()): ?>
265
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
266
+ <?php else: ?>
267
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
268
+ <?php endif; ?>
269
+ <ul class="add-to-links">
270
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
271
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
272
+ <?php endif; ?>
273
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
274
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
275
+ <?php endif; ?>
276
+ </ul>
277
+ </div>
278
+ </li>
279
+
280
+ <?php }
281
+ }
282
+ }
283
+
284
+ else { ?>
285
+
286
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
287
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
288
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
289
+ <?php if($_product->getRatingSummary()): ?>
290
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
291
+ <?php endif; ?>
292
+ <?php echo $this->getPriceHtml($_product, true) ?>
293
+
294
+ <strong><?php
295
+ echo 'both are null';
296
+ echo 'Brand:' .' '. $brand = $_product['brand'];?> </strong> <!-- To Test the brand name-->
297
+
298
+ <div class="actions">
299
+ <?php if($_product->isSaleable()): ?>
300
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
301
+ <?php else: ?>
302
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
303
+ <?php endif; ?>
304
+ <ul class="add-to-links">
305
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
306
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
307
+ <?php endif; ?>
308
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
309
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
310
+ <?php endif; ?>
311
+ </ul>
312
+ </div>
313
+ </li>
314
+ <?php }
315
+ ?>
316
+
317
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
318
+ </ul>
319
+ <?php endif; ?>
320
+ <?php endforeach;
321
+ ?>
322
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
323
+ <?php endif; ?>
324
+
325
+ <div class="toolbar-bottom">
326
+ <?php echo $this->getToolbarHtml() ?>
327
+ </div>
328
+ </div>
329
+ <?php endif; ?>
app/design/frontend/default/default/template/techinflo/customer/form/register.phtml ADDED
@@ -0,0 +1,430 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2013 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
+ * Create account form template
30
+ *
31
+ * @see app/design/frontend/base/default/template/customer/form/register.phtml
32
+ */
33
+ /** @var $this Mage_Customer_Block_Form_Register */
34
+
35
+ $value = Mage::getModel('core/cookie')->get('User'); ?>
36
+ <link href="<?php echo $this->getSkinUrl('css/mystore/prefference.css');?>" rel="stylesheet" type="text/css" media="all" />
37
+ <div class="account-create">
38
+ <div class="page-title">
39
+ <h1><?php echo $this->__('Create an Account') ?></h1>
40
+ </div>
41
+ <?php echo $this->getChildHtml('form_fields_before')?>
42
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
43
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
44
+ <div class="fieldset">
45
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
46
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
47
+ <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
48
+ <ul class="form-list">
49
+ <li class="fields">
50
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
51
+ </li>
52
+ <li>
53
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
54
+ <div class="input-box">
55
+ <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
56
+ </div>
57
+ </li>
58
+ <?php if ($this->isNewsletterEnabled()): ?>
59
+ <li class="control">
60
+ <div class="input-box">
61
+ <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
62
+ </div>
63
+ <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
64
+ </li>
65
+ <?php endif ?>
66
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
67
+ <?php if ($_dob->isEnabled()): ?>
68
+ <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
69
+ <?php endif ?>
70
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
71
+ <?php if ($_taxvat->isEnabled()): ?>
72
+ <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
73
+ <?php endif ?>
74
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
75
+ <?php if ($_gender->isEnabled()): ?>
76
+ <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
77
+ <?php endif ?>
78
+ </ul>
79
+ </div>
80
+ <?php if($this->getShowAddressFields()): ?>
81
+ <div class="fieldset">
82
+ <input type="hidden" name="create_address" value="1" />
83
+ <h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
84
+ <ul class="form-list">
85
+ <li class="fields">
86
+ <div class="field">
87
+ <label for="company"><?php echo $this->__('Company') ?></label>
88
+ <div class="input-box">
89
+ <input type="text" name="company" id="company" value="<?php echo $this->escapeHtml($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
90
+ </div>
91
+ </div>
92
+ <div class="field">
93
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
94
+ <div class="input-box">
95
+ <input type="text" name="telephone" id="telephone" value="<?php echo $this->escapeHtml($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" />
96
+ </div>
97
+ </div>
98
+ </li>
99
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
100
+ <li class="wide">
101
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
102
+ <div class="input-box">
103
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
104
+ </div>
105
+ </li>
106
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
107
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
108
+ <li class="wide">
109
+ <div class="input-box">
110
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
111
+ </div>
112
+ </li>
113
+ <?php endfor; ?>
114
+ <li class="fields">
115
+ <div class="field">
116
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
117
+ <div class="input-box">
118
+ <input type="text" name="city" value="<?php echo $this->escapeHtml($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" />
119
+ </div>
120
+ </div>
121
+ <div class="field">
122
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
123
+ <div class="input-box">
124
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
125
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
126
+ </select>
127
+ <script type="text/javascript">
128
+ //<![CDATA[
129
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
130
+ //]]>
131
+ </script>
132
+ <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
133
+ </div>
134
+ </div>
135
+ </li>
136
+ <li class="fields">
137
+ <div class="field">
138
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
139
+ <div class="input-box">
140
+ <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
141
+ </div>
142
+ </div>
143
+ <div class="field">
144
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
145
+ <div class="input-box">
146
+ <?php echo $this->getCountryHtmlSelect() ?>
147
+ </div>
148
+ </div>
149
+ </li>
150
+ </ul>
151
+ <input type="hidden" name="default_billing" value="1" />
152
+ <input type="hidden" name="default_shipping" value="1" />
153
+ </div>
154
+ <?php endif; ?>
155
+ <div class="fieldset">
156
+ <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
157
+ <ul class="form-list">
158
+ <li class="fields">
159
+ <div class="field">
160
+ <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
161
+ <div class="input-box">
162
+ <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
163
+ </div>
164
+ </div>
165
+ <div class="field">
166
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
167
+ <div class="input-box">
168
+ <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
169
+ </div>
170
+ </div>
171
+ </li>
172
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
173
+ <?php echo $this->getChildHtml('persistent.remember.me'); ?>
174
+ </ul>
175
+ <?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
176
+ </div>
177
+
178
+
179
+ <?php
180
+ $enabled = Mage::getStoreConfig('techinflo/mystoreoption/active');
181
+ if($enabled):
182
+
183
+ if($value == ''): ?>
184
+ <div class="fieldset">
185
+ <h2 class="legend"><?php echo $this->__('Mystore Information') ?></h2>
186
+ <ul class="form-list">
187
+ <li class="odd-row">
188
+ <label><input type="checkbox" class="input-box1" title="Brand" name="brand" onclick="showMeThree('show-brand-three-box')" /> Brand</label>
189
+ </li>
190
+
191
+ <div id="show-brand-three-box" style="display:none; margin-left:25px;">
192
+ <?php
193
+ // specify the attribute code
194
+ $attributeCode = 'brand';
195
+
196
+ // build and filter the product collection
197
+ $products = Mage::getResourceModel('catalog/product_collection')
198
+ ->addAttributeToFilter($attributeCode, array('notnull' => true))
199
+ ->addAttributeToFilter($attributeCode, array('neq' => ''))
200
+ ->addAttributeToSelect($attributeCode);
201
+
202
+ // get all distinct attribute values
203
+ $usedAttributeValues = array_unique($products->getColumnValues($attributeCode));
204
+
205
+ $productModel = Mage::getModel('catalog/product');
206
+ $attr = $productModel->getResource()->getAttribute("brand");
207
+
208
+ if (count($usedAttributeValues)) {
209
+
210
+ foreach($usedAttributeValues as $optionId => $value) { ?>
211
+ <li class="even-row">
212
+ <label><input type="checkbox" class="input-box1" value="<?php echo $value; ?>" title="<?php echo $attr->getSource()->getOptionText($value); ?>" name="brands[]" /> <?php echo $attr->getSource()->getOptionText($value); ?></label>
213
+ </li>
214
+ <?php }
215
+ } ?>
216
+ </div>
217
+
218
+ <li class="even-row">
219
+ <label><input type="checkbox" class="input-box1" title="Price" name="price" onclick="showMeOne('show-price-one-box')" /> Price</label>
220
+ </li>
221
+
222
+ <div id="show-price-one-box" style="display:none; margin-left:25px;">
223
+ <ul> <li class="even-row">
224
+ <label>Min: &nbsp;<input type="text" name="prices[]" class="input-box" title="Minimum Price" /></label>
225
+ </li>
226
+
227
+ <li class="even-row">
228
+ <label>Max: <input type="text" name="prices[]" class="input-box" title="Maximum Price" /></label>
229
+ </li>
230
+ </ul>
231
+ </div>
232
+ <li class="even-row"><label><input type="checkbox" class="input-box1" title="Category" name="category" onclick="showMeTwo('show-category-two-box')" /> Category</label></li>
233
+ <div id="show-category-two-box" style="display:none; margin-left:25px;">
234
+ <?php $_helper = Mage::helper('catalog/category') ?>
235
+ <?php $_categories = $_helper->getStoreCategories() ?>
236
+ <?php $currentCategory = Mage::registry('current_category') ?>
237
+ <?php if (count($_categories) > 0): ?>
238
+ <?php foreach($_categories as $_category): ?>
239
+ <ul>
240
+ <li class="even-row">
241
+ <label><input class="input-box1" name="categories[]" type="checkbox" value="<?php echo $_category->getId() ?>"> &nbsp;<?php echo $_category->getName() ?></label>
242
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
243
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
244
+ <?php if (count($_subcategories) > 0): ?>
245
+ <ul>
246
+ <?php foreach($_subcategories as $_subcategory): ?>
247
+ <li class="even-row">
248
+ <label><?php echo $_subcategory->getName() ?>
249
+ &nbsp;<input class="input-box1" type="checkbox" value="<?php echo $_subcategory->getId() ?>"></label>
250
+ <?php $_category = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
251
+ <?php $_subsubcategories = $_subcategory->getChildrenCategories() ?>
252
+ <?php if (count($_subsubcategories) > 0): ?>
253
+ <ul>
254
+ <?php foreach($_subsubcategories as $_subsubcategory): ?>
255
+ <li class="even-row">
256
+ <label><?php echo $_subsubcategory->getName() ?>&nbsp;
257
+ <input class="input-box1" type="checkbox" value="<?php echo $_subsubcategory->getId() ?>"></label>
258
+ </li>
259
+ <?php endforeach; ?>
260
+ </ul>
261
+ <?php endif; ?>
262
+
263
+ </li>
264
+ <?php endforeach; ?>
265
+ </ul>
266
+ <?php endif; ?>
267
+ </li>
268
+ <?php endforeach; ?>
269
+ </ul>
270
+ <?php endif; ?>
271
+ </div>
272
+ </div>
273
+ <?php endif; ?>
274
+
275
+ <?php if($value != ''):
276
+ $name = Mage::getModel('core/cookie')->get('User');
277
+ $name = " '$name' ";
278
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
279
+
280
+ $sql = "SELECT `categories` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
281
+ $sql2 = "SELECT `prices` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
282
+ $sql3 = "SELECT `brands` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
283
+
284
+ $results = $connection->fetchOne($sql);
285
+ $results2 = $connection->fetchOne($sql2);
286
+ $results3 = $connection->fetchOne($sql3);
287
+
288
+ $results_array = array();
289
+ $results_array2 = array();
290
+ $results_array3 = array();
291
+
292
+ $category_array = explode(',', $results);
293
+ $price_array = explode(',', $results2);
294
+ $brand_array = explode(',', $results3); ?>
295
+
296
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
297
+
298
+ <?php $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
299
+ $sql = "SELECT * FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
300
+ $results = $connection->fetchAll($sql);
301
+ foreach($results as $result):
302
+ ?>
303
+ <div class="fieldset">
304
+ <h2 class="legend"><?php echo $this->__('Mystore Information') ?></h2>
305
+ <ul class="form-list">
306
+ <li class="odd-row">
307
+ <td><label><input type="checkbox" class="input-box1" title="Brand" name="brand" onclick="showMeThree('show-brand-box')"
308
+ <?php if($result[brand] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Brand </label></td>
309
+ </li>
310
+
311
+ <div id="show-brand-box" style="margin-left:25px;">
312
+ <?php
313
+ // specify the attribute code
314
+ $attributeCode = 'brand';
315
+
316
+ // build and filter the product collection
317
+ $products = Mage::getResourceModel('catalog/product_collection')
318
+ ->addAttributeToFilter($attributeCode, array('notnull' => true))
319
+ ->addAttributeToFilter($attributeCode, array('neq' => ''))
320
+ ->addAttributeToSelect($attributeCode);
321
+
322
+ // get all distinct attribute values
323
+ $usedAttributeValues = array_unique($products->getColumnValues($attributeCode));
324
+
325
+ $productModel = Mage::getModel('catalog/product');
326
+ $attr = $productModel->getResource()->getAttribute("brand");
327
+
328
+ if (count($usedAttributeValues)) {
329
+
330
+ foreach($usedAttributeValues as $optionId => $value) { ?>
331
+ <li class="even-row">
332
+ <td><label><input type="checkbox" class="input-box1" value="<?php echo $value; ?>" title="<?php echo $attr->getSource()->getOptionText($value); ?>" name="brands[]"
333
+ <?php foreach($brand_array as $brand) { if($brand == $value) echo 'checked' . ' ' . '=' . 'checked'; } ?> /> <?php echo $attr->getSource()->getOptionText($value); ?></label></td>
334
+ </li>
335
+ <?php }
336
+ } ?>
337
+ </div>
338
+
339
+ <li class="even-row">
340
+ <td><label><input type="checkbox" class="input-box1" title="Price" name="price" onclick="showMeOne('show-price-box')"
341
+ <?php if($result[price] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Price</label></td>
342
+ </li>
343
+ <div id="show-price-box" style="margin-left:25px;">
344
+ <ul> <td><li class="even-row">
345
+ <label>Min: &nbsp;<input type="text" name="prices[]" class="input-box1" title="Minimum Price" name="min"
346
+ value="<?php if($price_array[0]) echo $price_array[0]; ?>" /></label>
347
+ </li></td>
348
+
349
+ <td> <li class="even-row">
350
+ <label>Max: <input type="text" name="prices[]" class="input-box1" title="Maximum Price" name="max"
351
+ value="<?php if($price_array[1]) echo $price_array[1]; ?>" /></label>
352
+ </li> </td>
353
+ </ul>
354
+ </div>
355
+ <li class="odd-row">
356
+ <td><label><input type="checkbox" class="input-box1" title="Category" name="category" onclick="showMeTwo('show-category-box')"
357
+ <?php if($result[category] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Category</label></td>
358
+ </li>
359
+ <div id="show-category-box" style="margin-left:25px;">
360
+ <?php $_helper = Mage::helper('catalog/category') ?>
361
+ <?php $_categories = $_helper->getStoreCategories() ?>
362
+ <?php $currentCategory = Mage::registry('current_category') ?>
363
+ <?php if (count($_categories) > 0): ?>
364
+ <div id="tabs-1">
365
+ <ul id="tree1">
366
+ <?php foreach($_categories as $_category): ?>
367
+ <li class="even-row">
368
+ <label><input class="input-box1" name="categories[]" type="checkbox" value="<?php echo $_category->getId() ?>"
369
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
370
+ <?php echo $_category->getName() ?></label>
371
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
372
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
373
+ <?php if (count($_subcategories) > 0): ?>
374
+ <ul>
375
+ <?php foreach($_subcategories as $_subcategory): ?>
376
+ <li class="odd-row">
377
+ <label><input class="input-box1" type="checkbox" value="<?php echo $_subcategory->getId() ?>"
378
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
379
+ <?php echo $_subcategory->getName() ?></label>
380
+ <?php $_category = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
381
+ <?php $_subsubcategories = $_subcategory->getChildrenCategories() ?>
382
+ <?php if (count($_subsubcategories) > 0): ?>
383
+ <ul>
384
+ <?php foreach($_subsubcategories as $_subsubcategory): ?>
385
+ <li class="odd-row">
386
+ <label><input class="input-box1" type="checkbox" value="<?php echo $_subsubcategory->getId() ?>"
387
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
388
+ <?php echo $_subsubcategory->getName() ?></label>
389
+ </li>
390
+ <?php endforeach; ?>
391
+ </ul>
392
+ <?php endif; ?>
393
+
394
+ </li>
395
+ <?php endforeach; ?>
396
+ </ul>
397
+ <?php endif; ?>
398
+ </li>
399
+ <?php endforeach; ?>
400
+ </ul>
401
+ </div>
402
+ <?php endif; ?>
403
+ </div>
404
+ </div>
405
+ <?php
406
+ endforeach;
407
+ endif;?>
408
+
409
+ <?php endif; ?>
410
+
411
+
412
+ <div class="buttons-set">
413
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
414
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
415
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
416
+ </div>
417
+ <?php if (Mage::helper('checkout')->isContextCheckout()): ?>
418
+ <input name="context" type="hidden" value="checkout" />
419
+ <?php endif; ?>
420
+ </form>
421
+ <script type="text/javascript">
422
+ //<![CDATA[
423
+ var dataForm = new VarienForm('form-validate', true);
424
+ <?php if($this->getShowAddressFields()): ?>
425
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
426
+ <?php endif; ?>
427
+ //]]>
428
+ </script>
429
+
430
+ </div>
app/design/frontend/default/default/template/techinflo/customer/page.phtml ADDED
@@ -0,0 +1,333 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(Mage::getSingleton('customer/session')->isLoggedIn()):
2
+ $cust_mail = $this->helper('customer')->getCustomer()->getemail();
3
+ $email = " '$cust_mail' ";
4
+
5
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
6
+
7
+ $qry = "SELECT `customer_email` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1";
8
+
9
+ $customer_email = $connection->fetchOne($qry);
10
+
11
+ if($customer_email)
12
+ {
13
+ $sql = "SELECT `categories` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1";
14
+ $sql2 = "SELECT `prices` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1";
15
+ $sql3 = "SELECT `brands` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1";
16
+
17
+ $results = $connection->fetchOne($sql);
18
+ $results2 = $connection->fetchOne($sql2);
19
+ $results3 = $connection->fetchOne($sql3);
20
+
21
+ $results_array = array();
22
+ $results_array2 = array();
23
+ $results_array3 = array();
24
+
25
+ $category_array = explode(',', $results);
26
+ $price_array = explode(',', $results2);
27
+ $brand_array = explode(',', $results3);
28
+
29
+ ?>
30
+
31
+
32
+ <div class="page-title">
33
+ <h1><?php echo $this->__('My Store Prefferences') ?></h1>
34
+ </div>
35
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
36
+
37
+ <?php $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
38
+
39
+ $sql = "SELECT * FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1";
40
+
41
+ $results = $connection->fetchAll($sql);
42
+
43
+ foreach($results as $result) {
44
+
45
+ ?>
46
+
47
+ <form id="mainform" class="prefference-save" action="<?php echo Mage::helper("adminhtml")->getUrl("customer/accountpage/saveprefference"); ?>" method="POST">
48
+
49
+ <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
50
+ <?php Mage::log(Mage::getSingleton('core/session')->getFormKey(), null, ‘layout.log’ );?>
51
+
52
+ <h4><?php echo $this->__('Please select your store preferences and save below') ?> </h4><br>
53
+
54
+ <ul>
55
+ <li class="odd-row">
56
+ <td><label><input type="checkbox" class="input-box" title="Brand" name="brand" onclick="showMeThree('show-brand-box')"
57
+ <?php if($result[brand] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Brand </label></td>
58
+ </li>
59
+
60
+ <div id="show-brand-box" style="margin-left:25px;">
61
+ <?php
62
+ // specify the attribute code
63
+ $attributeCode = 'brand';
64
+
65
+ // build and filter the product collection
66
+ $products = Mage::getResourceModel('catalog/product_collection')
67
+ ->addAttributeToFilter($attributeCode, array('notnull' => true))
68
+ ->addAttributeToFilter($attributeCode, array('neq' => ''))
69
+ ->addAttributeToSelect($attributeCode);
70
+
71
+ // get all distinct attribute values
72
+ $usedAttributeValues = array_unique($products->getColumnValues($attributeCode));
73
+
74
+ $productModel = Mage::getModel('catalog/product');
75
+ $attr = $productModel->getResource()->getAttribute("brand");
76
+
77
+ if (count($usedAttributeValues)) {
78
+
79
+ foreach($usedAttributeValues as $optionId => $value) { ?>
80
+ <li class="even-row">
81
+ <td><label><input type="checkbox" class="input-box" value="<?php echo $value; ?>" title="<?php echo $attr->getSource()->getOptionText($value); ?>" name="brands[]"
82
+ <?php foreach($brand_array as $brand) { if($brand == $value) echo 'checked' . ' ' . '=' . 'checked'; } ?> /> <?php echo $attr->getSource()->getOptionText($value); ?></label></td>
83
+ </li>
84
+ <?php }
85
+ } ?>
86
+ </div>
87
+
88
+ <li class="even-row">
89
+ <td><label><input type="checkbox" class="input-box" title="Price" name="price" onclick="showMeOne('show-price-box')"
90
+ <?php if($result[price] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Price</label></td>
91
+ </li>
92
+
93
+ <div id="show-price-box" style="margin-left:25px;">
94
+ <ul> <td><li class="even-row">
95
+ <label>Min: &nbsp;<input type="text" name="prices[]" class="input-box" title="Minimum Price" name="min"
96
+ value="<?php if($price_array[0]) echo $price_array[0]; ?>" /></label>
97
+ </li></td>
98
+
99
+ <td> <li class="even-row">
100
+ <label>Max: <input type="text" name="prices[]" class="input-box" title="Maximum Price" name="max"
101
+ value="<?php if($price_array[1]) echo $price_array[1]; ?>" /></label>
102
+ </li> </td>
103
+ </ul>
104
+ </div>
105
+
106
+ <li class="odd-row">
107
+ <td><label><input type="checkbox" class="input-box" title="Category" name="category" onclick="showMeTwo('show-category-box')"
108
+ <?php if($result[category] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Category</label></td>
109
+ </li>
110
+
111
+ <div id="show-category-box" style="margin-left:25px;">
112
+ <?php $_helper = Mage::helper('catalog/category') ?>
113
+ <?php $_categories = $_helper->getStoreCategories() ?>
114
+ <?php $currentCategory = Mage::registry('current_category') ?>
115
+ <?php if (count($_categories) > 0): ?>
116
+ <div id="tabs-1">
117
+ <ul id="tree1">
118
+ <?php foreach($_categories as $_category): ?>
119
+ <li class="odd-row">
120
+ <input class="input-box" name="categories[]" type="checkbox" value="<?php echo $_category->getId() ?>"
121
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
122
+ <label><?php echo $_category->getName() ?></label>
123
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
124
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
125
+ <?php if (count($_subcategories) > 0): ?>
126
+ <ul>
127
+ <?php foreach($_subcategories as $_subcategory): ?>
128
+ <li class="odd-row">
129
+ <input class="input-box" type="checkbox" value="<?php echo $_subcategory->getId() ?>"
130
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
131
+ <label><?php echo $_subcategory->getName() ?></label>
132
+ <?php $_category = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
133
+ <?php $_subsubcategories = $_subcategory->getChildrenCategories() ?>
134
+ <?php if (count($_subsubcategories) > 0): ?>
135
+ <ul>
136
+ <?php foreach($_subsubcategories as $_subsubcategory): ?>
137
+ <li class="odd-row">
138
+ <input class="input-box" type="checkbox" value="<?php echo $_subsubcategory->getId() ?>"
139
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
140
+ <label><?php echo $_subsubcategory->getName() ?></label>
141
+ </li>
142
+ <?php endforeach; ?>
143
+ </ul>
144
+ <?php endif; ?>
145
+
146
+ </li>
147
+ <?php endforeach; ?>
148
+ </ul>
149
+ <?php endif; ?>
150
+ </li>
151
+ <?php endforeach; ?>
152
+ </ul>
153
+ </div>
154
+ <?php endif; ?>
155
+ </div>
156
+
157
+ <li class="even-row">
158
+ <td><label><input type="hidden" class="input-box" title="flag" name="flag" checked="checked" /></label></td>
159
+ </li>
160
+
161
+ <li class="form-submit-button">
162
+ <td><input type="submit" value="Save" title="Save" /></td>
163
+ <td><input type="reset" value="Cancel" title="Cancel" name="reset" /></td>
164
+ </li>
165
+ </ul>
166
+ </form>
167
+
168
+ <?php }
169
+ }
170
+ else { ?>
171
+ <div class="page-title">
172
+ <h1><?php echo $this->__('My Store Prefferences') ?></h1>
173
+ </div>
174
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
175
+
176
+ <form id="mainform" class="prefference-save" action="<?php echo Mage::helper("adminhtml")->getUrl("customer/accountpage/saveprefference"); ?>" method="POST">
177
+
178
+ <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
179
+ <?php Mage::log(Mage::getSingleton('core/session')->getFormKey(), null, ‘layout.log’ );?>
180
+
181
+ <h4><?php echo $this->__('Please set your store preferences and save below') ?> </h4><br>
182
+
183
+ <ul>
184
+ <li class="odd-row">
185
+ <td><label><input type="checkbox" class="input-box" title="Brand" name="brand" onclick="showMeNoThree('show-brand-box-three')" /> Brand </label></td>
186
+ </li>
187
+
188
+ <div id="show-brand-box-three" style="display:none; margin-left:25px;">
189
+ <?php
190
+ // specify the attribute code
191
+ $attributeCode = 'brand';
192
+
193
+ // build and filter the product collection
194
+ $products = Mage::getResourceModel('catalog/product_collection')
195
+ ->addAttributeToFilter($attributeCode, array('notnull' => true))
196
+ ->addAttributeToFilter($attributeCode, array('neq' => ''))
197
+ ->addAttributeToSelect($attributeCode);
198
+
199
+ // get all distinct attribute values
200
+ $usedAttributeValues = array_unique($products->getColumnValues($attributeCode));
201
+
202
+ $productModel = Mage::getModel('catalog/product');
203
+ $attr = $productModel->getResource()->getAttribute("brand");
204
+
205
+ if (count($usedAttributeValues)) {
206
+
207
+ foreach($usedAttributeValues as $optionId => $value) { ?>
208
+ <li class="even-row">
209
+ <td><label><input type="checkbox" class="input-box" value="<?php echo $value; ?>" title="<?php echo $attr->getSource()->getOptionText($value); ?>" name="brands[]" /><?php echo $attr->getSource()->getOptionText($value); ?></label></td>
210
+ </li>
211
+ <?php }
212
+ } ?>
213
+ </div>
214
+
215
+ <li class="even-row">
216
+ <td><label><input type="checkbox" class="input-box" title="Price" name="price" onclick="showMeNoOne('show-price-box-one')" /> Price</label></td>
217
+ </li>
218
+
219
+ <div id="show-price-box-one" style="display:none; margin-left:25px;">
220
+ <ul> <td><li class="even-row">
221
+ <label>Min: &nbsp;<input type="text" name="prices[]" class="input-box" title="Minimum Price" name="min" /></label>
222
+ </li></td>
223
+
224
+ <td> <li class="even-row">
225
+ <label>Max: <input type="text" name="prices[]" class="input-box" title="Maximum Price" name="max" /></label>
226
+ </li> </td>
227
+ </ul>
228
+ </div>
229
+
230
+ <li class="odd-row">
231
+ <td><label><input type="checkbox" class="input-box" title="Category" name="category" onclick="showMeNoTwo('show-category-box-two')" /> Category</label></td>
232
+ </li>
233
+
234
+ <div id="show-category-box-two" style="display:none; margin-left:25px;">
235
+ <?php $_helper = Mage::helper('catalog/category') ?>
236
+ <?php $_categories = $_helper->getStoreCategories() ?>
237
+ <?php $currentCategory = Mage::registry('current_category') ?>
238
+ <?php if (count($_categories) > 0): ?>
239
+ <div id="tabs-1">
240
+ <ul id="tree1">
241
+ <?php foreach($_categories as $_category): ?>
242
+ <li class="odd-row">
243
+ <input class="input-box" name="categories[]" type="checkbox" value="<?php echo $_category->getId() ?>"> <label><?php echo $_category->getName() ?></label>
244
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
245
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
246
+ <?php if (count($_subcategories) > 0): ?>
247
+ <ul>
248
+ <?php foreach($_subcategories as $_subcategory): ?>
249
+ <li class="odd-row">
250
+ <input class="input-box" type="checkbox" value="<?php echo $_subcategory->getId() ?>"> <label><?php echo $_subcategory->getName() ?></label>
251
+ <?php $_category = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
252
+ <?php $_subsubcategories = $_subcategory->getChildrenCategories() ?>
253
+ <?php if (count($_subsubcategories) > 0): ?>
254
+ <ul>
255
+ <?php foreach($_subsubcategories as $_subsubcategory): ?>
256
+ <li class="odd-row">
257
+ <input class="input-box" type="checkbox" value="<?php echo $_subsubcategory->getId() ?>"> <label><?php echo $_subsubcategory->getName() ?></label>
258
+ </li>
259
+ <?php endforeach; ?>
260
+ </ul>
261
+ <?php endif; ?>
262
+
263
+ </li>
264
+ <?php endforeach; ?>
265
+ </ul>
266
+ <?php endif; ?>
267
+ </li>
268
+ <?php endforeach; ?>
269
+ </ul>
270
+ </div>
271
+ <?php endif; ?>
272
+ </div>
273
+
274
+ <li class="even-row">
275
+ <td><label><input type="hidden" class="input-box" title="flag" name="flag" checked="checked" /></label></td>
276
+ </li>
277
+
278
+ <li class="form-submit-button">
279
+ <td><input type="submit" value="Save" title="Save" /></td>
280
+ <td><input type="reset" value="Cancel" title="Cancel" name="reset" /></td>
281
+ </li>
282
+ </ul>
283
+ </form>
284
+ <div class="buttons-set">
285
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account/') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
286
+ </div>
287
+ <?php }
288
+ endif;?>
289
+ <script type="text/javascript">
290
+ function showMeNoOne (boxnoone) {
291
+
292
+ var chboxsone = document.getElementsByName("price");
293
+
294
+ var visone = "none";
295
+
296
+ for(var i=0;i<chboxsone.length;i++) {
297
+ if(chboxsone[i].checked){
298
+ visone = "block";
299
+ break;
300
+ }
301
+ }
302
+ document.getElementById(boxnoone).style.display = visone;
303
+
304
+ }
305
+
306
+ function showMeNoTwo (boxnotwo) {
307
+ var chboxstwo = document.getElementsByName("category");
308
+ var vistwo = "none";
309
+
310
+ for(var i=0;i<chboxstwo.length;i++) {
311
+ if(chboxstwo[i].checked){
312
+ vistwo = "block";
313
+ break;
314
+ }
315
+ }
316
+ document.getElementById(boxnotwo).style.display = vistwo;
317
+ }
318
+
319
+ function showMeNoThree (boxnothree) {
320
+ var chboxsthree = document.getElementsByName("brand");
321
+ var visthree = "none";
322
+
323
+ for(var i=0;i<chboxsthree.length;i++) {
324
+ if(chboxsthree[i].checked){
325
+ visthree = "block";
326
+ break;
327
+ }
328
+ }
329
+ document.getElementById(boxnothree).style.display = visthree;
330
+ }
331
+ </script>
332
+ <?php if(!Mage::getStoreConfig('techinflo/mystoreoption/updropdown'))
333
+ echo Mage::getStoreConfig('techinflo/mystoreoption/cookietime'); ?>
app/design/frontend/default/default/template/techinflo/page/html/header.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ * Techinflo_Currency Converter
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the OSL-3.0 License
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-license.php
10
+ *
11
+ * @category Techinflo
12
+ * @package Techinflo_Currency Converter
13
+ * @copyright Copyright (c) 2014
14
+ * @license http://opensource.org/licenses/osl-license.php OSL-3.0 License
15
+ -->
16
+ <div class="header-container">
17
+ <div class="header">
18
+ <?php if ($this->getIsHomePage()):?>
19
+ <h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
20
+ <?php else:?>
21
+ <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
22
+ <?php endif?>
23
+ <div class="quick-access">
24
+ <?php echo $this->getChildHtml('topSearch') ?>
25
+ <p class="welcome-msg"><?php echo $this->getWelcome() ?> <?php echo $this->getAdditionalHtml() ?></p>
26
+ <?php echo $this->getChildHtml('topLinks') ?>
27
+ <?php echo $this->getChildHtml('store_language') ?>
28
+ <!-- START How to add Currency selector to Magento's header -->
29
+ <?php echo $this->getChildHtml('custom_currency_selector') ?>
30
+ <!-- END How to add Currency selector to Magento's header -->
31
+ </div>
32
+ <?php echo $this->getChildHtml('topContainer'); ?>
33
+ </div>
34
+ </div>
35
+ <?php echo $this->getChildHtml('topMenu') ?>
app/design/frontend/default/default/template/techinflo/page/html/topmenu.phtml ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_helper = Mage::helper('catalog/category') ?>
2
+ <?php $_categories = $_helper->getStoreCategories() ?>
3
+ <?php $currentCategory = Mage::registry('current_category') ?>
4
+ <!--?php //if($navCssClasses) //echo $navCssClasses; ?-->
5
+ <?php
6
+ $enabled = Mage::getStoreConfig('techinflo/mystoreoption/active');
7
+ if($enabled){
8
+
9
+ $value = Mage::getModel('core/cookie')->get('User');
10
+
11
+ /*Add the category array to be displayed at the top menu*/
12
+ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
13
+
14
+ $email = Mage::getSingleton('customer/session')->getCustomer()->getemail();
15
+ $email = " '$email' ";
16
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
17
+ $sql = "SELECT `categories` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1;";
18
+ $results = $connection->fetchOne($sql);
19
+ $results_array = array();
20
+ $results_array = explode(',', $results);
21
+
22
+ if($results_array != ''){
23
+ ?>
24
+ <div class="nav-container">
25
+ <div class="nav">
26
+ <div class="navbar-bg navbar-left"></div>
27
+ <div class="navbar-bg navbar">
28
+ <ul id="nav">
29
+ <?php
30
+ $i=1;
31
+
32
+ foreach($_categories as $_category):
33
+ if($i<5):
34
+ ?>
35
+ <?php $_category_count = Mage::getModel('catalog/category')->load($_category->getId()) ?>
36
+ <?php $_subcategories = $_category_count->getChildrenCategories() ?>
37
+ <?php if (count($_subcategories) > 0):
38
+ $class='parent';
39
+ else:
40
+ $class='';
41
+ endif; ?>
42
+
43
+ <?php
44
+ $removed_cat_array = $results_array;
45
+
46
+ if (in_array($_category->getId(), $removed_cat_array)) : ?>
47
+
48
+ <li class="level0 nav-<?php echo $i; ?> first level-top <?php echo $class; ?>">
49
+ <a class="level-top" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
50
+ <span><?php echo $_category->getName() ?></span>
51
+ </a>
52
+
53
+ <!-- Level 1st Start -->
54
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
55
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
56
+ <?php if (count($_subcategories) > 0): ?>
57
+
58
+ <ul class="level0">
59
+ <?php
60
+ $j=1;
61
+ foreach($_subcategories as $_subcategory): ?>
62
+
63
+ <li class="level1 nav-<?php echo $i; ?>-<?php echo $j; ?> <?php if($j==1): echo 'first'; endif; ?>">
64
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
65
+ <span><?php echo $_subcategory->getName() ?></span>
66
+ </a>
67
+ <!-- Level 1st End -->
68
+
69
+ <!-- Level 2nd Start -->
70
+ <?php $_category2 = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
71
+ <?php $_subcategories2 = $_category2->getChildrenCategories() ?>
72
+ <?php if (count($_subcategories2) > 0): ?>
73
+ <ul class="level1">
74
+ <?php
75
+ $k=1;
76
+ foreach($_subcategories2 as $_subcategory2): ?>
77
+
78
+ <li class="level2 nav-<?php echo $i; ?>-<?php echo $j; ?>-<?php echo $k; ?> <?php if($k==1): echo 'first'; endif; ?>">
79
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory2) ?>">
80
+ <span><?php echo $_subcategory2->getName() ?></span>
81
+ </a>
82
+ </li>
83
+ <?php
84
+ $k++;
85
+ endforeach; ?>
86
+ </ul>
87
+ <?php endif; ?>
88
+ <!-- Level 2nd End -->
89
+ </li>
90
+
91
+ <?php
92
+ $j++;
93
+ endforeach; ?>
94
+ </ul>
95
+ <?php endif; ?>
96
+ </li>
97
+ <?php
98
+ $i++;
99
+ endif;
100
+ endif;
101
+ endforeach; ?>
102
+
103
+ <!-- MORE Menu Start -->
104
+
105
+ <li class="nav-custom-link level0 level-top parent">
106
+
107
+ <!--<a class="level-top" href="#"><span>MORE</span></a>-->
108
+ <ul class="level0">
109
+
110
+ <?php
111
+ $i=1;
112
+ foreach($_categories as $_category):
113
+ if($i>4):
114
+ ?>
115
+ <?php $_category_count = Mage::getModel('catalog/category')->load($_category->getId()) ?>
116
+ <?php $_subcategories = $_category_count->getChildrenCategories() ?>
117
+ <?php if (count($_subcategories) > 0):
118
+ $class='parent';
119
+ else:
120
+ $class='';
121
+ endif;
122
+
123
+ if (!in_array($_category->getId(), $removed_cat_array)) : ?>
124
+
125
+ <li class="level1 nav-<?php echo $i; ?> first level-top <?php echo $class; ?>">
126
+ <a class="level-top" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
127
+ <span><?php echo $_category->getName() ?></span>
128
+ </a>
129
+
130
+ <!-- Level 1st Start -->
131
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
132
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
133
+ <?php if (count($_subcategories) > 0): ?>
134
+
135
+ <ul class="level1">
136
+ <?php
137
+ $j=1;
138
+ foreach($_subcategories as $_subcategory): ?>
139
+ <li class="level2 nav-<?php echo $i; ?>-<?php echo $j; ?> <?php if($j==1): echo 'first'; endif; ?>">
140
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
141
+ <span><?php echo $_subcategory->getName() ?></span>
142
+ </a>
143
+ <!-- Level 1st End -->
144
+ </li>
145
+
146
+ <?php
147
+ $j++;
148
+ endforeach; ?>
149
+ </ul>
150
+ <?php endif; ?>
151
+ </li>
152
+ <?php
153
+ endif;
154
+ endif;
155
+ $i++;
156
+ endforeach; ?>
157
+ </ul>
158
+ </li>
159
+ <!-- MORE Menu End -->
160
+ </ul>
161
+ </div>
162
+ <div class="navbar-bg navbar-right"></div>
163
+ </div>
164
+ </div>
165
+ <?php }
166
+
167
+ else {
168
+ $_menu = $this->getHtml('level-top') ?>
169
+ <?php if($_menu): ?>
170
+ <div class="nav-container">
171
+ <ul id="nav">
172
+ <?php echo $_menu ?>
173
+ </ul>
174
+ </div>
175
+ <?php endif; }
176
+
177
+ }
178
+ else if($value != '' && !Mage::getSingleton('customer/session')->isLoggedIn()){
179
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
180
+ $value = " '$value' ";
181
+ $sql = "SELECT `categories` FROM `guest_mystore_prefference` WHERE `cookie_name` = $value";
182
+ $results = $connection->fetchOne($sql);
183
+ $results_array = array();
184
+ $results_array = explode(',', $results);
185
+
186
+ if(!($results_array == '')){
187
+ ?>
188
+ <div class="nav-container">
189
+ <div class="nav">
190
+ <div class="navbar-bg navbar-left"></div>
191
+ <div class="navbar-bg navbar">
192
+ <ul id="nav">
193
+ <?php
194
+ $i=1;
195
+
196
+ foreach($_categories as $_category):
197
+ if($i<5):
198
+ ?>
199
+ <?php $_category_count = Mage::getModel('catalog/category')->load($_category->getId()) ?>
200
+ <?php $_subcategories = $_category_count->getChildrenCategories() ?>
201
+ <?php if (count($_subcategories) > 0):
202
+ $class='parent';
203
+ else:
204
+ $class='';
205
+ endif; ?>
206
+
207
+ <?php
208
+ $removed_cat_array = $results_array;
209
+
210
+ if (in_array($_category->getId(), $removed_cat_array)) : ?>
211
+
212
+ <li class="level0 nav-<?php echo $i; ?> first level-top <?php echo $class; ?>">
213
+ <a class="level-top" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
214
+ <span><?php echo $_category->getName() ?></span>
215
+ </a>
216
+
217
+ <!-- Level 1st Start -->
218
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
219
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
220
+ <?php if (count($_subcategories) > 0): ?>
221
+
222
+ <ul class="level0">
223
+ <?php
224
+ $j=1;
225
+ foreach($_subcategories as $_subcategory): ?>
226
+
227
+ <li class="level1 nav-<?php echo $i; ?>-<?php echo $j; ?> <?php if($j==1): echo 'first'; endif; ?>">
228
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
229
+ <span><?php echo $_subcategory->getName() ?></span>
230
+ </a>
231
+ <!-- Level 1st End -->
232
+
233
+ <!-- Level 2nd Start -->
234
+ <?php $_category2 = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
235
+ <?php $_subcategories2 = $_category2->getChildrenCategories() ?>
236
+ <?php if (count($_subcategories2) > 0): ?>
237
+ <ul class="level1">
238
+ <?php
239
+ $k=1;
240
+ foreach($_subcategories2 as $_subcategory2): ?>
241
+
242
+ <li class="level2 nav-<?php echo $i; ?>-<?php echo $j; ?>-<?php echo $k; ?> <?php if($k==1): echo 'first'; endif; ?>">
243
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory2) ?>">
244
+ <span><?php echo $_subcategory2->getName() ?></span>
245
+ </a>
246
+ </li>
247
+ <?php
248
+ $k++;
249
+ endforeach; ?>
250
+ </ul>
251
+ <?php endif; ?>
252
+ <!-- Level 2nd End -->
253
+ </li>
254
+
255
+ <?php
256
+ $j++;
257
+ endforeach; ?>
258
+ </ul>
259
+ <?php endif; ?>
260
+ </li>
261
+ <?php
262
+ $i++;
263
+ endif;
264
+ endif;
265
+ endforeach; ?>
266
+
267
+ <!-- MORE Menu Start -->
268
+
269
+ <li class="nav-custom-link level0 level-top parent">
270
+
271
+ <!--<a class="level-top" href="#"><span>MORE</span></a>-->
272
+ <ul class="level0">
273
+
274
+ <?php
275
+ $i=1;
276
+ foreach($_categories as $_category):
277
+ if($i>4):
278
+ ?>
279
+ <?php $_category_count = Mage::getModel('catalog/category')->load($_category->getId()) ?>
280
+ <?php $_subcategories = $_category_count->getChildrenCategories() ?>
281
+ <?php if (count($_subcategories) > 0):
282
+ $class='parent';
283
+ else:
284
+ $class='';
285
+ endif;
286
+
287
+ if (!in_array($_category->getId(), $removed_cat_array)) : ?>
288
+
289
+ <li class="level1 nav-<?php echo $i; ?> first level-top <?php echo $class; ?>">
290
+ <a class="level-top" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
291
+ <span><?php echo $_category->getName() ?></span>
292
+ </a>
293
+
294
+ <!-- Level 1st Start -->
295
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
296
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
297
+ <?php if (count($_subcategories) > 0): ?>
298
+
299
+ <ul class="level1">
300
+ <?php
301
+ $j=1;
302
+ foreach($_subcategories as $_subcategory): ?>
303
+ <li class="level2 nav-<?php echo $i; ?>-<?php echo $j; ?> <?php if($j==1): echo 'first'; endif; ?>">
304
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
305
+ <span><?php echo $_subcategory->getName() ?></span>
306
+ </a>
307
+ <!-- Level 1st End -->
308
+ </li>
309
+
310
+ <?php
311
+ $j++;
312
+ endforeach; ?>
313
+ </ul>
314
+ <?php endif; ?>
315
+ </li>
316
+ <?php
317
+ endif;
318
+ endif;
319
+ $i++;
320
+ endforeach; ?>
321
+ </ul>
322
+ </li>
323
+ <!-- MORE Menu End -->
324
+ </ul>
325
+ </div>
326
+ <div class="navbar-bg navbar-right"></div>
327
+ </div>
328
+ </div>
329
+ <?php }
330
+ }
331
+
332
+ else {
333
+ $_menu = $this->getHtml('level-top') ?>
334
+ <?php if($_menu): ?>
335
+ <div class="nav-container">
336
+ <ul id="nav">
337
+ <?php echo $_menu ?>
338
+ </ul>
339
+ </div>
340
+ <?php endif; } ?>
341
+
342
+ <?php }
343
+ else {
344
+ $_menu = $this->getHtml('level-top') ?>
345
+ <?php if($_menu): ?>
346
+ <div class="nav-container">
347
+ <ul id="nav">
348
+ <?php echo $_menu ?>
349
+ </ul>
350
+ </div>
351
+ <?php endif; } ?>
352
+
353
+ <!--?php
354
+ $attribute_code = "brand";
355
+ $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
356
+ $options = $attribute_details->getSource()->getAllOptions(false);
357
+ foreach($options as $option){
358
+ $mybrands[] = $option['label'];
359
+ $mybrand[] = $option['label'];
360
+ }
361
+ print_r($mybrands);
362
+ ?-->
363
+
364
+
app/design/frontend/default/default/template/techinflo/page/html/topmenu_dummy.phtml ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_helper = Mage::helper('catalog/category') ?>
2
+ <?php $_categories = $_helper->getStoreCategories() ?>
3
+ <?php $currentCategory = Mage::registry('current_category') ?>
4
+ <!--?php //if($navCssClasses) //echo $navCssClasses; ?-->
5
+ <?php
6
+ $enabled = Mage::getStoreConfig('techinflo/mystoreoption/active');
7
+ if($enabled){
8
+
9
+ $value = Mage::getModel('core/cookie')->get('User');
10
+
11
+ /*Add the category array to be displayed at the top menu*/
12
+ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
13
+
14
+ $email = Mage::getSingleton('customer/session')->getCustomer()->getemail();
15
+ $email = " '$email' ";
16
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
17
+ $sql = "SELECT `categories` FROM `customer_mystore_prefference` WHERE `customer_email` = $email ORDER BY `id` DESC LIMIT 1;";
18
+ $results = $connection->fetchOne($sql);
19
+ $results_array = array();
20
+ $results_array = explode(',', $results);
21
+
22
+ if($results_array == ''){
23
+ ?>
24
+ <div class="nav-container">
25
+ <div class="nav">
26
+ <div class="navbar-bg navbar-left"></div>
27
+ <div class="navbar-bg navbar">
28
+ <ul id="nav">
29
+ <?php
30
+ $i=1;
31
+
32
+ foreach($_categories as $_category):
33
+ if($i<5):
34
+ ?>
35
+ <?php $_category_count = Mage::getModel('catalog/category')->load($_category->getId()) ?>
36
+ <?php $_subcategories = $_category_count->getChildrenCategories() ?>
37
+ <?php if (count($_subcategories) > 0):
38
+ $class='parent';
39
+ else:
40
+ $class='';
41
+ endif; ?>
42
+
43
+ <?php
44
+ $removed_cat_array = $results_array;
45
+
46
+ if (in_array($_category->getId(), $removed_cat_array)) : ?>
47
+
48
+ <li class="level0 nav-<?php echo $i; ?> first level-top <?php echo $class; ?>">
49
+ <a class="level-top" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
50
+ <span><?php echo $_category->getName() ?></span>
51
+ </a>
52
+
53
+ <!-- Level 1st Start -->
54
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
55
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
56
+ <?php if (count($_subcategories) > 0): ?>
57
+
58
+ <ul class="level0">
59
+ <?php
60
+ $j=1;
61
+ foreach($_subcategories as $_subcategory): ?>
62
+
63
+ <li class="level1 nav-<?php echo $i; ?>-<?php echo $j; ?> <?php if($j==1): echo 'first'; endif; ?>">
64
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
65
+ <span><?php echo $_subcategory->getName() ?></span>
66
+ </a>
67
+ <!-- Level 1st End -->
68
+
69
+ <!-- Level 2nd Start -->
70
+ <?php $_category2 = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
71
+ <?php $_subcategories2 = $_category2->getChildrenCategories() ?>
72
+ <?php if (count($_subcategories2) > 0): ?>
73
+ <ul class="level1">
74
+ <?php
75
+ $k=1;
76
+ foreach($_subcategories2 as $_subcategory2): ?>
77
+
78
+ <li class="level2 nav-<?php echo $i; ?>-<?php echo $j; ?>-<?php echo $k; ?> <?php if($k==1): echo 'first'; endif; ?>">
79
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory2) ?>">
80
+ <span><?php echo $_subcategory2->getName() ?></span>
81
+ </a>
82
+ </li>
83
+ <?php
84
+ $k++;
85
+ endforeach; ?>
86
+ </ul>
87
+ <?php endif; ?>
88
+ <!-- Level 2nd End -->
89
+ </li>
90
+
91
+ <?php
92
+ $j++;
93
+ endforeach; ?>
94
+ </ul>
95
+ <?php endif; ?>
96
+ </li>
97
+ <?php
98
+ $i++;
99
+ endif;
100
+ endif;
101
+ endforeach; ?>
102
+
103
+ <!-- MORE Menu Start -->
104
+
105
+ <li class="nav-custom-link level0 level-top parent">
106
+
107
+ <!--<a class="level-top" href="#"><span>MORE</span></a>-->
108
+ <ul class="level0">
109
+
110
+ <?php
111
+ $i=1;
112
+ foreach($_categories as $_category):
113
+ if($i>4):
114
+ ?>
115
+ <?php $_category_count = Mage::getModel('catalog/category')->load($_category->getId()) ?>
116
+ <?php $_subcategories = $_category_count->getChildrenCategories() ?>
117
+ <?php if (count($_subcategories) > 0):
118
+ $class='parent';
119
+ else:
120
+ $class='';
121
+ endif;
122
+
123
+ if (!in_array($_category->getId(), $removed_cat_array)) : ?>
124
+
125
+ <li class="level1 nav-<?php echo $i; ?> first level-top <?php echo $class; ?>">
126
+ <a class="level-top" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
127
+ <span><?php echo $_category->getName() ?></span>
128
+ </a>
129
+
130
+ <!-- Level 1st Start -->
131
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
132
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
133
+ <?php if (count($_subcategories) > 0): ?>
134
+
135
+ <ul class="level1">
136
+ <?php
137
+ $j=1;
138
+ foreach($_subcategories as $_subcategory): ?>
139
+ <li class="level2 nav-<?php echo $i; ?>-<?php echo $j; ?> <?php if($j==1): echo 'first'; endif; ?>">
140
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
141
+ <span><?php echo $_subcategory->getName() ?></span>
142
+ </a>
143
+ <!-- Level 1st End -->
144
+ </li>
145
+
146
+ <?php
147
+ $j++;
148
+ endforeach; ?>
149
+ </ul>
150
+ <?php endif; ?>
151
+ </li>
152
+ <?php
153
+ endif;
154
+ endif;
155
+ $i++;
156
+ endforeach; ?>
157
+ </ul>
158
+ </li>
159
+ <!-- MORE Menu End -->
160
+ </ul>
161
+ </div>
162
+ <div class="navbar-bg navbar-right"></div>
163
+ </div>
164
+ </div>
165
+ <?php }
166
+
167
+ else {
168
+ $_menu = $this->getHtml('level-top') ?>
169
+ <?php if($_menu): ?>
170
+ <div class="nav-container">
171
+ <ul id="nav">
172
+ <?php echo $_menu ?>
173
+ </ul>
174
+ </div>
175
+ <?php endif; }
176
+
177
+ }
178
+
179
+
180
+
181
+ if($value != '' && !Mage::getSingleton('customer/session')->isLoggedIn()){
182
+
183
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
184
+ $value = " '$value' ";
185
+ $sql = "SELECT `categories` FROM `guest_mystore_prefference` WHERE `cookie_name` = $value";
186
+ $results = $connection->fetchOne($sql);
187
+ $results_array = array();
188
+ $results_array = explode(',', $results);
189
+
190
+ if(!($results_array == '')){
191
+ ?>
192
+ <div class="nav-container">
193
+ <div class="nav">
194
+ <div class="navbar-bg navbar-left"></div>
195
+ <div class="navbar-bg navbar">
196
+ <ul id="nav">
197
+ <?php
198
+ $i=1;
199
+
200
+ foreach($_categories as $_category):
201
+ if($i<5):
202
+ ?>
203
+ <?php $_category_count = Mage::getModel('catalog/category')->load($_category->getId()) ?>
204
+ <?php $_subcategories = $_category_count->getChildrenCategories() ?>
205
+ <?php if (count($_subcategories) > 0):
206
+ $class='parent';
207
+ else:
208
+ $class='';
209
+ endif; ?>
210
+
211
+ <?php
212
+ $removed_cat_array = $results_array;
213
+
214
+ if (in_array($_category->getId(), $removed_cat_array)) : ?>
215
+
216
+ <li class="level0 nav-<?php echo $i; ?> first level-top <?php echo $class; ?>">
217
+ <a class="level-top" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
218
+ <span><?php echo $_category->getName() ?></span>
219
+ </a>
220
+
221
+ <!-- Level 1st Start -->
222
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
223
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
224
+ <?php if (count($_subcategories) > 0): ?>
225
+
226
+ <ul class="level0">
227
+ <?php
228
+ $j=1;
229
+ foreach($_subcategories as $_subcategory): ?>
230
+
231
+ <li class="level1 nav-<?php echo $i; ?>-<?php echo $j; ?> <?php if($j==1): echo 'first'; endif; ?>">
232
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
233
+ <span><?php echo $_subcategory->getName() ?></span>
234
+ </a>
235
+ <!-- Level 1st End -->
236
+
237
+ <!-- Level 2nd Start -->
238
+ <?php $_category2 = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
239
+ <?php $_subcategories2 = $_category2->getChildrenCategories() ?>
240
+ <?php if (count($_subcategories2) > 0): ?>
241
+ <ul class="level1">
242
+ <?php
243
+ $k=1;
244
+ foreach($_subcategories2 as $_subcategory2): ?>
245
+
246
+ <li class="level2 nav-<?php echo $i; ?>-<?php echo $j; ?>-<?php echo $k; ?> <?php if($k==1): echo 'first'; endif; ?>">
247
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory2) ?>">
248
+ <span><?php echo $_subcategory2->getName() ?></span>
249
+ </a>
250
+ </li>
251
+ <?php
252
+ $k++;
253
+ endforeach; ?>
254
+ </ul>
255
+ <?php endif; ?>
256
+ <!-- Level 2nd End -->
257
+ </li>
258
+
259
+ <?php
260
+ $j++;
261
+ endforeach; ?>
262
+ </ul>
263
+ <?php endif; ?>
264
+ </li>
265
+ <?php
266
+ $i++;
267
+ endif;
268
+ endif;
269
+ endforeach; ?>
270
+
271
+ <!-- MORE Menu Start -->
272
+
273
+ <li class="nav-custom-link level0 level-top parent">
274
+
275
+ <!--<a class="level-top" href="#"><span>MORE</span></a>-->
276
+ <ul class="level0">
277
+
278
+ <?php
279
+ $i=1;
280
+ foreach($_categories as $_category):
281
+ if($i>4):
282
+ ?>
283
+ <?php $_category_count = Mage::getModel('catalog/category')->load($_category->getId()) ?>
284
+ <?php $_subcategories = $_category_count->getChildrenCategories() ?>
285
+ <?php if (count($_subcategories) > 0):
286
+ $class='parent';
287
+ else:
288
+ $class='';
289
+ endif;
290
+
291
+ if (!in_array($_category->getId(), $removed_cat_array)) : ?>
292
+
293
+ <li class="level1 nav-<?php echo $i; ?> first level-top <?php echo $class; ?>">
294
+ <a class="level-top" href="<?php echo $_helper->getCategoryUrl($_category) ?>">
295
+ <span><?php echo $_category->getName() ?></span>
296
+ </a>
297
+
298
+ <!-- Level 1st Start -->
299
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
300
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
301
+ <?php if (count($_subcategories) > 0): ?>
302
+
303
+ <ul class="level1">
304
+ <?php
305
+ $j=1;
306
+ foreach($_subcategories as $_subcategory): ?>
307
+ <li class="level2 nav-<?php echo $i; ?>-<?php echo $j; ?> <?php if($j==1): echo 'first'; endif; ?>">
308
+ <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
309
+ <span><?php echo $_subcategory->getName() ?></span>
310
+ </a>
311
+ <!-- Level 1st End -->
312
+ </li>
313
+
314
+ <?php
315
+ $j++;
316
+ endforeach; ?>
317
+ </ul>
318
+ <?php endif; ?>
319
+ </li>
320
+ <?php
321
+ endif;
322
+ endif;
323
+ $i++;
324
+ endforeach; ?>
325
+ </ul>
326
+ </li>
327
+ <!-- MORE Menu End -->
328
+ </ul>
329
+ </div>
330
+ <div class="navbar-bg navbar-right"></div>
331
+ </div>
332
+ </div>
333
+ <?php }
334
+
335
+ else {
336
+ $_menu = $this->getHtml('level-top') ?>
337
+ <?php if($_menu): ?>
338
+ <div class="nav-container">
339
+ <ul id="nav">
340
+ <?php echo $_menu ?>
341
+ </ul>
342
+ </div>
343
+ <?php endif; }
344
+ }
345
+ ?>
346
+
347
+ <?php }
348
+ else {
349
+ $_menu = $this->getHtml('level-top') ?>
350
+ <?php if($_menu): ?>
351
+ <div class="nav-container">
352
+ <ul id="nav">
353
+ <?php echo $_menu ?>
354
+ </ul>
355
+ </div>
356
+ <?php endif; } ?>
357
+
358
+ <!--?php
359
+ $attribute_code = "brand";
360
+ $attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
361
+ $options = $attribute_details->getSource()->getAllOptions(false);
362
+ foreach($options as $option){
363
+ $mybrands[] = $option['label'];
364
+ $mybrand[] = $option['label'];
365
+ }
366
+ print_r($mybrands);
367
+ ?-->
368
+
369
+
app/design/frontend/default/default/template/techinflo/page/template/links.phtml ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2013 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
+ * @see Mage_Page_Block_Template_Links
30
+ */
31
+ $value = Mage::getModel('core/cookie')->get('User');
32
+ ?>
33
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl('js/mystore/lightbox-form.js');?>" alt=""/></script>
34
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl('js/mystore/prefference.js');?>" alt=""/></script>
35
+ <link href="<?php echo $this->getSkinUrl('css/mystore/lightbox-form.css');?>" rel="stylesheet" type="text/css" media="all" />
36
+ <link href="<?php echo $this->getSkinUrl('css/mystore/prefference.css');?>" rel="stylesheet" type="text/css" media="all" />
37
+ <?php $_links = $this->getLinks(); ?>
38
+ <?php if(count($_links)>0): ?>
39
+ <div>
40
+ <ul class="links"<?php if($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif;?>>
41
+
42
+ <!-- Mystore Top link -->
43
+ <?php
44
+ $enabled = Mage::getStoreConfig('techinflo/mystoreoption/active');
45
+ if($enabled):
46
+ if (!Mage::getSingleton('customer/session')->isLoggedIn()){
47
+ if($value == '') { ?>
48
+ <li class="level0 nav-98 parent <?php if (strpos(Mage::helper('core/url')->getCurrentUrl(),'mystore') != false ) :?> active<?php endif;?>">
49
+ <div class="main-content"><a href="#" class="topopup" onClick="openbox('<h4>Set Store Prefferences</h4>', 0)"><?php echo $this->__('My Preferences') ?></a>
50
+ </div>
51
+ </li>
52
+ <?php }
53
+
54
+ else { ?>
55
+ <li class="level0 nav-98 parent <?php if (strpos(Mage::helper('core/url')->getCurrentUrl(),'mystore') != false ) :?> active<?php endif;?>">
56
+ <div class="main-content"><a href="#" class="topopup"><?php echo $this->__('My Preferences') ?></a>
57
+ </div>
58
+ </li>
59
+ <?php }
60
+ }
61
+ endif; ?>
62
+ <!-- Mystore Top link -->
63
+
64
+ <?php foreach($_links as $_link): ?>
65
+ <li <?php if($_link->getIsLast()): ?> class="last"<?php endif; ?><?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?></li>
66
+ <?php endforeach; ?>
67
+ </ul>
68
+ </div>
69
+ <?php endif; ?>
70
+
71
+ <?php $value = Mage::getModel('core/cookie')->get('User'); if(!isset($_COOKIE[$value])){
72
+ ?>
73
+
74
+ <div id="shadowing"></div>
75
+ <div id="box">
76
+ <span id="boxtitle"></span>
77
+ <a href="#" id="close-button" onClick="closebox()"><img src="Images/b1.jpg" alt="X"></a>
78
+
79
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
80
+
81
+ <form id="mainform" class="prefference-save" action="<?php echo Mage::helper("adminhtml")->getUrl("mystoreoption/index/guestprefference"); ?>" method="POST">
82
+
83
+ <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
84
+ <?php Mage::log(Mage::getSingleton('core/session')->getFormKey(), null, ‘layout.log’ );?>
85
+
86
+ <h4><?php echo $this->__('Please select your store preferences and save below') ?> </h4><br>
87
+
88
+ <ul>
89
+ <li class="odd-row">
90
+ <td><label><input type="checkbox" class="input-box" title="Brand" name="brand" onclick="showMeThree('show-brand-box')" /> Brand </label></td>
91
+ </li>
92
+
93
+ <div id="show-brand-box" style="display:none; margin-left:25px;">
94
+ <?php
95
+ // specify the attribute code
96
+ $attributeCode = 'brand';
97
+
98
+ // build and filter the product collection
99
+ $products = Mage::getResourceModel('catalog/product_collection')
100
+ ->addAttributeToFilter($attributeCode, array('notnull' => true))
101
+ ->addAttributeToFilter($attributeCode, array('neq' => ''))
102
+ ->addAttributeToSelect($attributeCode);
103
+
104
+ // get all distinct attribute values
105
+ $usedAttributeValues = array_unique($products->getColumnValues($attributeCode));
106
+
107
+ $productModel = Mage::getModel('catalog/product');
108
+ $attr = $productModel->getResource()->getAttribute("brand");
109
+
110
+ if (count($usedAttributeValues)) {
111
+
112
+ foreach($usedAttributeValues as $optionId => $value) { ?>
113
+ <li class="even-row">
114
+ <td><label><input type="checkbox" class="input-box" value="<?php echo $value; ?>" title="<?php echo $attr->getSource()->getOptionText($value); ?>" name="brands[]" /> <?php echo $attr->getSource()->getOptionText($value); ?></label></td>
115
+ </li>
116
+ <?php }
117
+ } ?>
118
+ </div>
119
+
120
+ <li class="even-row">
121
+ <td><label><input type="checkbox" class="input-box" title="Price" name="price" onclick="showMeOne('show-price-box')" /> Price</label></td>
122
+ </li>
123
+
124
+ <div id="show-price-box" style="display:none; margin-left:25px;">
125
+ <ul> <td><li class="even-row">
126
+ <label>Min: &nbsp;<input type="text" name="prices[]" class="input-box" title="Minimum Price" name="min" /></label>
127
+ </li></td>
128
+
129
+ <td> <li class="even-row">
130
+ <label>Max: <input type="text" name="prices[]" class="input-box" title="Maximum Price" name="max" /></label>
131
+ </li> </td>
132
+ </ul>
133
+ </div>
134
+
135
+ <li class="odd-row">
136
+ <td><label><input type="checkbox" class="input-box" title="Category" name="category" onclick="showMeTwo('show-category-box')" /> Category</label></td>
137
+ </li>
138
+
139
+ <div id="show-category-box" style="display:none; margin-left:25px;">
140
+ <?php $_helper = Mage::helper('catalog/category') ?>
141
+ <?php $_categories = $_helper->getStoreCategories() ?>
142
+ <?php $currentCategory = Mage::registry('current_category') ?>
143
+ <?php if (count($_categories) > 0): ?>
144
+ <div id="tabs-1">
145
+ <ul id="tree1">
146
+ <?php foreach($_categories as $_category): ?>
147
+ <li class="odd-row">
148
+ <input class="input-box" name="categories[]" type="checkbox" value="<?php echo $_category->getId() ?>"> <label><?php echo $_category->getName() ?></label>
149
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
150
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
151
+ <?php if (count($_subcategories) > 0): ?>
152
+ <ul>
153
+ <?php foreach($_subcategories as $_subcategory): ?>
154
+ <li class="odd-row">
155
+ <input class="input-box" type="checkbox" value="<?php echo $_subcategory->getId() ?>"> <label><?php echo $_subcategory->getName() ?></label>
156
+ <?php $_category = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
157
+ <?php $_subsubcategories = $_subcategory->getChildrenCategories() ?>
158
+ <?php if (count($_subsubcategories) > 0): ?>
159
+ <ul>
160
+ <?php foreach($_subsubcategories as $_subsubcategory): ?>
161
+ <li class="odd-row">
162
+ <input class="input-box" type="checkbox" value="<?php echo $_subsubcategory->getId() ?>"> <label><?php echo $_subsubcategory->getName() ?></label>
163
+ </li>
164
+ <?php endforeach; ?>
165
+ </ul>
166
+ <?php endif; ?>
167
+
168
+ </li>
169
+ <?php endforeach; ?>
170
+ </ul>
171
+ <?php endif; ?>
172
+ </li>
173
+ <?php endforeach; ?>
174
+ </ul>
175
+ </div>
176
+ <?php endif; ?>
177
+ </div>
178
+
179
+ <li class="even-row">
180
+ <td><label><input type="hidden" class="input-box" title="flag" name="flag" checked="checked" /></label></td>
181
+ </li>
182
+
183
+ <li class="form-submit-button">
184
+ <td><input type="submit" value="Save" title="Save" /></td>
185
+ <td><input type="reset" value="Cancel" title="Cancel" onClick="closebox()" name="reset" /></td>
186
+ </li>
187
+ </ul>
188
+ </form>
189
+ </div>
190
+ <?php } else {
191
+
192
+ $name = Mage::getModel('core/cookie')->get('User');
193
+ $name = " '$name' ";
194
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
195
+
196
+ $sql = "SELECT `categories` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
197
+ $sql2 = "SELECT `prices` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
198
+ $sql3 = "SELECT `brands` FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
199
+
200
+ $results = $connection->fetchOne($sql);
201
+ $results2 = $connection->fetchOne($sql2);
202
+ $results3 = $connection->fetchOne($sql3);
203
+
204
+ $results_array = array();
205
+ $results_array2 = array();
206
+ $results_array3 = array();
207
+
208
+ $category_array = explode(',', $results);
209
+ $price_array = explode(',', $results2);
210
+ $brand_array = explode(',', $results3);
211
+ ?>
212
+ <div id="shadowing"></div>
213
+ <div id="box">
214
+ <span id="boxtitle"></span>
215
+ <a href="#" id="close-button" onClick="closebox()"><img src="Images/b1.jpg" alt="X"></a>
216
+
217
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
218
+
219
+
220
+ <?php $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
221
+ $sql = "SELECT * FROM `guest_mystore_prefference` WHERE `cookie_name` = $name ORDER BY `id` DESC LIMIT 1";
222
+ $results = $connection->fetchAll($sql);
223
+ foreach($results as $result) {
224
+ ?>
225
+
226
+ <form id="mainform" class="prefference-save" action="<?php echo Mage::helper("adminhtml")->getUrl("mystoreoption/index/guestprefference"); ?>" method="POST">
227
+ <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
228
+ <?php Mage::log(Mage::getSingleton('core/session')->getFormKey(), null, ‘layout.log’ );?>
229
+ <h4><?php echo $this->__('Please select your store preferences and save below') ?> </h4><br>
230
+ <ul>
231
+ <li class="odd-row">
232
+ <td><label><input type="checkbox" class="input-box" title="Brand" name="brand" onclick="showMeThree('show-brand-box')"
233
+ <?php if($result[brand] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Brand </label></td>
234
+ </li>
235
+
236
+ <div id="show-brand-box" style="margin-left:25px;">
237
+ <?php
238
+ // specify the attribute code
239
+ $attributeCode = 'brand';
240
+
241
+ // build and filter the product collection
242
+ $products = Mage::getResourceModel('catalog/product_collection')
243
+ ->addAttributeToFilter($attributeCode, array('notnull' => true))
244
+ ->addAttributeToFilter($attributeCode, array('neq' => ''))
245
+ ->addAttributeToSelect($attributeCode);
246
+
247
+ // get all distinct attribute values
248
+ $usedAttributeValues = array_unique($products->getColumnValues($attributeCode));
249
+
250
+ $productModel = Mage::getModel('catalog/product');
251
+ $attr = $productModel->getResource()->getAttribute("brand");
252
+
253
+ if (count($usedAttributeValues)) {
254
+
255
+ foreach($usedAttributeValues as $optionId => $value) { ?>
256
+ <li class="even-row">
257
+ <td><label><input type="checkbox" class="input-box" value="<?php echo $value; ?>" title="<?php echo $attr->getSource()->getOptionText($value); ?>" name="brands[]"
258
+ <?php foreach($brand_array as $brand) { if($brand == $value) echo 'checked' . ' ' . '=' . 'checked'; } ?> /> <?php echo $attr->getSource()->getOptionText($value); ?></label></td>
259
+ </li>
260
+ <?php }
261
+ } ?>
262
+ </div>
263
+
264
+ <li class="even-row">
265
+ <td><label><input type="checkbox" class="input-box" title="Price" name="price" onclick="showMeOne('show-price-box')"
266
+ <?php if($result[price] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Price</label></td>
267
+ </li>
268
+ <div id="show-price-box" style="margin-left:25px;">
269
+ <ul> <td><li class="even-row">
270
+ <label>Min: &nbsp;<input type="text" name="prices[]" class="input-box" title="Minimum Price" name="min"
271
+ value="<?php if($price_array[0]) echo $price_array[0]; ?>" /></label>
272
+ </li></td>
273
+
274
+ <td> <li class="even-row">
275
+ <label>Max: <input type="text" name="prices[]" class="input-box" title="Maximum Price" name="max"
276
+ value="<?php if($price_array[1]) echo $price_array[1]; ?>" /></label>
277
+ </li> </td>
278
+ </ul>
279
+ </div>
280
+ <li class="odd-row">
281
+ <td><label><input type="checkbox" class="input-box" title="Category" name="category" onclick="showMeTwo('show-category-box')"
282
+ <?php if($result[category] == 'on') {echo 'checked' . ' ' . '=' . 'checked';} ?> /> Category</label></td>
283
+ </li>
284
+ <div id="show-category-box" style="margin-left:25px;">
285
+ <?php $_helper = Mage::helper('catalog/category') ?>
286
+ <?php $_categories = $_helper->getStoreCategories() ?>
287
+ <?php $currentCategory = Mage::registry('current_category') ?>
288
+ <?php if (count($_categories) > 0): ?>
289
+ <div id="tabs-1">
290
+ <ul id="tree1">
291
+ <?php foreach($_categories as $_category): ?>
292
+ <li class="odd-row">
293
+ <input class="input-box" name="categories[]" type="checkbox" value="<?php echo $_category->getId() ?>"
294
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
295
+ <label><?php echo $_category->getName() ?></label>
296
+ <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
297
+ <?php $_subcategories = $_category->getChildrenCategories() ?>
298
+ <?php if (count($_subcategories) > 0): ?>
299
+ <ul>
300
+ <?php foreach($_subcategories as $_subcategory): ?>
301
+ <li class="odd-row">
302
+ <input class="input-box" type="checkbox" value="<?php echo $_subcategory->getId() ?>"
303
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
304
+ <label><?php echo $_subcategory->getName() ?></label>
305
+ <?php $_category = Mage::getModel('catalog/category')->load($_subcategory->getId()) ?>
306
+ <?php $_subsubcategories = $_subcategory->getChildrenCategories() ?>
307
+ <?php if (count($_subsubcategories) > 0): ?>
308
+ <ul>
309
+ <?php foreach($_subsubcategories as $_subsubcategory): ?>
310
+ <li class="odd-row">
311
+ <input class="input-box" type="checkbox" value="<?php echo $_subsubcategory->getId() ?>"
312
+ <?php foreach($category_array as $category) { if($category == $_category->getId()) echo 'checked' . ' ' . '=' . 'checked'; } ?> />
313
+ <label><?php echo $_subsubcategory->getName() ?></label>
314
+ </li>
315
+ <?php endforeach; ?>
316
+ </ul>
317
+ <?php endif; ?>
318
+
319
+ </li>
320
+ <?php endforeach; ?>
321
+ </ul>
322
+ <?php endif; ?>
323
+ </li>
324
+ <?php endforeach; ?>
325
+ </ul>
326
+ </div>
327
+ <?php endif; ?>
328
+ </div>
329
+
330
+ <li class="even-row">
331
+ <td><label><input type="hidden" class="input-box" title="flag" name="flag" checked="checked" /></label></td>
332
+ </li>
333
+
334
+ <li class="form-submit-button">
335
+ <td><input type="submit" value="Save" title="Save" /></td>
336
+ <td><input type="reset" value="Cancel" title="Cancel" onClick="closebox()" name="reset" /></td>
337
+ </li>
338
+ </ul>
339
+ </form>
340
+ </div>
341
+
342
+ <?php
343
+ }
344
+ }
345
+ ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Techinflo_Mystore</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
  <channel>community</channel>
@@ -17,13 +17,11 @@ user will see only he/his preferred range of products.&lt;/p&gt;&#xD;
17
  &#xD;
18
  2. User can set their product preferences based on the following terms.&#xD;
19
  &#xD;
20
- - Based on product categories like Men, Women, Kid etc&#xD;
21
- - Color ranges,&#xD;
22
- - Price ranges,&#xD;
23
- - Manufacturer ranges,&#xD;
24
- - Newly arrived ranges,&#xD;
25
- - Weight ranges,&#xD;
26
- - Out of stock&#xD;
27
  &#xD;
28
  3. Saving the user preferences and showing the same preference ranged products on revisits.&#xD;
29
  &#xD;
@@ -40,24 +38,31 @@ user will see only he/his preferred range of products.&lt;/p&gt;&#xD;
40
  &#xD;
41
  2. User can set their product preferences based on the following terms.&#xD;
42
  &#xD;
43
- - Based on product categories like Men, Women, Kid etc&#xD;
44
- - Color ranges,&#xD;
45
- - Price ranges,&#xD;
46
- - Manufacturer ranges,&#xD;
47
- - Newly arrived ranges,&#xD;
48
- - Weight ranges,&#xD;
49
- - Out of stock&#xD;
50
  &#xD;
51
  3. Saving the user preferences and showing the same preference ranged products on revisits.&#xD;
52
  &#xD;
53
  4. Allowing the user to set preferences and filter the products of their preference.&#xD;
54
  &#xD;
55
  5. User is able to change or update his preferences periodically.&#xD;
56
- </notes>
 
 
 
 
 
 
 
 
 
57
  <authors><author><name>Techinflo</name><user>Techinflo</user><email>anil.gupta@techinflo.com</email></author></authors>
58
- <date>2014-02-07</date>
59
- <time>06:04:25</time>
60
- <contents><target name="magelocal"><dir name="Techinflo"><dir name="Mystore"><dir name="Block"><dir name="Customer"><dir name="Account"><file name="Customer.php" hash="cfaedd1671fece5703e0e0cad0dbc877"/><file name="Lists.php" hash="9434978ca01408f825f90dbf1355d881"/></dir></dir><file name="Customer.php" hash="cfaedd1671fece5703e0e0cad0dbc877"/></dir><dir name="Helper"><file name="Data.php" hash="5d8918a8a1805d1f6449e49da0fd93aa"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="26218eed501c862169b31a5b4fb6dad4"/></dir></dir><dir name="controllers"><file name="AccountpageController.php" hash="16a5d7ccc5d8a33e7a7ae4f731e58f3b"/><file name="IndexController.php" hash="185b67e1ce32c43bce80031a6b5ca631"/><file name="new 2.txt" hash="c57bcc691f38a0cb749848e973f7f1e3"/></dir><dir name="etc"><file name="config.xml" hash="f26dee04767827cd2dc54809e8dcb3ea"/></dir><dir name="sql"><dir name="techinflo_mystore_setup"><file name="install-0.0.1.php" hash="cb7cd771efe5474053a2bba7b5ce46d4"/></dir></dir></dir><dir name="MystoreOption"><dir name="Block"><file name="View.php" hash="c899a057f5b1bc103dd90b8490d70ec3"/><file name="View.php.bak" hash="7ae6dbe3ca73abc61a31d7dc57480942"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Preferencetype"><file name="Values.php" hash="7bcad16584362872371566ad216ea69c"/><file name="Values.php.bak" hash="2fc1dc3ca3fcaad491b78edb1213cbd3"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="AccountController.php" hash="8990a68bf93a3140dd0cb1f71f69381d"/><file name="IndexController.php" hash="d7c654303d3110353be1393216c859aa"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1fb0e377a00beaf8ca80ccfa9da7605d"/><file name="adminhtml.xml.bak" hash="1fb0e377a00beaf8ca80ccfa9da7605d"/><file name="config.xml" hash="bc4048d28dd79302516ef1975fea1895"/><file name="config.xml.bak" hash="f0abb79c228ea62581ba31cf2c05eabb"/><file name="system.xml" hash="6fd802dbb2ac22564b734350fa84d741"/><file name="system.xml.bak" hash="0a6b033f46052ea1fab6e6318cc6981d"/></dir></dir><dir name="MyStoreWidget"><dir name="Block"><file name="Index.php" hash="e5ee942b2cfa08ade37e148360a0a3a2"/><file name="Mystore_Widget.php" hash="b8f716051317e3f7c1f8161568a19409"/></dir><dir name="Helper"><file name="Data.php" hash="2e56db7f8ed9f0f1f11189a8e1953a9e"/></dir><dir name="controllers"><file name="IndexController.php" hash="c2e19b8b52dfba9c45ae4ee07d6e1cb4"/></dir><dir name="etc"><file name="config.xml" hash="39f37c40fb2ac8db4fa0d4adf6c774c3"/><file name="widget.xml" hash="86294639b89da4df4325fa5acbd784fc"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="Techinflo"><file name="local.xml" hash=""/><file name="page.xml" hash=""/><dir name="customer"><file name="mystore.xml" hash=""/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Techinflo_Mystore.xml" hash="ad841303bb27253a9b1ddab75bd3c2d5"/><file name="Techinflo_MystoreOption.xml" hash="43d4fbccdd30e20b25e854e06e23dedb"/><file name="Techinflo_MyStoreWidget.xml" hash="9084eeed111daefd0620f273f87d2418"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="mystore"><file name="lightbox-form.css" hash="2fe2884fb0df9071dda49197cb9d8b5b"/><file name="prefference.css" hash="20db2c610de384fb4348c1f3d9fa7ea7"/></dir></dir><dir name="js"><dir name="mystore"><file name="lightbox-form.js" hash="6936ec37b9cbb574f02e0c81e74de7d7"/><file name="mystore_page.js" hash="740bf6f08e54dc97b3b2d0928302ee75"/><file name="prefference.js" hash="1f0ad7603dd9d4558bf7ab496a8dab1b"/></dir></dir></dir></dir></dir></target></contents>
61
  <compatible/>
62
  <dependencies><required><php><min>5.1.0</min><max>6.1.0</max></php></required></dependencies>
63
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Techinflo_Mystore</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
  <channel>community</channel>
17
  &#xD;
18
  2. User can set their product preferences based on the following terms.&#xD;
19
  &#xD;
20
+ Based on &#xD;
21
+ - Categories like Men, Women, Kid etc&#xD;
22
+ - Price ranges&#xD;
23
+ - Brand ranges&#xD;
24
+ &#xD;
 
 
25
  &#xD;
26
  3. Saving the user preferences and showing the same preference ranged products on revisits.&#xD;
27
  &#xD;
38
  &#xD;
39
  2. User can set their product preferences based on the following terms.&#xD;
40
  &#xD;
41
+ Based on &#xD;
42
+ - Categories like Men, Women, Kid etc&#xD;
43
+ - Price ranges&#xD;
44
+ - Brand ranges&#xD;
45
+ &#xD;
 
 
46
  &#xD;
47
  3. Saving the user preferences and showing the same preference ranged products on revisits.&#xD;
48
  &#xD;
49
  4. Allowing the user to set preferences and filter the products of their preference.&#xD;
50
  &#xD;
51
  5. User is able to change or update his preferences periodically.&#xD;
52
+ &#xD;
53
+ &#xD;
54
+ &lt;strong&gt;Set Up Information&lt;/strong&gt;&#xD;
55
+ &lt;br/&gt;&lt;br/&gt;&#xD;
56
+ &lt;p&gt;1. Please ensure that the store is having atleast one product associated with atleast one category under the root category.&lt;/p&gt;&#xD;
57
+ &lt;br/&gt;&#xD;
58
+ &lt;p&gt;2. Ensure that the brand dropdown attribute is created for the products with attribute code 'brand'. and give appropriate options for it.&lt;/p&gt;&#xD;
59
+ &lt;br/&gt;&#xD;
60
+ &lt;p&gt;3. Associate the brand name with each product. &lt;/p&gt;&#xD;
61
+ &lt;br/&gt;</notes>
62
  <authors><author><name>Techinflo</name><user>Techinflo</user><email>anil.gupta@techinflo.com</email></author></authors>
63
+ <date>2014-02-10</date>
64
+ <time>12:54:35</time>
65
+ <contents><target name="magelocal"><dir><dir name="Techinflo"><dir name="Mystore"><dir name="Block"><dir name="Customer"><dir name="Account"><file name="Customer.php" hash="cfaedd1671fece5703e0e0cad0dbc877"/><file name="Lists.php" hash="9434978ca01408f825f90dbf1355d881"/></dir></dir><file name="Customer.php" hash="cfaedd1671fece5703e0e0cad0dbc877"/></dir><dir name="Helper"><file name="Data.php" hash="5d8918a8a1805d1f6449e49da0fd93aa"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="26218eed501c862169b31a5b4fb6dad4"/></dir></dir><dir name="controllers"><file name="AccountpageController.php" hash="16a5d7ccc5d8a33e7a7ae4f731e58f3b"/><file name="IndexController.php" hash="185b67e1ce32c43bce80031a6b5ca631"/></dir><dir name="etc"><file name="config.xml" hash="1c4b0a36a26c49e3381aa1d9586fc4a0"/></dir><dir name="sql"><dir name="techinflo_mystore_setup"><file name="install-0.0.1.php" hash="cb7cd771efe5474053a2bba7b5ce46d4"/></dir></dir></dir><dir name="MystoreOption"><dir name="Block"><file name="View.php" hash="c899a057f5b1bc103dd90b8490d70ec3"/><file name="View.php.bak" hash="7ae6dbe3ca73abc61a31d7dc57480942"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Preferencetype"><file name="Values.php" hash="7bcad16584362872371566ad216ea69c"/><file name="Values.php.bak" hash="2fc1dc3ca3fcaad491b78edb1213cbd3"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="AccountController.php" hash="8990a68bf93a3140dd0cb1f71f69381d"/><file name="IndexController.php" hash="d7c654303d3110353be1393216c859aa"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1fb0e377a00beaf8ca80ccfa9da7605d"/><file name="adminhtml.xml.bak" hash="1fb0e377a00beaf8ca80ccfa9da7605d"/><file name="config.xml" hash="1a0084bd3749ba8162e2bfd500b8cbe5"/><file name="config.xml.bak" hash="f0abb79c228ea62581ba31cf2c05eabb"/><file name="system.xml" hash="6fd802dbb2ac22564b734350fa84d741"/><file name="system.xml.bak" hash="0a6b033f46052ea1fab6e6318cc6981d"/></dir></dir><dir name="MyStoreWidget"><dir name="Block"><file name="Index.php" hash="e5ee942b2cfa08ade37e148360a0a3a2"/><file name="Mystore_Widget.php" hash="b8f716051317e3f7c1f8161568a19409"/></dir><dir name="Helper"><file name="Data.php" hash="2e56db7f8ed9f0f1f11189a8e1953a9e"/></dir><dir name="controllers"><file name="IndexController.php" hash="c2e19b8b52dfba9c45ae4ee07d6e1cb4"/></dir><dir name="etc"><file name="config.xml" hash="ad15773fbf41d214692814e6cb6e54dc"/><file name="widget.xml" hash="86294639b89da4df4325fa5acbd784fc"/></dir></dir></dir><dir name="Mage"><dir name="Mystore"><dir name="Helper"><file name="Data.php" hash="42714e582804a288731a777badd2a37b"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="techinflo"><dir name="customer"><file name="mystore.xml" hash="16e26e01216691e893afd45a55c2ac9d"/><file name="mystore.xml" hash="16e26e01216691e893afd45a55c2ac9d"/><file name="mystore.xml" hash="16e26e01216691e893afd45a55c2ac9d"/></dir><file name="local.xml" hash="fb5b50653e5e91f8b148d7c11adc80da"/><file name="local.xml" hash="fb5b50653e5e91f8b148d7c11adc80da"/></dir><file name="customer.rar" hash="1f95f97fe83e0a345089b06bb4780593"/><file name="mystorewidget.xml" hash="0c246bd83bd55bae4791168dd05e32b1"/><file name="page.xml" hash="0a17d9e2251b267990ba7ca04b2f31bb"/><file name="pay.xml" hash="13f46127bc4b1075bc4a60baec8e298d"/></dir><dir name="template"><dir name="catalog"><dir name="product"><dir name="list"><file name="toolbar.phtml" hash="3f50b99e12ec8eb2efa82eca7c878aed"/></dir><file name="list.phtml" hash="a6f01ea1f08dcb3fc7307d6f6489ea16"/><file name="list_dummy.phtml" hash="99538ac98fbac5717934db5b25745e31"/></dir></dir><dir name="techinflo"><dir name="customer"><dir name="form"><file name="register.phtml" hash="0a49a4cf59d783a1b10a69da18607d4c"/><file name="register.phtml" hash="0a49a4cf59d783a1b10a69da18607d4c"/></dir><file name="page.phtml" hash="3d5735571b847c28d6a776e0bd39d93c"/><file name="page.phtml" hash="3d5735571b847c28d6a776e0bd39d93c"/></dir><dir name="page"><dir name="html"><file name="header.phtml" hash="2ccfbd3f83de196b2b354b5eff4737d5"/><file name="topmenu.phtml" hash="d31162dc82f9ea08ff694d127ce63420"/><file name="topmenu_dummy.phtml" hash="674e58eaa6cb427b2555b3c33898893c"/></dir><dir name="template"><file name="links.phtml" hash="3a6aee9f8e942ca132223daef2368899"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Techinflo_Mystore.xml" hash="ad841303bb27253a9b1ddab75bd3c2d5"/><file name="Techinflo_MystoreOption.xml" hash="43d4fbccdd30e20b25e854e06e23dedb"/><file name="Techinflo_MyStoreWidget.xml" hash="9084eeed111daefd0620f273f87d2418"/></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="mystore"><file name="lightbox-form.css" hash="2fe2884fb0df9071dda49197cb9d8b5b"/><file name="prefference.css" hash="20db2c610de384fb4348c1f3d9fa7ea7"/></dir></dir><dir name="js"><dir name="mystore"><file name="lightbox-form.js" hash="6936ec37b9cbb574f02e0c81e74de7d7"/><file name="mystore_page.js" hash="740bf6f08e54dc97b3b2d0928302ee75"/><file name="prefference.js" hash="1f0ad7603dd9d4558bf7ab496a8dab1b"/></dir></dir></dir></dir></dir></dir></target></contents>
66
  <compatible/>
67
  <dependencies><required><php><min>5.1.0</min><max>6.1.0</max></php></required></dependencies>
68
  </package>