4f4e331f92f560de38f6bc2b5501d8cb - Version 1.0.3.2

Version Notes

- now there is choose show shops as map or dropdown.

Download this release

Release Info

Developer Roman Barbotkin
Extension 4f4e331f92f560de38f6bc2b5501d8cb
Version 1.0.3.2
Comparing to
See all releases


Code changes from version 1.0.3.1 to 1.0.3.2

app/code/local/Send24/Shipping/Model/Map.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Send24_Shipping_Model_Map
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array(
9
+ 'value' => 'map',
10
+ 'label' => 'Map'
11
+ ),
12
+ array(
13
+ 'value' => 'dropdown',
14
+ 'label' => 'Dropdown'
15
+ ),
16
+ );
17
+ }
18
+
19
+
20
+ }
app/code/local/Send24/Shipping/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Send24_Shipping>
5
- <module>1.0.3</module>
6
  </Send24_Shipping>
7
  </modules>
8
 
@@ -103,7 +103,7 @@
103
  <startexpress_time_select>08,00,00</startexpress_time_select>
104
  <endexpress_time_select>18,00,00</endexpress_time_select>
105
  <select_insurance>0</select_insurance>
106
-
107
  <sort_order>10</sort_order>
108
 
109
  </send24_shipping>
2
  <config>
3
  <modules>
4
  <Send24_Shipping>
5
+ <module>1.0.3.2</module>
6
  </Send24_Shipping>
7
  </modules>
8
 
103
  <startexpress_time_select>08,00,00</startexpress_time_select>
104
  <endexpress_time_select>18,00,00</endexpress_time_select>
105
  <select_insurance>0</select_insurance>
106
+ <show_shops>map</show_shops>
107
  <sort_order>10</sort_order>
108
 
109
  </send24_shipping>
app/code/local/Send24/Shipping/etc/system.xml CHANGED
@@ -148,6 +148,16 @@
148
  <show_in_website>1</show_in_website>
149
  <show_in_store>1</show_in_store>
150
  </select_insurance> -->
 
 
 
 
 
 
 
 
 
 
151
 
152
  <enable_international translate="label">
153
  <label>International</label>
148
  <show_in_website>1</show_in_website>
149
  <show_in_store>1</show_in_store>
150
  </select_insurance> -->
151
+ <show_shops translate="label">
152
+ <label>Show shops as</label>
153
+ <comment>Please choose show shops as map or dropdown.</comment>
154
+ <frontend_type>select</frontend_type>
155
+ <source_model>send24_shipping/map</source_model>
156
+ <sort_order>1120</sort_order>
157
+ <show_in_default>1</show_in_default>
158
+ <show_in_website>1</show_in_website>
159
+ <show_in_store>1</show_in_store>
160
+ </show_shops>
161
 
162
  <enable_international translate="label">
163
  <label>International</label>
