Version Notes
Fix SkyNet service list save issue
Download this release
Release Info
Developer | Moe Ghashim |
Extension | Shopgo_SkynetShipping |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- app/code/community/Shopgo/SkynetShipping/Model/Service.php +5 -6
- app/code/community/Shopgo/SkynetShipping/etc/config.xml +1 -1
- app/design/adminhtml/default/default/layout/shopgo/skynet_shipping.xml +0 -34
- app/design/adminhtml/default/default/template/shopgo/skynet_shipping/sales/order/shipment/create/form/shipment.phtml +0 -48
- app/design/adminhtml/default/default/template/shopgo/skynet_shipping/system/config/service_list_button.phtml +0 -61
- app/design/adminhtml/default/default/template/shopgo/skynet_shipping/system/config/verify_account_button.phtml +0 -47
- app/etc/modules/Shopgo_SkynetShipping.xml +0 -12
- package.xml +28 -10
app/code/community/Shopgo/SkynetShipping/Model/Service.php
CHANGED
@@ -72,14 +72,13 @@ class Shopgo_SkynetShipping_Model_Service extends Mage_Core_Model_Abstract
|
|
72 |
|
73 |
private function _saveServiceData($data)
|
74 |
{
|
75 |
-
Mage::getResourceModel('skynetshipping/service')
|
76 |
-
|
77 |
-
$model = Mage::getModel('skynetshipping/service');
|
78 |
|
79 |
foreach ($data as $i) {
|
80 |
-
|
|
|
|
|
81 |
}
|
82 |
-
|
83 |
-
$model->save();
|
84 |
}
|
85 |
}
|
72 |
|
73 |
private function _saveServiceData($data)
|
74 |
{
|
75 |
+
Mage::getResourceModel('skynetshipping/service')
|
76 |
+
->truncate();
|
|
|
77 |
|
78 |
foreach ($data as $i) {
|
79 |
+
Mage::getModel('skynetshipping/service')
|
80 |
+
->setService($i)
|
81 |
+
->save();
|
82 |
}
|
|
|
|
|
83 |
}
|
84 |
}
|
app/code/community/Shopgo/SkynetShipping/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Shopgo_SkynetShipping>
|
5 |
-
<version>1.0.
|
6 |
</Shopgo_SkynetShipping>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Shopgo_SkynetShipping>
|
5 |
+
<version>1.0.8</version>
|
6 |
</Shopgo_SkynetShipping>
|
7 |
</modules>
|
8 |
<global>
|
app/design/adminhtml/default/default/layout/shopgo/skynet_shipping.xml
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<adminhtml_sales_order_shipment_new>
|
4 |
-
<reference name="head">
|
5 |
-
<action method="addCss" ifconfig="carriers/skynet/shipping_service">
|
6 |
-
<name>shopgo/skynet_shipping/sales/order/shipment/create/form/css/main.css</name>
|
7 |
-
<adv_ifconfig>
|
8 |
-
<required_depends>carriers/skynet/active</required_depends>
|
9 |
-
<depends_check>1</depends_check>
|
10 |
-
<custom_rules>
|
11 |
-
<check_used_method>skynet</check_used_method>
|
12 |
-
</custom_rules>
|
13 |
-
</adv_ifconfig>
|
14 |
-
</action>
|
15 |
-
<action method="addCss" ifconfig="carriers/skynet/shipping_service">
|
16 |
-
<name>shopgo/skynet_shipping/sales/order/shipment/create/form/css/shipment.css</name>
|
17 |
-
<adv_ifconfig>
|
18 |
-
<required_depends>carriers/skynet/active</required_depends>
|
19 |
-
<depends_check>1</depends_check>
|
20 |
-
<custom_rules>
|
21 |
-
<check_used_method>skynet</check_used_method>
|
22 |
-
</custom_rules>
|
23 |
-
</adv_ifconfig>
|
24 |
-
</action>
|
25 |
-
</reference>
|
26 |
-
<reference name="form">
|
27 |
-
<block
|
28 |
-
type="skynetshipping/adminhtml_sales_order_shipment_create_form_shipment"
|
29 |
-
name="skynet_shipment"
|
30 |
-
template="shopgo/skynet_shipping/sales/order/shipment/create/form/shipment.phtml"
|
31 |
-
/>
|
32 |
-
</reference>
|
33 |
-
</adminhtml_sales_order_shipment_new>
|
34 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/shopgo/skynet_shipping/sales/order/shipment/create/form/shipment.phtml
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<?php if ($this->isEnabled()): ?>
|
2 |
-
<?php $formData = $this->getFormData() ?>
|
3 |
-
<div class="entry-edit">
|
4 |
-
<div class="entry-edit-head">
|
5 |
-
<h4 class="icon-head head-shopgo-skynet-shipment"><?php echo Mage::helper('sales')->__('SkyNet Shipment Create Form') ?></h4>
|
6 |
-
<div class="clear"></div>
|
7 |
-
</div>
|
8 |
-
<div id="shopgo_skynet_shipment_container" class="shopgo-skynet-container-table">
|
9 |
-
<fieldset>
|
10 |
-
<div class="row">
|
11 |
-
<div><strong><?php echo $this->__('Shipment Details') ?></strong></div>
|
12 |
-
<div class="fieldset shipment-details">
|
13 |
-
<div class="box-left">
|
14 |
-
<table id="shopgo_skynet_shipment_details_table_left" cellpadding="0" cellspacing="0">
|
15 |
-
<tbody>
|
16 |
-
<tr class="type">
|
17 |
-
<td class="label"><?php echo $this->__('Type of Shipment') ?></td>
|
18 |
-
<td class="field">
|
19 |
-
<select name="shopgo[skynet][shipment][type]">
|
20 |
-
<?php $shipmentType = $formData['type_of_shipment'] ?>
|
21 |
-
<?php foreach ($this->getShipmentTypeOptions() as $option): ?>
|
22 |
-
<option value="<?php echo $option['value'] ?>"<?php if ($shipmentType == $option['value']): ?> selected<?php endif ?>><?php echo $option['label'] ?></option>
|
23 |
-
<?php endforeach ?>
|
24 |
-
</select>
|
25 |
-
</td>
|
26 |
-
</tr>
|
27 |
-
</tbody>
|
28 |
-
</table>
|
29 |
-
</div>
|
30 |
-
<div class="box-right">
|
31 |
-
<table id="shopgo_skynet_shipment_details_table_right" cellpadding="0" cellspacing="0">
|
32 |
-
<tbody>
|
33 |
-
<tr class="consignor-ref">
|
34 |
-
<td class="label"><?php echo $this->__('Consignor Reference') ?></td>
|
35 |
-
<td class="field">
|
36 |
-
<input type="text" class="input-text" name="shopgo[skynet][shipment][consignor_ref]" value="<?php echo $this->getFormFieldData('consignor_ref', $formData['consignor_ref']) ?>" />
|
37 |
-
</td>
|
38 |
-
</tr>
|
39 |
-
</tbody>
|
40 |
-
</table>
|
41 |
-
</div>
|
42 |
-
<div class="clear"></div>
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
</fieldset>
|
46 |
-
</div>
|
47 |
-
</div>
|
48 |
-
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/shopgo/skynet_shipping/system/config/service_list_button.phtml
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
<?php echo $this->getButtonHtml() ?>
|
2 |
-
<script type="text/javascript">//<![CDATA[
|
3 |
-
if (typeof shopgo == 'undefined') {
|
4 |
-
var shopgo = new Object();
|
5 |
-
}
|
6 |
-
if (typeof shopgo.skynetShipping == 'undefined') {
|
7 |
-
shopgo.skynetShipping = new Object();
|
8 |
-
}
|
9 |
-
|
10 |
-
shopgo.skynetShipping.serviceListButton = {
|
11 |
-
usernameChanged: 0,
|
12 |
-
passwordChanged: 0,
|
13 |
-
elmClassPrefix: 'carriers_skynet_',
|
14 |
-
getList: function() {
|
15 |
-
var _params = {
|
16 |
-
username: $(this.elmClassPrefix + 'username').value,
|
17 |
-
password: $(this.elmClassPrefix + 'password').value,
|
18 |
-
station_code: $(this.elmClassPrefix + 'station_code').value,
|
19 |
-
consignor_account: $(this.elmClassPrefix + 'consignor_account').value,
|
20 |
-
username_changed: this.usernameChanged,
|
21 |
-
password_changed: this.passwordChanged
|
22 |
-
};
|
23 |
-
|
24 |
-
new Ajax.Request('<?php echo $this->getAjaxActionUrl() ?>', {
|
25 |
-
parameters: _params,
|
26 |
-
onSuccess: function(transport) {
|
27 |
-
if (transport.responseText) {
|
28 |
-
var response = transport.responseText.evalJSON(true);
|
29 |
-
|
30 |
-
if (response.status) {
|
31 |
-
var listElm = $(shopgo.skynetShipping.serviceListButton.elmClassPrefix + 'service');
|
32 |
-
|
33 |
-
listElm.select('option').invoke('remove');
|
34 |
-
|
35 |
-
response.list.forEach(function(element, index, array) {
|
36 |
-
listElm.insert(
|
37 |
-
new Element('option', {value: element.value}).update(element.label)
|
38 |
-
);
|
39 |
-
});
|
40 |
-
}
|
41 |
-
|
42 |
-
alert(response.description);
|
43 |
-
}
|
44 |
-
}
|
45 |
-
});
|
46 |
-
}
|
47 |
-
};
|
48 |
-
|
49 |
-
document.observe("dom:loaded", function() {
|
50 |
-
$(shopgo.skynetShipping.serviceListButton.elmClassPrefix + 'username').observe(
|
51 |
-
'change', function(event) {
|
52 |
-
shopgo.skynetShipping.serviceListButton.usernameChanged = 1;
|
53 |
-
}
|
54 |
-
);
|
55 |
-
$(shopgo.skynetShipping.serviceListButton.elmClassPrefix + 'password').observe(
|
56 |
-
'change', function(event) {
|
57 |
-
shopgo.skynetShipping.serviceListButton.passwordChanged = 1;
|
58 |
-
}
|
59 |
-
);
|
60 |
-
});
|
61 |
-
//]]></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/shopgo/skynet_shipping/system/config/verify_account_button.phtml
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php echo $this->getButtonHtml() ?>
|
2 |
-
<script type="text/javascript">//<![CDATA[
|
3 |
-
if (typeof shopgo == 'undefined') {
|
4 |
-
var shopgo = new Object();
|
5 |
-
}
|
6 |
-
if (typeof shopgo.skynetShipping == 'undefined') {
|
7 |
-
shopgo.skynetShipping = new Object();
|
8 |
-
}
|
9 |
-
|
10 |
-
shopgo.skynetShipping.verifyAccountButton = {
|
11 |
-
usernameChanged: 0,
|
12 |
-
passwordChanged: 0,
|
13 |
-
elmClassPrefix: 'carriers_skynet_',
|
14 |
-
verifyAccount: function() {
|
15 |
-
var _params = {
|
16 |
-
username: $(this.elmClassPrefix + 'username').value,
|
17 |
-
password: $(this.elmClassPrefix + 'password').value,
|
18 |
-
station_code: $(this.elmClassPrefix + 'station_code').value,
|
19 |
-
consignor_account: $(this.elmClassPrefix + 'consignor_account').value,
|
20 |
-
username_changed: this.usernameChanged,
|
21 |
-
password_changed: this.passwordChanged
|
22 |
-
};
|
23 |
-
new Ajax.Request('<?php echo $this->getAjaxVerifyAccountUrl() ?>', {
|
24 |
-
parameters: _params,
|
25 |
-
onSuccess: function(transport) {
|
26 |
-
if (transport.responseText) {
|
27 |
-
var response = transport.responseText.evalJSON(true);
|
28 |
-
alert(response.description);
|
29 |
-
}
|
30 |
-
}
|
31 |
-
});
|
32 |
-
}
|
33 |
-
};
|
34 |
-
|
35 |
-
document.observe("dom:loaded", function() {
|
36 |
-
$(shopgo.skynetShipping.verifyAccountButton.elmClassPrefix + 'username').observe(
|
37 |
-
'change', function(event) {
|
38 |
-
shopgo.skynetShipping.verifyAccountButton.usernameChanged = 1;
|
39 |
-
}
|
40 |
-
);
|
41 |
-
$(shopgo.skynetShipping.verifyAccountButton.elmClassPrefix + 'password').observe(
|
42 |
-
'change', function(event) {
|
43 |
-
shopgo.skynetShipping.verifyAccountButton.passwordChanged = 1;
|
44 |
-
}
|
45 |
-
);
|
46 |
-
});
|
47 |
-
//]]></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Shopgo_SkynetShipping.xml
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Shopgo_SkynetShipping>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
<depends>
|
8 |
-
<Shopgo_ShippingCore/>
|
9 |
-
</depends>
|
10 |
-
</Shopgo_SkynetShipping>
|
11 |
-
</modules>
|
12 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,21 +1,39 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shopgo_SkynetShipping</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>SkyNet Worldwide Express allows to do SkyNet rate calculation and shipment creation easily inside Magento.</summary>
|
10 |
-
<description><p>SkyNet Worldwide Express is a
|
11 |
-
<
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
<authors><author><name>ShopGo</name><user>ShopGo</user><email>support@shopgo.me</email></author></authors>
|
16 |
-
<date>
|
17 |
-
<time>
|
18 |
-
<contents><target name="magecommunity"><dir name="Shopgo"><dir name="SkynetShipping"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Shipment"><dir name="Create"><dir name="Form"><file name="Abstract.php" hash="e8799fc3361537948eacce935043bf14"/><file name="Shipment.php" hash="fb84f878fde877056864f5280644a216"/></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="ServiceListButton.php" hash="e5d0702c85016561e3ea4af38ba5f9fb"/><file name="VerifyAccountButton.php" hash="d7c07c1fe8d3eb96c76bd9d1c531cd8f"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="3d35a227b6bfeecc86dee03f756f7f58"/></dir><dir name="Model"><dir name="Carrier"><file name="Skynet.php" hash="ebf2f358f8170d3d174f6119fdc107c1"/></dir><dir name="Resource"><dir name="Service"><file name="Collection.php" hash="b63e98f9171aaa09de46e08746803e9a"/></dir><file name="Service.php" hash="6c91083cfefc36f51fa3feb7d3675fd7"/></dir><file name="Service.php" hash="
|
19 |
<compatible/>
|
20 |
-
<dependencies><required><php><min>5.3.0</min><max>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shopgo_SkynetShipping</name>
|
4 |
+
<version>1.0.8</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>SkyNet Worldwide Express allows to do SkyNet rate calculation and shipment creation easily inside Magento.</summary>
|
10 |
+
<description><p>SkyNet Worldwide Express is a courier company with a network that stretches across 7 continents, providing the Global business community with fast, reliable and secure Express delivery services to over 209 countries and territories Worldwide.</p>
|
11 |
+
<h3>How does it work?</h3>
|
12 |
+
<p>This module integrates Magento with SkyNet Worldwide Express API, making it easier for customers to calculate SkyNet rates on Magento websites (e.g. Checkout page), and more automated.<br />
|
13 |
+
It also makes it easier for store owners to ship placed orders via SkyNet.</p>
|
14 |
+
<h3>Features</h3>
|
15 |
+
<ul>
|
16 |
+
<li>SkyNet rates calculator.</li>
|
17 |
+
<li>SkyNet shipments creation.</li>
|
18 |
+
</ul>
|
19 |
+
<h3>Dependencies</h3>
|
20 |
+
<ul>
|
21 |
+
<li>ShopGo Core</li>
|
22 |
+
<li>(ShopGo) Advanced Ifconfig</li>
|
23 |
+
<li>ShopGo Shipping Core</li>
|
24 |
+
</ul>
|
25 |
+
<h3>Notes</h3>
|
26 |
+
<ul>
|
27 |
+
<li>Full tracking, shipping labels printing and pickups creation features will be added in future releases.</li>
|
28 |
+
<li>Make sure that all dependencies mentioned above are installed before installing this module. Otherwise, it won't work.</li>
|
29 |
+
</ul>
|
30 |
+
<p><strong>You could also get the latest version of this module from:</strong><br />
|
31 |
+
<a href="https://github.com/shopgo-magento1/skynet-shipping.git">https://github.com/shopgo-magento1/skynet-shipping.git</a></p></description>
|
32 |
+
<notes>Fix SkyNet service list save issue</notes>
|
33 |
<authors><author><name>ShopGo</name><user>ShopGo</user><email>support@shopgo.me</email></author></authors>
|
34 |
+
<date>2016-06-06</date>
|
35 |
+
<time>11:54:19</time>
|
36 |
+
<contents><target name="magecommunity"><dir name="Shopgo"><dir name="SkynetShipping"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Shipment"><dir name="Create"><dir name="Form"><file name="Abstract.php" hash="e8799fc3361537948eacce935043bf14"/><file name="Shipment.php" hash="fb84f878fde877056864f5280644a216"/></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="ServiceListButton.php" hash="e5d0702c85016561e3ea4af38ba5f9fb"/><file name="VerifyAccountButton.php" hash="d7c07c1fe8d3eb96c76bd9d1c531cd8f"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="3d35a227b6bfeecc86dee03f756f7f58"/></dir><dir name="Model"><dir name="Carrier"><file name="Skynet.php" hash="ebf2f358f8170d3d174f6119fdc107c1"/></dir><dir name="Resource"><dir name="Service"><file name="Collection.php" hash="b63e98f9171aaa09de46e08746803e9a"/></dir><file name="Service.php" hash="6c91083cfefc36f51fa3feb7d3675fd7"/></dir><file name="Service.php" hash="69cb34a8d7192481aedbb32759c8f43f"/><dir name="Shipment"><dir name="Source"><file name="Typeofshipment.php" hash="b8f58fb33bf79a2ad833dec1e639948d"/></dir></dir><file name="Shipment.php" hash="5efa6ba625929e22b7ad4f3895b47858"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Service.php" hash="834d5888d87ad38bb1146b3667890d58"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="SkynetController.php" hash="023b507ba379f2e0bb33b517912e95fb"/></dir></dir><dir name="etc"><file name="config.xml" hash="dd805b5a92220778cd77fb23f716d763"/><file name="system.xml" hash="7d84ba307e0f958a0c769934aa233d6a"/></dir><dir name="sql"><dir name="skynetshipping_setup"><file name="mysql4-install-1.0.0.php" hash="e5ade6d196777a4b32a23ed998baebbc"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="shopgo"><dir name="skynet_shipping"><dir name="sales"><dir name="order"><dir name="shipment"><dir name="create"><dir name="form"><dir name="css"><file name="main.css" hash="6df04f2008a3fe635c9d40a2bbde272b"/><file name="shipment.css" hash="ee66afde21b13a8d8b7c89c17573a4a1"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
37 |
<compatible/>
|
38 |
+
<dependencies><required><php><min>5.3.0</min><max>5.6.0</max></php><package><name>Shopgo_Core</name><channel>community</channel><min>1.0.6</min><max/></package><package><name>Shopgo_AdvIfconfig</name><channel>community</channel><min>1.0.3</min><max/></package><package><name>Shopgo_ShippingCore</name><channel>community</channel><min>1.3.10</min><max/></package></required></dependencies>
|
39 |
</package>
|