HetNieuweWeb_CustomerNavigation - Version 0.2.0

Version Notes

Stable release of 'Manage Customer Navigation', version 0.2.0.

Download this release

Release Info

Developer Gerard de Visser
Extension HetNieuweWeb_CustomerNavigation
Version 0.2.0
Comparing to
See all releases


Code changes from version 0.1.0 to 0.2.0

app/code/community/HetNieuweWeb/CustomerNavigation/Block/Customer/Account/Navigation.php CHANGED
@@ -1,15 +1,26 @@
1
  <?php
2
  class HetNieuweWeb_CustomerNavigation_Block_Customer_Account_Navigation extends Mage_Customer_Block_Account_Navigation
3
- {
4
  public function removeLinkByName() {
5
  $NavigationLinks = array('account'=>'account', 'account_edit'=>'account_edit', 'address_book'=>'address_book', 'orders'=>'orders', 'billing_agreements'=>'billing_agreements', 'recurring_profiles'=>'recurring_profiles', 'reviews'=>'reviews', 'tags'=>'tags', 'wishlist'=>'wishlist', 'OAuth Customer Tokens'=>'oauth_customer_tokens', 'newsletter'=>'newsletter', 'downloadable_products'=>'downloadable_products');
6
 
7
  foreach ($NavigationLinks as $link => $configName) {
8
- $display = Mage::getStoreConfig('customer_navigation/settings/'.$configName);
9
- if (! $display) {
10
  unset($this->_links[$link]);
11
  }
12
  }
13
  }
 
 
 
 
 
 
 
 
 
 
 
14
  }
15
  ?>
1
  <?php
2
  class HetNieuweWeb_CustomerNavigation_Block_Customer_Account_Navigation extends Mage_Customer_Block_Account_Navigation
3
+ {
4
  public function removeLinkByName() {
5
  $NavigationLinks = array('account'=>'account', 'account_edit'=>'account_edit', 'address_book'=>'address_book', 'orders'=>'orders', 'billing_agreements'=>'billing_agreements', 'recurring_profiles'=>'recurring_profiles', 'reviews'=>'reviews', 'tags'=>'tags', 'wishlist'=>'wishlist', 'OAuth Customer Tokens'=>'oauth_customer_tokens', 'newsletter'=>'newsletter', 'downloadable_products'=>'downloadable_products');
6
 
7
  foreach ($NavigationLinks as $link => $configName) {
8
+ $display = Mage::getStoreConfig('customer_navigation/display/'.$configName);
9
+ if (isset($this->_links[$link]) && !$display) {
10
  unset($this->_links[$link]);
11
  }
12
  }
13
  }
14
+
15
+ public function renameLinkByName() {
16
+ $NavigationLinks = array('account'=>'account', 'account_edit'=>'account_edit', 'address_book'=>'address_book', 'orders'=>'orders', 'billing_agreements'=>'billing_agreements', 'recurring_profiles'=>'recurring_profiles', 'reviews'=>'reviews', 'tags'=>'tags', 'wishlist'=>'wishlist', 'OAuth Customer Tokens'=>'oauth_customer_tokens', 'newsletter'=>'newsletter', 'downloadable_products'=>'downloadable_products');
17
+
18
+ foreach ($NavigationLinks as $link => $configName) {
19
+ $name = Mage::getStoreConfig('customer_navigation/rename/'.$configName);
20
+ if (isset($this->_links[$link]) && $name != '') {
21
+ $this->_links[$link]["label"] = $name;
22
+ }
23
+ }
24
+ }
25
  }
26
  ?>
app/code/community/HetNieuweWeb/CustomerNavigation/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <HetNieuweWeb_CustomerNavigation>
6
- <version>0.1.0</version>
7
  </HetNieuweWeb_CustomerNavigation>
8
  </modules>
9
 
@@ -35,7 +35,7 @@
35
 
36
  <default>
37
  <customer_navigation>
38
- <settings>
39
  <account>1</account>
40
  <account_edit>1</account_edit>
41
  <address_book>1</address_book>
@@ -48,7 +48,7 @@
48
  <oauth_customer_tokens>1</oauth_customer_tokens>
49
  <newsletter>1</newsletter>