app/design/frontend/base/default/template/pickup/send24_pickup.phtml CHANGED
@@ -24,6 +24,8 @@ if($data['country'] == 'DK'){
24
  // Keys Api.
25
  $send24_consumer_key = Mage::getStoreConfig('carriers/send24_shipping/send24_consumer_key');
26
  $send24_consumer_secret = Mage::getStoreConfig('carriers/send24_shipping/send24_consumer_secret');
 
 
27
 
28
  $val = json_encode($data);
29
  // Get pickups list.
@@ -90,6 +92,7 @@ if(!empty($response)){
90
 
91
  <?php
92
  $html = array();
 
93
  // Map.
94
  $html = '<br><div id="send24_map_info">';
95
  $html .= 'Selected shop: <b id="shop_selected">'.$output['0']['post_title'].'</b> <p>(<a id="send24_map" href="#open_map">choose</a>)</p>';
@@ -239,3 +242,31 @@ echo $html;
239
 
240
  window.loadJsFile("https://maps.googleapis.com/maps/api/js?signed_in=true&libraries=places&callback=initMap");
241
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  // Keys Api.
25
  $send24_consumer_key = Mage::getStoreConfig('carriers/send24_shipping/send24_consumer_key');
26
  $send24_consumer_secret = Mage::getStoreConfig('carriers/send24_shipping/send24_consumer_secret');
27
+ // Show shops as.
28
+ $show_shops = Mage::getStoreConfig('carriers/send24_shipping/show_shops');
29
 
30
  $val = json_encode($data);
31
  // Get pickups list.
92
 
93
  <?php
94
  $html = array();
95
+ if($show_shops == 'map'){
96
  // Map.
97
  $html = '<br><div id="send24_map_info">';
98
  $html .= 'Selected shop: <b id="shop_selected">'.$output['0']['post_title'].'</b> <p>(<a id="send24_map" href="#open_map">choose</a>)</p>';
242
 
243
  window.loadJsFile("https://maps.googleapis.com/maps/api/js?signed_in=true&libraries=places&callback=initMap");
244
  </script>
245
+
246
+ <?php
247
+ // DropDown.
248
+ }else{
249
+ // Map.
250
+ $html = '<br><div id="send24_map_info">';
251
+ $html .= 'Selected shop: <select class="selected_shop_dropdown" style="width: 150px;">';
252
+ // $shops = json_decode($output);
253
+ foreach ($output as $key => $value) {
254
+ $html .= '<option value="'.$value['ID'].'">'.$value['post_title'].'</option>';
255
+ }
256
+ $html .= '</select>';
257
+ $html .= '</div>';
258
+ echo $html;
259
+ }
260
+ ?>
261
+ <script type="text/javascript">
262
+ jQuery( "#s_method_send24_shipping_send24" ).live( "click", function() {
263
+ jQuery('#send24_map_info').show("slow");
264
+ });
265
+
266
+ document.cookie = 'selected_shop_id='+default_shop_id;
267
+ jQuery( ".selected_shop_dropdown" ).live( "click", function() {
268
+ var selected_shop_id = jQuery(this).val();
269
+ document.cookie = 'selected_shop_id='+selected_shop_id;
270
+ });
271
+
272
+ </script>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>4f4e331f92f560de38f6bc2b5501d8cb</name>
4
- <version>1.0.3.1</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
@@ -30,11 +30,11 @@ REQUIRES&#xD;
30
  This plugin requires an account on Send24. You will need to enter your api key in this shipping module to activate it. The account is free of charge and is used to administrate your shipments.&#xD;
31
  Register your free account on Send24.&#xD;
32
  </description>
33
- <notes>- Fixed map. Now map works on all sites without the key.</notes>
34
  <authors><author><name>Roman Barbotkin</name><user>Barbotkin</user><email>barbotkin@bk.ru</email></author></authors>
35
- <date>2016-03-07</date>
36
- <time>15:32:43</time>
37
- <contents><target name="magelocal"><dir name="Send24"><dir name="Shipping"><dir name="Block"><file name="Pickup.php" hash="f177e834828df1e1815f2948550fa990"/></dir><dir name="Model"><file name="Carrier.php" hash="d2799f993f6f49e0411dd0905ea6aeca"/><file name="Points.php" hash="d8ada030c8d353f963693547ad71b03b"/></dir><dir name="controllers"><file name="AjaxController.php" hash="8ca3c223b28bea631656dfb9729dca9f"/></dir><dir name="etc"><file name="config.xml" hash="8135fa7ef1ddfd28ded90265ea033610"/><file name="system.xml" hash="970b784028ce5cf28e32ee776db27165"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Send24_Shipping.xml" hash="c365adcf43a601147514106e32ef524e"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="pickup"><dir name="checkout"><dir name="onepage"><dir name="shipping_method"><file name="send24-available.phtml" hash="702f6e436a80a6a83a30ffd005fd5250"/></dir></dir></dir><file name="send24_pickup.phtml" hash="0586edb793c8f56daed21f409ccb933e"/></dir></dir><dir name="layout"><file name="send24_pickup.xml" hash="c6ad18a12688a27737aea4ab17b9f1bd"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="send24_order_tamplate.xml" hash="28484d6562bca02f3202dbd3ea7664e6"/></dir><dir name="template"><dir name="send24"><dir name="sales"><dir name="order"><dir name="view"><file name="custom.phtml" hash="5348e18bd217afe85a6d7000da4f627e"/><file name="info.phtml" hash="7704a122a7741323d32ce1bb3ebe56a1"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="send24"><file name="jquery-1.6.4.min.js" hash="9118381924c51c89d9414a311ec9c97f"/><file name="noconflict.js" hash="3179f2255b046d5f2e9a71e365287bef"/><file name="popup.css" hash="34c9994bc7c4508709f612c4a217f51f"/></dir></dir></target></contents>
38
  <compatible/>
39
  <dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php></required></dependencies>
40
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>4f4e331f92f560de38f6bc2b5501d8cb</name>
4
+ <version>1.0.3.2</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
30
  This plugin requires an account on Send24. You will need to enter your api key in this shipping module to activate it. The account is free of charge and is used to administrate your shipments.&#xD;
31
  Register your free account on Send24.&#xD;
32
  </description>
33
+ <notes>- now there is choose show shops as map or dropdown.</notes>
34
  <authors><author><name>Roman Barbotkin</name><user>Barbotkin</user><email>barbotkin@bk.ru</email></author></authors>
35
+ <date>2016-03-08</date>
36
+ <time>12:21:25</time>
37
+ <contents><target name="magelocal"><dir name="Send24"><dir name="Shipping"><dir name="Block"><file name="Pickup.php" hash="f177e834828df1e1815f2948550fa990"/></dir><dir name="Model"><file name="Carrier.php" hash="d2799f993f6f49e0411dd0905ea6aeca"/><file name="Map.php" hash="82bb37a418fb949ea0b5031397cb86c3"/><file name="Points.php" hash="d8ada030c8d353f963693547ad71b03b"/></dir><dir name="controllers"><file name="AjaxController.php" hash="8ca3c223b28bea631656dfb9729dca9f"/></dir><dir name="etc"><file name="config.xml" hash="8d6ee69362e73da90f2facab4e43cbc6"/><file name="system.xml" hash="70dbd5a224e9a46dfc793ff5ac8b4248"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Send24_Shipping.xml" hash="c365adcf43a601147514106e32ef524e"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="pickup"><dir name="checkout"><dir name="onepage"><dir name="shipping_method"><file name="send24-available.phtml" hash="702f6e436a80a6a83a30ffd005fd5250"/></dir></dir></dir><file name="send24_pickup.phtml" hash="756ecbabc325a8e66073e7d78442b1fa"/></dir></dir><dir name="layout"><file name="send24_pickup.xml" hash="c6ad18a12688a27737aea4ab17b9f1bd"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="send24_order_tamplate.xml" hash="28484d6562bca02f3202dbd3ea7664e6"/></dir><dir name="template"><dir name="send24"><dir name="sales"><dir name="order"><dir name="view"><file name="custom.phtml" hash="5348e18bd217afe85a6d7000da4f627e"/><file name="info.phtml" hash="7704a122a7741323d32ce1bb3ebe56a1"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="send24"><file name="jquery-1.6.4.min.js" hash="9118381924c51c89d9414a311ec9c97f"/><file name="noconflict.js" hash="3179f2255b046d5f2e9a71e365287bef"/><file name="popup.css" hash="34c9994bc7c4508709f612c4a217f51f"/></dir></dir></target></contents>
38
  <compatible/>
39
  <dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php></required></dependencies>
40
  </package>