AdvertiseCommunity - Version 1.0.3

Version Notes

v1.0.3

Add a phone number.

Download this release

Release Info

Developer Michael Oxley
Extension AdvertiseCommunity
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

app/code/community/Advertise/Account/Model/Config.php CHANGED
@@ -26,8 +26,8 @@ class Advertise_Account_Model_Config extends Mage_Core_Model_Config_Data
26
  $id_path = 'advertise_settings/settings/id';
27
 
28
  $store_value = (!empty($this->_data['store_code'])) ? Mage::app()->getStore($this->_data['store_code'])->getConfig($id_path) : false;
29
- $website_value = (!empty($this->_data['website_code'])) ? Mage::app()->getWebsite($this->_data['website_code'])->getConfig($id_path) : false;
30
- $default_value = (string) Mage::getConfig()->getNode('default/' . $id_path);
31
 
32
  if ($store_value && $scope === 'stores' && $store_value !== $website_value && $store_value !== $default_value) {
33
  $form_values['id'] = $store_value;
26
  $id_path = 'advertise_settings/settings/id';
27
 
28
  $store_value = (!empty($this->_data['store_code'])) ? Mage::app()->getStore($this->_data['store_code'])->getConfig($id_path) : false;
29
+ $website_value = (!empty($this->_data['website_code'])) ? Mage::app()->getWebsite($this->_data['website_code'])->getConfig($id_path) : false;
30
+ $default_value = (string) Mage::getConfig()->getNode('default/' . $id_path);
31
 
32
  if ($store_value && $scope === 'stores' && $store_value !== $website_value && $store_value !== $default_value) {
33
  $form_values['id'] = $store_value;
app/code/community/Advertise/Account/etc/system.xml CHANGED
@@ -1,6 +1,9 @@
1
- <?xml version="1.0"?>
2
-
3
  <config>
 
 
 
 
4
  <tabs>
5
  <Advertise translate="label">
6
  <label>Advertise</label>
@@ -8,12 +11,13 @@
8
  </Advertise>
9
  </tabs>
10
 
 
11
  <sections>
12
  <advertise translate="label">
13
  <label>License</label>
14
  <tab>Advertise</tab>
15
  <frontend_type>text</frontend_type>
16
- <sort_order>999</sort_order>
17
  <show_in_default>1</show_in_default>
18
  <show_in_website>1</show_in_website>
19
  <show_in_store>1</show_in_store>
@@ -21,7 +25,7 @@
21
  <advertise translate="label">
22
  <label>Adverti.se License</label>
23
  <frontend_type>text</frontend_type>
24
- <sort_order>100</sort_order>
25
  <show_in_default>1</show_in_default>
26
  <show_in_website>1</show_in_website>
27
  <show_in_store>1</show_in_store>
@@ -76,7 +80,9 @@
76
  </advertise>
77
  </groups>
78
  </advertise>
79
- <advertise_settings translate="label" module="product">
 
 
80
  <class>separator-top</class>
81
  <label>Settings</label>
82
  <tab>Advertise</tab>
@@ -122,6 +128,88 @@
122
  <show_in_website>1</show_in_website>
123
  <show_in_store>1</show_in_store>
124
  </settings_email>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  </fields>
126
  </settings>
127
  </groups>
1
+ <?xml version="1.0" encoding="UTF-8"?>
 
2
  <config>
3
+ <!-- This Adverti.se tab is used by all Adverti.se extensions for config menu!
4
+ So if you change it then need to change in ALL extensions! -->
5
+
6
+ <!-- Top Level Tab -->
7
  <tabs>
8
  <Advertise translate="label">
9
  <label>Advertise</label>
11
  </Advertise>
12
  </tabs>
13
 
14
+ <!-- Sections under Adverti.se tab -->
15
  <sections>
16
  <advertise translate="label">
17
  <label>License</label>
18
  <tab>Advertise</tab>
19
  <frontend_type>text</frontend_type>
20
+ <sort_order>900</sort_order>
21
  <show_in_default>1</show_in_default>
22
  <show_in_website>1</show_in_website>
23
  <show_in_store>1</show_in_store>
25
  <advertise translate="label">
26
  <label>Adverti.se License</label>
27
  <frontend_type>text</frontend_type>
28
+ <sort_order>1</sort_order>
29
  <show_in_default>1</show_in_default>
30
  <show_in_website>1</show_in_website>
31
  <show_in_store>1</show_in_store>
80
  </advertise>
81
  </groups>
82
  </advertise>
83
+
84
+ <!-- This 'advertise_settings' node is for the general Adverti.se settings (e.g. email) and should be the same in all extensions -->
85
+ <advertise_settings translate="label">
86
  <class>separator-top</class>
87
  <label>Settings</label>
88
  <tab>Advertise</tab>
128
  <show_in_website>1</show_in_website>
129
  <show_in_store>1</show_in_store>
130
  </settings_email>
131
+
132
+ <!-- Use fb_application field for phone number for now -->
133
+ <!-- No need to specify backend_model for additional felds as call from settings_email save deals with all of them -->
134
+ <fb_application translate="label">
135
+ <label>Phone Number</label>
136
+ <frontend_type>text</frontend_type>
137
+ <sort_order>35</sort_order>
138
+ <show_in_default>1</show_in_default>
139
+ <show_in_website>1</show_in_website>
140
+ <show_in_store>1</show_in_store>
141
+ <comment>Please enter your full phone number including international code.</comment>
142
+ </fb_application>
143
+
144
+ <!-- Unused fields
145
+ <awords_id translate="label">
146
+ <label>Adwords Id</label>
147
+ <frontend_type>text</frontend_type>
148
+ <sort_order>40</sort_order>
149
+ <show_in_default>1</show_in_default>
150
+ <show_in_website>1</show_in_website>
151
+ <show_in_store>1</show_in_store>
152
+ </awords_id>
153
+
154
+ <product_feed translate="label">
155
+ <label>Product Feed URL</label>
156
+ <frontend_type>text</frontend_type>
157
+ <sort_order>50</sort_order>
158
+ <show_in_default>1</show_in_default>
159
+ <show_in_website>1</show_in_website>
160
+ <show_in_store>1</show_in_store>
161
+ </product_feed>
162
+
163
+ <timezone translate="label">
164
+ <label>Timezone</label>
165
+ <frontend_type>select</frontend_type>
166
+ <sort_order>60</sort_order>
167
+ <source_model>adminhtml/system_config_source_locale_timezone</source_model>
168
+ <show_in_default>1</show_in_default>
169
+ <show_in_website>1</show_in_website>
170
+ <show_in_store>1</show_in_store>
171
+ </timezone>
172
+
173
+ <language translate="label">
174
+ <label>Language</label>
175
+ <frontend_type>select</frontend_type>
176
+ <sort_order>70</sort_order>
177
+ <source_model>adminhtml/system_config_source_locale</source_model>
178
+ <show_in_default>1</show_in_default>
179
+ <show_in_website>1</show_in_website>
180
+ <show_in_store>1</show_in_store>
181
+ </language>
182
+
183
+ <country translate="label">
184
+ <label>Country</label>
185
+ <frontend_type>select</frontend_type>
186
+ <sort_order>80</sort_order>
187
+ <source_model>adminhtml/system_config_source_country</source_model>
188
+ <show_in_default>1</show_in_default>
189
+ <show_in_website>1</show_in_website>
190
+ <show_in_store>1</show_in_store>
191
+ </country>
192
+
193
+ <currency translate="label">
194
+ <label>Currency</label>
195
+ <frontend_type>select</frontend_type>
196
+ <sort_order>90</sort_order>
197
+ <source_model>adminhtml/system_config_source_currency</source_model>
198
+ <show_in_default>1</show_in_default>
199
+ <show_in_website>1</show_in_website>
200
+ <show_in_store>1</show_in_store>
201
+ </currency>
202
+
203
+ <twitter_account translate="label">
204
+ <label>Twitter Account</label>
205
+ <frontend_type>text</frontend_type>
206
+ <sort_order>100</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
+ </twitter_account>
211
+ -->
212
+
213
  </fields>
214
  </settings>
215
  </groups>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AdvertiseCommunity</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -17,13 +17,13 @@
17
  &#xD;
18
  &lt;p&gt;Learn more about how Adverti.se can help your magento store at &lt;a href="http://www.adverti.se"&gt;Adverti.se&lt;/a&gt;&#xD;
19
  &lt;/p&gt;</description>
20
- <notes>v1.0.2&#xD;
21
  &#xD;
22
- This version creates a working dir var/advertisedata that is used for some import and export functions.</notes>
23
  <authors><author><name>Michael Oxley</name><user>advertise</user><email>mike@adverti.se</email></author></authors>
24
- <date>2012-08-13</date>
25
- <time>19:28:46</time>
26
- <contents><target name="mage"><dir name="lib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="Advertisetemplate.php" hash="93d8c1f2ace06bd46e68857b9b98ec52"/><file name="Advertiselicense.php" hash="26d50ff2d280db94e4d0eb7187376880"/></dir></dir></dir></dir></dir><dir name="app"><dir name="etc"><dir name="modules"><file name="Advertise_Account.xml" hash="2bd58af0a4999bc2fe80a1d6e8a07d57"/></dir></dir><dir name="code"><dir name="community"><dir name="Advertise"><dir name="Account"><dir name="Helper"><file name="Data.php" hash="9b22d8f7156cd9f694774d7e29e2b5a8"/></dir><dir name="Model"><file name="Account.php" hash="605e33ef9c956852cd9f0357cb10776c"/><dir name="Config"><dir name="Source"><file name="Onoff.php" hash="684e42d40da3b47053bf345f201df140"/></dir></dir><file name="Config.php" hash="d1b199bba390a6ef5031d7d2707f7f88"/><file name="MyAccountModel.php" hash="d7abbf976d96028ece0331db2ba40559"/><file name="Settings.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="controllers"><file name="IndexController.php" hash="50eea849547a732c20462da19029e432"/><file name="LicenseController.php" hash="b83f323609fecefa4ff6dbab911468ce"/><file name="WebserviceController.php" hash="675d33aa04d1c01c34fdea086d73ce85"/></dir><dir name="etc"><file name="config.xml" hash="1008af4062018449215a14f21dc1235f"/><file name="system.xml" hash="a5aeb08a6f37a069153ebfd638dc8080"/></dir><dir name="sql"><dir name="advertise_setup"><file name="mysql4-install-4.0.0.php" hash="b4535b5068d6b72999c94e91d487bc62"/><file name="mysql4-install-5.0.0.php" hash="b4535b5068d6b72999c94e91d487bc62"/></dir><dir name="setup"><file name="mysql4-install-0.1.0.php" hash="452925d5182994846dbe3b9518db84d8"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
29
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AdvertiseCommunity</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
17
  &#xD;
18
  &lt;p&gt;Learn more about how Adverti.se can help your magento store at &lt;a href="http://www.adverti.se"&gt;Adverti.se&lt;/a&gt;&#xD;
19
  &lt;/p&gt;</description>
20
+ <notes>v1.0.3&#xD;
21
  &#xD;
22
+ Add a phone number.</notes>
23
  <authors><author><name>Michael Oxley</name><user>advertise</user><email>mike@adverti.se</email></author></authors>
24
+ <date>2012-09-26</date>
25
+ <time>13:53:45</time>
26
+ <contents><target name="mage"><dir name="lib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="Advertisetemplate.php" hash="93d8c1f2ace06bd46e68857b9b98ec52"/><file name="Advertiselicense.php" hash="26d50ff2d280db94e4d0eb7187376880"/></dir></dir></dir></dir></dir><dir name="app"><dir name="etc"><dir name="modules"><file name="Advertise_Account.xml" hash="2bd58af0a4999bc2fe80a1d6e8a07d57"/></dir></dir><dir name="code"><dir name="community"><dir name="Advertise"><dir name="Account"><dir name="Helper"><file name="Data.php" hash="9b22d8f7156cd9f694774d7e29e2b5a8"/></dir><dir name="Model"><file name="Account.php" hash="605e33ef9c956852cd9f0357cb10776c"/><dir name="Config"><dir name="Source"><file name="Onoff.php" hash="684e42d40da3b47053bf345f201df140"/></dir></dir><file name="Config.php" hash="ee470d4c5a46a0221456b31b85c7473c"/><file name="MyAccountModel.php" hash="d7abbf976d96028ece0331db2ba40559"/><file name="Settings.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="controllers"><file name="IndexController.php" hash="50eea849547a732c20462da19029e432"/><file name="LicenseController.php" hash="b83f323609fecefa4ff6dbab911468ce"/><file name="WebserviceController.php" hash="675d33aa04d1c01c34fdea086d73ce85"/></dir><dir name="etc"><file name="config.xml" hash="1008af4062018449215a14f21dc1235f"/><file name="system.xml" hash="9f8480290a07f87bb568e4b0db33a330"/></dir><dir name="sql"><dir name="advertise_setup"><file name="mysql4-install-4.0.0.php" hash="b4535b5068d6b72999c94e91d487bc62"/><file name="mysql4-install-5.0.0.php" hash="b4535b5068d6b72999c94e91d487bc62"/></dir><dir name="setup"><file name="mysql4-install-0.1.0.php" hash="452925d5182994846dbe3b9518db84d8"/></dir></dir></dir></dir></dir></dir></dir><dir name="var"><dir name="advertisedata"><file name="empty.txt" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
29
  </package>
var/advertisedata/empty.txt ADDED
File without changes