50
  <downloadable_products>1</downloadable_products>
51
- </settings>
52
  </customer_navigation>
53
  </default>
54
  </config>
3
  <config>
4
  <modules>
5
  <HetNieuweWeb_CustomerNavigation>
6
+ <version>0.2.0</version>
7
  </HetNieuweWeb_CustomerNavigation>
8
  </modules>
9
 
35
 
36
  <default>
37
  <customer_navigation>
38
+ <display>
39
  <account>1</account>
40
  <account_edit>1</account_edit>
41
  <address_book>1</address_book>
48
  <oauth_customer_tokens>1</oauth_customer_tokens>
49
  <newsletter>1</newsletter>
50
  <downloadable_products>1</downloadable_products>
51
+ </display>
52
  </customer_navigation>
53
  </default>
54
  </config>
app/code/community/HetNieuweWeb/CustomerNavigation/etc/system.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <tabs>
5
  <hetnieuweweb translate="label">
6
- <label>Het Nieuwe Web<![CDATA[<div style="display:inline-block; float:right; margin-right:5px;"><a href="http://www.hetnieuweweb.nl/" target="_blank" style="background: none;"><img src="http://hetnieuweweb.nl/wp-content/themes/HetNieuweWeb-v4/img/hetnieuweweb_twister_color.png" width="20" height="20"/></a></div>]]></label>
7
  <sort_order>150</sort_order>
8
  </hetnieuweweb>
9
  </tabs>
@@ -18,7 +18,7 @@
18
  <show_in_website>1</show_in_website>
19
  <show_in_store>1</show_in_store>
20
  <groups>
21
- <settings translate="label">
22
  <label>Display Links</label>
23
  <frontend_type>text</frontend_type>
24
  <sort_order>10</sort_order>
@@ -27,7 +27,7 @@
27
  <show_in_store>1</show_in_store>
28
  <fields>
29
  <account translate="label">
30
- <label>Account</label>
31
  <frontend_type>select</frontend_type>
32
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
33
  <sort_order>10</sort_order>
@@ -36,7 +36,7 @@
36
  <show_in_store>1</show_in_store>
37
  </account>
38
  <account_edit translate="label">
39
- <label>Account Edit</label>
40
  <frontend_type>select</frontend_type>
41
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
42
  <sort_order>20</sort_order>
@@ -54,7 +54,7 @@
54
  <show_in_store>1</show_in_store>
55
  </address_book>
56
  <orders translate="label">
57
- <label>Orders</label>
58
  <frontend_type>select</frontend_type>
59
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
60
  <sort_order>40</sort_order>
@@ -63,7 +63,7 @@
63
  <show_in_store>1</show_in_store>
64
  </orders>
65
  <billing_agreements translate="label">
66
- <label>Billing Agreement</label>
67
  <frontend_type>select</frontend_type>
68
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
69
  <sort_order>50</sort_order>
@@ -81,7 +81,7 @@
81
  <show_in_store>1</show_in_store>
82
  </recurring_profiles>
83
  <reviews translate="label">
84
- <label>Reviews</label>
85
  <frontend_type>select</frontend_type>
86
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
87
  <sort_order>70</sort_order>
@@ -90,7 +90,7 @@
90
  <show_in_store>1</show_in_store>
91
  </reviews>
92
  <tags translate="label">
93
- <label>Tags</label>
94
  <frontend_type>select</frontend_type>
95
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
96
  <sort_order>80</sort_order>
@@ -99,7 +99,7 @@
99
  <show_in_store>1</show_in_store>
100
  </tags>
101
  <wishlist translate="label">
102
- <label>Wishlist</label>
103
  <frontend_type>select</frontend_type>
104
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
105
  <sort_order>90</sort_order>
@@ -108,7 +108,7 @@
108
  <show_in_store>1</show_in_store>
109
  </wishlist>
110
  <oauth_customer_tokens translate="label">
111
- <label>OAuth Customer Tokens</label>
112
  <frontend_type>select</frontend_type>
113
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
114
  <sort_order>100</sort_order>
@@ -117,7 +117,7 @@
117
  <show_in_store>1</show_in_store>
118
  </oauth_customer_tokens>
119
  <newsletter translate="label">
120
- <label>Newsletter</label>
121
  <frontend_type>select</frontend_type>
122
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
123
  <sort_order>110</sort_order>
@@ -126,7 +126,7 @@
126
  <show_in_store>1</show_in_store>
127
  </newsletter>
128
  <downloadable_products translate="label">
129
- <label>Downloadable Products</label>
130
  <frontend_type>select</frontend_type>
131
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
132
  <sort_order>120</sort_order>
@@ -135,7 +135,113 @@
135
  <show_in_store>1</show_in_store>
136
  </downloadable_products>
137
  </fields>
138
- </settings>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  </groups>
140
  </customer_navigation>
141
  </sections>
3
  <config>
4
  <tabs>
5
  <hetnieuweweb translate="label">
6
+ <label>Het Nieuwe Web<![CDATA[<div style="display:inline-block; float:right; margin-right:5px;"><a href="http://www.hetnieuweweb.nl/" target="_blank" style="background: none;"><img src="http://www.hetnieuweweb.nl/magento/hetnieuweweb_admin_logo.png" width="20" height="20"/></a></div>]]></label>
7
  <sort_order>150</sort_order>
8
  </hetnieuweweb>
9
  </tabs>
18
  <show_in_website>1</show_in_website>
19
  <show_in_store>1</show_in_store>
20
  <groups>
21
+ <display translate="label">
22
  <label>Display Links</label>
23
  <frontend_type>text</frontend_type>
24
  <sort_order>10</sort_order>
27
  <show_in_store>1</show_in_store>
28
  <fields>
29
  <account translate="label">
30
+ <label>Account Dashboard</label>
31
  <frontend_type>select</frontend_type>
32
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
33
  <sort_order>10</sort_order>
36
  <show_in_store>1</show_in_store>
37
  </account>
38
  <account_edit translate="label">
39
+ <label>Account Information</label>
40
  <frontend_type>select</frontend_type>
41
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
42
  <sort_order>20</sort_order>
54
  <show_in_store>1</show_in_store>
55
  </address_book>
56
  <orders translate="label">
57
+ <label>My Orders</label>
58
  <frontend_type>select</frontend_type>
59
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
60
  <sort_order>40</sort_order>
63
  <show_in_store>1</show_in_store>
64
  </orders>
65
  <billing_agreements translate="label">
66
+ <label>Billing Agreements</label>
67
  <frontend_type>select</frontend_type>
68
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
69
  <sort_order>50</sort_order>
81
  <show_in_store>1</show_in_store>
82
  </recurring_profiles>
83
  <reviews translate="label">
84
+ <label>My Product Reviews</label>
85
  <frontend_type>select</frontend_type>
86
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
87
  <sort_order>70</sort_order>
90
  <show_in_store>1</show_in_store>
91
  </reviews>
92
  <tags translate="label">
93
+ <label>My Tags</label>
94
  <frontend_type>select</frontend_type>
95
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
96
  <sort_order>80</sort_order>
99
  <show_in_store>1</show_in_store>
100
  </tags>
101
  <wishlist translate="label">
102
+ <label>My Wishlist</label>
103
  <frontend_type>select</frontend_type>
104
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
105
  <sort_order>90</sort_order>
108
  <show_in_store>1</show_in_store>
109
  </wishlist>
110
  <oauth_customer_tokens translate="label">
111
+ <label>My Applications</label>
112
  <frontend_type>select</frontend_type>
113
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
114
  <sort_order>100</sort_order>
117
  <show_in_store>1</show_in_store>
118
  </oauth_customer_tokens>
119
  <newsletter translate="label">
120
+ <label>Newsletter Subscriptions</label>
121
  <frontend_type>select</frontend_type>
122
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
123
  <sort_order>110</sort_order>
126
  <show_in_store>1</show_in_store>
127
  </newsletter>
128
  <downloadable_products translate="label">
129
+ <label>My Downloadable Products</label>
130
  <frontend_type>select</frontend_type>
131
  <source_model>adminhtml/system_config_source_enabledisable</source_model>
132
  <sort_order>120</sort_order>
135
  <show_in_store>1</show_in_store>
136
  </downloadable_products>
137
  </fields>
138
+ </display>
139
+ <rename translate="label">
140
+ <label>Rename Links</label>
141
+ <frontend_type>text</frontend_type>
142
+ <sort_order>20</sort_order>
143
+ <show_in_default>1</show_in_default>
144
+ <show_in_website>1</show_in_website>
145
+ <show_in_store>1</show_in_store>
146
+ <fields>
147
+ <account translate="label">
148
+ <label>Account Dashboard</label>
149
+ <frontend_type>text</frontend_type>
150
+ <sort_order>10</sort_order>
151
+ <show_in_default>1</show_in_default>
152
+ <show_in_website>1</show_in_website>
153
+ <show_in_store>1</show_in_store>
154
+ </account>
155
+ <account_edit translate="label">
156
+ <label>Account Information</label>
157
+ <frontend_type>text</frontend_type>
158
+ <sort_order>20</sort_order>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>1</show_in_store>
162
+ </account_edit>
163
+ <address_book translate="label">
164
+ <label>Address Book</label>
165
+ <frontend_type>text</frontend_type>
166
+ <sort_order>30</sort_order>
167
+ <show_in_default>1</show_in_default>
168
+ <show_in_website>1</show_in_website>
169
+ <show_in_store>1</show_in_store>
170
+ </address_book>
171
+ <orders translate="label">
172
+ <label>My Orders</label>
173
+ <frontend_type>text</frontend_type>
174
+ <sort_order>40</sort_order>
175
+ <show_in_default>1</show_in_default>
176
+ <show_in_website>1</show_in_website>
177
+ <show_in_store>1</show_in_store>
178
+ </orders>
179
+ <billing_agreements translate="label">
180
+ <label>Billing Agreements</label>
181
+ <frontend_type>text</frontend_type>
182
+ <sort_order>50</sort_order>
183
+ <show_in_default>1</show_in_default>
184
+ <show_in_website>1</show_in_website>
185
+ <show_in_store>1</show_in_store>
186
+ </billing_agreements>
187
+ <recurring_profiles translate="label">
188
+ <label>Recurring Profiles</label>
189
+ <frontend_type>text</frontend_type>
190
+ <sort_order>60</sort_order>
191
+ <show_in_default>1</show_in_default>
192
+ <show_in_website>1</show_in_website>
193
+ <show_in_store>1</show_in_store>
194
+ </recurring_profiles>
195
+ <reviews translate="label">
196
+ <label>My Product Reviews</label>
197
+ <frontend_type>text</frontend_type>
198
+ <sort_order>70</sort_order>
199
+ <show_in_default>1</show_in_default>
200
+ <show_in_website>1</show_in_website>
201
+ <show_in_store>1</show_in_store>
202
+ </reviews>
203
+ <tags translate="label">
204
+ <label>My Tags</label>
205
+ <frontend_type>text</frontend_type>
206
+ <sort_order>80</sort_order>
207
+ <show_in_default>1</show_in_default>
208
+ <show_in_website>1</show_in_website>
209
+ <show_in_store>1</show_in_store>
210
+ </tags>
211
+ <wishlist translate="label">
212
+ <label>My Wishlist</label>
213
+ <frontend_type>text</frontend_type>
214
+ <sort_order>90</sort_order>
215
+ <show_in_default>1</show_in_default>
216
+ <show_in_website>1</show_in_website>
217
+ <show_in_store>1</show_in_store>
218
+ </wishlist>
219
+ <oauth_customer_tokens translate="label">
220
+ <label>My Applications</label>
221
+ <frontend_type>text</frontend_type>
222
+ <sort_order>100</sort_order>
223
+ <show_in_default>1</show_in_default>
224
+ <show_in_website>1</show_in_website>
225
+ <show_in_store>1</show_in_store>
226
+ </oauth_customer_tokens>
227
+ <newsletter translate="label">
228
+ <label>Newsletter Subscriptions</label>
229
+ <frontend_type>text</frontend_type>
230
+ <sort_order>110</sort_order>
231
+ <show_in_default>1</show_in_default>
232
+ <show_in_website>1</show_in_website>
233
+ <show_in_store>1</show_in_store>
234
+ </newsletter>
235
+ <downloadable_products translate="label">
236
+ <label>My Downloadable Products</label>
237
+ <frontend_type>text</frontend_type>
238
+ <sort_order>120</sort_order>
239
+ <show_in_default>1</show_in_default>
240
+ <show_in_website>1</show_in_website>
241
+ <show_in_store>1</show_in_store>
242
+ </downloadable_products>
243
+ </fields>
244
+ </rename>
245
  </groups>
246
  </customer_navigation>
247
  </sections>
app/design/frontend/base/default/layout/hetnieuweweb_customernavigation.xml CHANGED
@@ -1,8 +1,9 @@
1
  <?xml version="1.0" ?>
2
- <layout version="0.1.0">
3
  <customer_account>
4
- <reference name="customer_account_navigation">
5
  <action method="removeLinkByName" />
 
6
  </reference>
7
  </customer_account>
8
  </layout>
1
  <?xml version="1.0" ?>
2
+ <layout version="0.2.0">
3
  <customer_account>
4
+ <reference name="customer_account_navigation">
5
  <action method="removeLinkByName" />
6
+ <action method="renameLinkByName" />
7
  </reference>
8
  </customer_account>
9
  </layout>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>HetNieuweWeb_CustomerNavigation</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Manage customer dashboard navigation menu.</summary>
10
- <description>Manage customer dashboard navigation. Easily enable/disable links of customer dashboard menu in Magento backend.</description>
11
- <notes>Stable release of 'Manage Customer Navigation', version 0.1.0.</notes>
12
  <authors><author><name>Gerard de Visser</name><user>Gerard_de_V</user><email>gerarddevisser@gmail.com</email></author></authors>
13
- <date>2014-09-08</date>
14
- <time>11:49:57</time>
15
- <contents><target name="mageetc"><dir><dir name="modules"><file name="HetNieuweWeb_CustomerNavigation.xml" hash="f1a404ca632ad00a7a47442ef2527587"/></dir></dir></target><target name="magecommunity"><dir><dir name="HetNieuweWeb"><dir name="CustomerNavigation"><dir name="Block"><dir name="Customer"><dir name="Account"><file name="Navigation.php" hash="420f1a4e5abad77095e7465297e999d2"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="1a716d6550b0ed31fbd5a3aed150af38"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f14a49ac17637530cb6fa53f82abfb26"/><file name="config.xml" hash="041a2768bb7ac7ffdf8a154f55965ccb"/><file name="system.xml" hash="674ce9c1b23c4b84804af660d9f658b5"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="hetnieuweweb_customernavigation.xml" hash="0ed6433cea1398c7ea9066ea2ac96faf"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>HetNieuweWeb_CustomerNavigation</name>
4
+ <version>0.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Manage customer dashboard navigation menu.</summary>
10
+ <description>Manage customer dashboard navigation. Easily enable/disable and rename links of customer dashboard menu in Magento backend.</description>
11
+ <notes>Stable release of 'Manage Customer Navigation', version 0.2.0.</notes>
12
  <authors><author><name>Gerard de Visser</name><user>Gerard_de_V</user><email>gerarddevisser@gmail.com</email></author></authors>
13
+ <date>2014-09-29</date>
14
+ <time>15:04:26</time>
15
+ <contents><target name="mageetc"><dir><dir name="modules"><file name="HetNieuweWeb_CustomerNavigation.xml" hash="f1a404ca632ad00a7a47442ef2527587"/></dir></dir></target><target name="magecommunity"><dir><dir name="HetNieuweWeb"><dir name="CustomerNavigation"><dir name="Block"><dir name="Customer"><dir name="Account"><file name="Navigation.php" hash="8e2d6e65d6110ffc92f99ba47bae0460"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="1a716d6550b0ed31fbd5a3aed150af38"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f14a49ac17637530cb6fa53f82abfb26"/><file name="config.xml" hash="fcb8d7128d32a3704afa6586483f1548"/><file name="system.xml" hash="1668204389ee1cf1d800c828f3312c9e"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="hetnieuweweb_customernavigation.xml" hash="a64271b6066d222498330c1c93a8d978"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>