Version Notes
version 2.0.0
Download this release
Release Info
Developer | Aramex |
Extension | Aramex_Shipping_Tracking_API |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 2.0.0
- app/code/community/Aramex/.DS_Store +0 -0
- app/code/community/Aramex/Adminhtml/controllers/Sales/OrderController.php +12 -0
- app/code/community/Aramex/Adminhtml/etc/config.xml +19 -0
- app/code/community/Aramex/Core/.DS_Store +0 -0
- app/code/community/Aramex/Core/Aramex_Core.xml +0 -28
- app/code/community/Aramex/Core/Helper/Data.php +5 -4
- app/code/community/Aramex/Core/Model/Settings.php +0 -0
- app/code/community/Aramex/Core/etc/config.xml +35 -40
- app/code/community/Aramex/Core/etc/system.xml +78 -80
- app/code/community/Aramex/Core/etc/system.xml-15-Jan-2013 +0 -81
- app/code/community/Aramex/Core/etc/system.xml-7-Jan-2013 +0 -82
- app/code/community/Aramex/Shipment/.DS_Store +0 -0
- app/code/community/Aramex/Shipment/Aramex_Shipment.xml +0 -9
- app/code/community/Aramex/Shipment/Block/Sales/Order/View.php +23 -14
- app/code/community/Aramex/Shipment/Helper/Data.php +28 -0
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex.php +328 -328
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Dropoff.php +39 -39
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Freemethod.php +36 -36
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Method.php +39 -39
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Packaging.php +39 -39
- app/code/community/Aramex/Shipment/Model/Carrier/~$Aramex.php +0 -0
- app/code/community/Aramex/Shipment/controllers/.DS_Store +0 -0
- app/code/community/Aramex/Shipment/controllers/RateController.php +85 -0
- app/code/community/Aramex/Shipment/controllers/SchedulepickupController.php +139 -0
- app/code/community/Aramex/Shipment/controllers/ShipmentController.php +406 -455
- app/code/community/Aramex/Shipment/etc/config.xml +127 -111
- {wsdl → app/code/community/Aramex/Shipment/etc/wsdl/Aramex}/Tracking.wsdl +0 -0
- app/code/community/Aramex/Shipment/etc/wsdl/Aramex/aramex-rates-calculator-wsdl.wsdl +206 -0
- {aramex → app/code/community/Aramex/Shipment/etc/wsdl/Aramex}/shipping.wsdl +487 -493
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex.php +328 -328
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Dropoff.php +39 -39
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Freemethod.php +36 -36
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Method.php +39 -39
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Packaging.php +39 -39
- app/code/community/Aramex/Shipping/etc/config.xml +77 -77
- app/code/community/Aramex/Shipping/etc/system.xml +373 -373
- app/design/adminhtml/default/default/layout/aramex.xml +31 -0
- app/design/adminhtml/default/default/template/aramex/calculate_rate.phtml +207 -0
- app/design/adminhtml/default/default/template/aramex/print_label.phtml +16 -0
- app/design/adminhtml/default/default/template/aramex/sales/order/comments/view.phtml +73 -0
- app/design/adminhtml/default/default/template/aramex/sales/order/view/tab/history.phtml +53 -0
- app/design/adminhtml/default/default/template/aramex/schedule_puckup.phtml +336 -0
- app/design/adminhtml/default/default/template/{sales/order/view/tab/info.phtml → aramex/shipment.phtml} +961 -1315
- app/etc/modules/Aramex_Adminhtml.xml +10 -0
- app/etc/modules/Aramex_Core.xml +9 -28
- app/etc/modules/Aramex_Shipment.xml +8 -8
- aramex/desktop.ini +0 -4
- package.xml +10 -10
- skin/adminhtml/default/default/aramex/css/aramex.css +225 -0
- skin/adminhtml/default/default/aramex/js/common.js +114 -0
- skin/adminhtml/default/default/aramex/js/jquery.min.js +4 -0
app/code/community/Aramex/.DS_Store
DELETED
Binary file
|
app/code/community/Aramex/Adminhtml/controllers/Sales/OrderController.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';
|
3 |
+
class Aramex_Adminhtml_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController
|
4 |
+
{
|
5 |
+
public function commentsHistoryAction()
|
6 |
+
{
|
7 |
+
$this->_initOrder();
|
8 |
+
$this->getResponse()->setBody(
|
9 |
+
$this->getLayout()->createBlock('adminhtml/sales_order_view_tab_history')->setTemplate("aramex/sales/order/view/tab/history.phtml")->toHtml()
|
10 |
+
);
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Aramex/Adminhtml/etc/config.xml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Aramex_Adminhtml>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Aramex_Adminhtml>
|
7 |
+
</modules>
|
8 |
+
<admin>
|
9 |
+
<routers>
|
10 |
+
<adminhtml>
|
11 |
+
<args>
|
12 |
+
<modules>
|
13 |
+
<Aramex_Adminhtml before="Mage_Adminhtml">Aramex_Adminhtml</Aramex_Adminhtml>
|
14 |
+
</modules>
|
15 |
+
</args>
|
16 |
+
</adminhtml>
|
17 |
+
</routers>
|
18 |
+
</admin>
|
19 |
+
</config>
|
app/code/community/Aramex/Core/.DS_Store
DELETED
Binary file
|
app/code/community/Aramex/Core/Aramex_Core.xml
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Aramex_Core>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>local</codePool>
|
7 |
-
</Aramex_Core>
|
8 |
-
<!--
|
9 |
-
<Aramex_Tracking>
|
10 |
-
<active>true</active>
|
11 |
-
<codePool>community</codePool>
|
12 |
-
<depends>Aramex_Core</depends>
|
13 |
-
</Aramex_Tracking>
|
14 |
-
|
15 |
-
<Aramex_Calculator>
|
16 |
-
<active>true</active>
|
17 |
-
<codePool>community</codePool>
|
18 |
-
<depends>Aramex_Core</depends>
|
19 |
-
</Aramex_Calculator>
|
20 |
-
|
21 |
-
<Aramex_Shipping>
|
22 |
-
<active>true</active>
|
23 |
-
<codePool>community</codePool>
|
24 |
-
<depends>Aramex_Core</depends>
|
25 |
-
</Aramex_Shipping>
|
26 |
-
-->
|
27 |
-
</modules>
|
28 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Aramex/Core/Helper/Data.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
-
<?php
|
2 |
-
class Aramex_Core_Helper_Data
|
3 |
-
{
|
4 |
-
public function __(){}
|
|
|
5 |
}
|
1 |
+
<?php
|
2 |
+
class Aramex_Core_Helper_Data
|
3 |
+
{
|
4 |
+
public function __(){}
|
5 |
+
|
6 |
}
|
app/code/community/Aramex/Core/Model/Settings.php
DELETED
File without changes
|
app/code/community/Aramex/Core/etc/config.xml
CHANGED
@@ -1,41 +1,36 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Aramex_Core>
|
5 |
-
<version>0.6.0</version>
|
6 |
-
</Aramex_Core>
|
7 |
-
</modules>
|
8 |
-
<global>
|
9 |
-
<
|
10 |
-
<aramex_core>
|
11 |
-
<class>
|
12 |
-
</aramex_core>
|
13 |
-
</
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
</children>
|
37 |
-
</admin>
|
38 |
-
</resources>
|
39 |
-
</acl>
|
40 |
-
</adminhtml>
|
41 |
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Aramex_Core>
|
5 |
+
<version>0.6.0</version>
|
6 |
+
</Aramex_Core>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<aramex_core>
|
11 |
+
<class>Aramex_Core_Helper</class>
|
12 |
+
</aramex_core>
|
13 |
+
</helpers>
|
14 |
+
</global>
|
15 |
+
<adminhtml>
|
16 |
+
<acl>
|
17 |
+
<resources>
|
18 |
+
<admin>
|
19 |
+
<children>
|
20 |
+
<system>
|
21 |
+
<children>
|
22 |
+
<config>
|
23 |
+
<children>
|
24 |
+
<aramexsettings module="aramex_core">
|
25 |
+
<title>aramex</title>
|
26 |
+
</aramexsettings>
|
27 |
+
</children>
|
28 |
+
</config>
|
29 |
+
</children>
|
30 |
+
</system>
|
31 |
+
</children>
|
32 |
+
</admin>
|
33 |
+
</resources>
|
34 |
+
</acl>
|
35 |
+
</adminhtml>
|
|
|
|
|
|
|
|
|
|
|
36 |
</config>
|
app/code/community/Aramex/Core/etc/system.xml
CHANGED
@@ -1,81 +1,79 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<tabs>
|
4 |
-
<aramex translate="label">
|
5 |
-
<label>Aramex</label>
|
6 |
-
<sort_order>1</sort_order>
|
7 |
-
</aramex>
|
8 |
-
</tabs>
|
9 |
-
<sections>
|
10 |
-
<aramexsettings translate="label">
|
11 |
-
<label>Aramex Global Settings</label>
|
12 |
-
<tab>aramex</tab>
|
13 |
-
<frontend_type>text</frontend_type>
|
14 |
-
<sort_order>1000</sort_order>
|
15 |
-
<show_in_default>1</show_in_default>
|
16 |
-
<show_in_website>1</show_in_website>
|
17 |
-
<show_in_store>1</show_in_store>
|
18 |
-
<groups>
|
19 |
-
<settings translate="label">
|
20 |
-
<label>Client Information</label>
|
21 |
-
<frontend_type>text</frontend_type>
|
22 |
-
<sort_order>1</sort_order>
|
23 |
-
<show_in_default>1</show_in_default>
|
24 |
-
<show_in_website>1</show_in_website>
|
25 |
-
<show_in_store>1</show_in_store>
|
26 |
-
<fields>
|
27 |
-
<account_country_code>
|
28 |
-
<label>Account Country Code</label>
|
29 |
-
<frontend_type>text</frontend_type>
|
30 |
-
<sort_order>1</sort_order>
|
31 |
-
<show_in_default>1</show_in_default>
|
32 |
-
<show_in_website>1</show_in_website>
|
33 |
-
<show_in_store>1</show_in_store>
|
34 |
-
</account_country_code>
|
35 |
-
<account_entity>
|
36 |
-
<label>Account Entity</label>
|
37 |
-
<frontend_type>text</frontend_type>
|
38 |
-
<sort_order>1</sort_order>
|
39 |
-
<show_in_default>1</show_in_default>
|
40 |
-
<show_in_website>1</show_in_website>
|
41 |
-
<show_in_store>1</show_in_store>
|
42 |
-
</account_entity>
|
43 |
-
<account_number>
|
44 |
-
<label>Account Number</label>
|
45 |
-
<frontend_type>text</frontend_type>
|
46 |
-
<
|
47 |
-
<
|
48 |
-
<
|
49 |
-
<
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<
|
54 |
-
<
|
55 |
-
<
|
56 |
-
<
|
57 |
-
<
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
<
|
63 |
-
<
|
64 |
-
<
|
65 |
-
<
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
<
|
71 |
-
<
|
72 |
-
<
|
73 |
-
<
|
74 |
-
|
75 |
-
|
76 |
-
</
|
77 |
-
|
78 |
-
|
79 |
-
</aramexsettings>
|
80 |
-
</sections>
|
81 |
</config>
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<aramex translate="label">
|
5 |
+
<label>Aramex</label>
|
6 |
+
<sort_order>1</sort_order>
|
7 |
+
</aramex>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<aramexsettings translate="label">
|
11 |
+
<label>Aramex Global Settings</label>
|
12 |
+
<tab>aramex</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>1000</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<settings translate="label">
|
20 |
+
<label>Client Information</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>1</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<account_country_code>
|
28 |
+
<label>Account Country Code</label>
|
29 |
+
<frontend_type>text</frontend_type>
|
30 |
+
<sort_order>1</sort_order>
|
31 |
+
<show_in_default>1</show_in_default>
|
32 |
+
<show_in_website>1</show_in_website>
|
33 |
+
<show_in_store>1</show_in_store>
|
34 |
+
</account_country_code>
|
35 |
+
<account_entity>
|
36 |
+
<label>Account Entity</label>
|
37 |
+
<frontend_type>text</frontend_type>
|
38 |
+
<sort_order>1</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
</account_entity>
|
43 |
+
<account_number>
|
44 |
+
<label>Account Number</label>
|
45 |
+
<frontend_type>text</frontend_type>
|
46 |
+
<sort_order>1</sort_order>
|
47 |
+
<show_in_default>1</show_in_default>
|
48 |
+
<show_in_website>1</show_in_website>
|
49 |
+
<show_in_store>1</show_in_store>
|
50 |
+
</account_number>
|
51 |
+
<account_pin>
|
52 |
+
<label>Account Pin</label>
|
53 |
+
<frontend_type>text</frontend_type>
|
54 |
+
<sort_order>1</sort_order>
|
55 |
+
<show_in_default>1</show_in_default>
|
56 |
+
<show_in_website>1</show_in_website>
|
57 |
+
<show_in_store>1</show_in_store>
|
58 |
+
</account_pin>
|
59 |
+
<user_name>
|
60 |
+
<label>Email</label>
|
61 |
+
<frontend_type>text</frontend_type>
|
62 |
+
<sort_order>1</sort_order>
|
63 |
+
<show_in_default>1</show_in_default>
|
64 |
+
<show_in_website>1</show_in_website>
|
65 |
+
<show_in_store>1</show_in_store>
|
66 |
+
</user_name>
|
67 |
+
<password>
|
68 |
+
<label>Password</label>
|
69 |
+
<frontend_type>Password</frontend_type>
|
70 |
+
<sort_order>1</sort_order>
|
71 |
+
<show_in_default>1</show_in_default>
|
72 |
+
<show_in_website>1</show_in_website>
|
73 |
+
<show_in_store>1</show_in_store>
|
74 |
+
</password>
|
75 |
+
</fields>
|
76 |
+
</settings> <shipperdetail translate="label"> <label>Shipper Details</label> <frontend_type>text</frontend_type> <sort_order>2</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> <fields> <name> <label>Name</label> <frontend_type>text</frontend_type> <sort_order>1</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </name> <email> <label>Email</label> <frontend_type>text</frontend_type> <sort_order>2</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </email> <company> <label>Company</label> <frontend_type>text</frontend_type> <sort_order>3</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </company> <address> <label>Address</label> <frontend_type>text</frontend_type> <sort_order>4</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </address> <country> <label>Country Code</label> <frontend_type>text</frontend_type> <sort_order>5</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </country> <city> <label>City</label> <frontend_type>text</frontend_type> <sort_order>6</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </city> <postalcode> <label>Postal Code</label> <frontend_type>text</frontend_type> <sort_order>7</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </postalcode> <state> <label>State</label> <frontend_type>text</frontend_type> <sort_order>8</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </state> <phone> <label>Phone</label> <frontend_type>text</frontend_type> <sort_order>9</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </phone> </fields> </shipperdetail> </groups>
|
77 |
+
</aramexsettings>
|
78 |
+
</sections>
|
|
|
|
|
79 |
</config>
|
app/code/community/Aramex/Core/etc/system.xml-15-Jan-2013
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<tabs>
|
4 |
-
<aramex translate="label">
|
5 |
-
<label>ARAMEX</label>
|
6 |
-
<sort_order>1</sort_order>
|
7 |
-
</aramex>
|
8 |
-
</tabs>
|
9 |
-
<sections>
|
10 |
-
<aramexsettings translate="label">
|
11 |
-
<label>ARAMEX Global Settings</label>
|
12 |
-
<tab>aramex</tab>
|
13 |
-
<frontend_type>text</frontend_type>
|
14 |
-
<sort_order>1000</sort_order>
|
15 |
-
<show_in_default>1</show_in_default>
|
16 |
-
<show_in_website>1</show_in_website>
|
17 |
-
<show_in_store>1</show_in_store>
|
18 |
-
<groups>
|
19 |
-
<settings translate="label">
|
20 |
-
<label>Client Information</label>
|
21 |
-
<frontend_type>text</frontend_type>
|
22 |
-
<sort_order>1</sort_order>
|
23 |
-
<show_in_default>1</show_in_default>
|
24 |
-
<show_in_website>1</show_in_website>
|
25 |
-
<show_in_store>1</show_in_store>
|
26 |
-
<fields>
|
27 |
-
<account_country_code>
|
28 |
-
<label>Account Country Code</label>
|
29 |
-
<frontend_type>text</frontend_type>
|
30 |
-
<sort_order>1</sort_order>
|
31 |
-
<show_in_default>1</show_in_default>
|
32 |
-
<show_in_website>1</show_in_website>
|
33 |
-
<show_in_store>1</show_in_store>
|
34 |
-
</account_country_code>
|
35 |
-
<account_entity>
|
36 |
-
<label>Account Entity</label>
|
37 |
-
<frontend_type>text</frontend_type>
|
38 |
-
<sort_order>1</sort_order>
|
39 |
-
<show_in_default>1</show_in_default>
|
40 |
-
<show_in_website>1</show_in_website>
|
41 |
-
<show_in_store>1</show_in_store>
|
42 |
-
</account_entity>
|
43 |
-
<account_number>
|
44 |
-
<label>Account Number</label>
|
45 |
-
<frontend_type>text</frontend_type>
|
46 |
-
<validate>validate-number</validate>
|
47 |
-
<sort_order>1</sort_order>
|
48 |
-
<show_in_default>1</show_in_default>
|
49 |
-
<show_in_website>1</show_in_website>
|
50 |
-
<show_in_store>1</show_in_store>
|
51 |
-
</account_number>
|
52 |
-
<account_pin>
|
53 |
-
<label>Account Pin</label>
|
54 |
-
<frontend_type>text</frontend_type>
|
55 |
-
<validate>validate-number</validate>
|
56 |
-
<sort_order>1</sort_order>
|
57 |
-
<show_in_default>1</show_in_default>
|
58 |
-
<show_in_website>1</show_in_website>
|
59 |
-
<show_in_store>1</show_in_store>
|
60 |
-
</account_pin>
|
61 |
-
<user_name>
|
62 |
-
<label>Username</label>
|
63 |
-
<frontend_type>text</frontend_type>
|
64 |
-
<sort_order>1</sort_order>
|
65 |
-
<show_in_default>1</show_in_default>
|
66 |
-
<show_in_website>1</show_in_website>
|
67 |
-
<show_in_store>1</show_in_store>
|
68 |
-
</user_name>
|
69 |
-
<password>
|
70 |
-
<label>Password</label>
|
71 |
-
<frontend_type>Password</frontend_type>
|
72 |
-
<sort_order>1</sort_order>
|
73 |
-
<show_in_default>1</show_in_default>
|
74 |
-
<show_in_website>1</show_in_website>
|
75 |
-
<show_in_store>1</show_in_store>
|
76 |
-
</password>
|
77 |
-
</fields>
|
78 |
-
</settings> <shipperdetail translate="label"> <label>Shipper Detail</label> <frontend_type>text</frontend_type> <sort_order>2</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> <fields> <name> <label>Name</label> <frontend_type>text</frontend_type> <sort_order>1</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </name> <email> <label>Email</label> <frontend_type>text</frontend_type> <sort_order>2</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </email> <company> <label>Company</label> <frontend_type>text</frontend_type> <sort_order>3</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </company> <address> <label>Address</label> <frontend_type>text</frontend_type> <sort_order>4</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </address> <country> <label>Country Code</label> <frontend_type>text</frontend_type> <sort_order>5</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </country> <city> <label>City</label> <frontend_type>text</frontend_type> <sort_order>6</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </city> <postalcode> <label>Postal Code</label> <frontend_type>text</frontend_type> <sort_order>7</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </postalcode> <state> <label>State</label> <frontend_type>text</frontend_type> <sort_order>8</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </state> <phone> <label>Phone</label> <frontend_type>text</frontend_type> <sort_order>9</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </phone> </fields> </shipperdetail> </groups>
|
79 |
-
</aramexsettings>
|
80 |
-
</sections>
|
81 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Aramex/Core/etc/system.xml-7-Jan-2013
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<tabs>
|
4 |
-
<aramex translate="label">
|
5 |
-
<label>ARAMEX</label>
|
6 |
-
<sort_order>1</sort_order>
|
7 |
-
</aramex>
|
8 |
-
</tabs>
|
9 |
-
<sections>
|
10 |
-
<aramexsettings translate="label">
|
11 |
-
<label>ARAMEX Global Settings</label>
|
12 |
-
<tab>aramex</tab>
|
13 |
-
<frontend_type>text</frontend_type>
|
14 |
-
<sort_order>1000</sort_order>
|
15 |
-
<show_in_default>1</show_in_default>
|
16 |
-
<show_in_website>1</show_in_website>
|
17 |
-
<show_in_store>1</show_in_store>
|
18 |
-
<groups>
|
19 |
-
<settings translate="label">
|
20 |
-
<label>Client Information</label>
|
21 |
-
<frontend_type>text</frontend_type>
|
22 |
-
<sort_order>1</sort_order>
|
23 |
-
<show_in_default>1</show_in_default>
|
24 |
-
<show_in_website>1</show_in_website>
|
25 |
-
<show_in_store>1</show_in_store>
|
26 |
-
<fields>
|
27 |
-
<account_country_code>
|
28 |
-
<label>Account Country Code</label>
|
29 |
-
<frontend_type>text</frontend_type>
|
30 |
-
<sort_order>1</sort_order>
|
31 |
-
<show_in_default>1</show_in_default>
|
32 |
-
<show_in_website>1</show_in_website>
|
33 |
-
<show_in_store>1</show_in_store>
|
34 |
-
</account_country_code>
|
35 |
-
<account_entity>
|
36 |
-
<label>Account Entity</label>
|
37 |
-
<frontend_type>text</frontend_type>
|
38 |
-
<sort_order>1</sort_order>
|
39 |
-
<show_in_default>1</show_in_default>
|
40 |
-
<show_in_website>1</show_in_website>
|
41 |
-
<show_in_store>1</show_in_store>
|
42 |
-
</account_entity>
|
43 |
-
<account_number>
|
44 |
-
<label>Account Number</label>
|
45 |
-
<frontend_type>text</frontend_type>
|
46 |
-
<validate>validate-number</validate>
|
47 |
-
<sort_order>1</sort_order>
|
48 |
-
<show_in_default>1</show_in_default>
|
49 |
-
<show_in_website>1</show_in_website>
|
50 |
-
<show_in_store>1</show_in_store>
|
51 |
-
</account_number>
|
52 |
-
<account_pin>
|
53 |
-
<label>Account Pin</label>
|
54 |
-
<frontend_type>text</frontend_type>
|
55 |
-
<validate>validate-number</validate>
|
56 |
-
<sort_order>1</sort_order>
|
57 |
-
<show_in_default>1</show_in_default>
|
58 |
-
<show_in_website>1</show_in_website>
|
59 |
-
<show_in_store>1</show_in_store>
|
60 |
-
</account_pin>
|
61 |
-
<user_name>
|
62 |
-
<label>Username</label>
|
63 |
-
<frontend_type>text</frontend_type>
|
64 |
-
<sort_order>1</sort_order>
|
65 |
-
<show_in_default>1</show_in_default>
|
66 |
-
<show_in_website>1</show_in_website>
|
67 |
-
<show_in_store>1</show_in_store>
|
68 |
-
</user_name>
|
69 |
-
<password>
|
70 |
-
<label>Password</label>
|
71 |
-
<frontend_type>Password</frontend_type>
|
72 |
-
<sort_order>1</sort_order>
|
73 |
-
<show_in_default>1</show_in_default>
|
74 |
-
<show_in_website>1</show_in_website>
|
75 |
-
<show_in_store>1</show_in_store>
|
76 |
-
</password>
|
77 |
-
</fields>
|
78 |
-
</settings>
|
79 |
-
</groups>
|
80 |
-
</aramexsettings>
|
81 |
-
</sections>
|
82 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Aramex/Shipment/.DS_Store
DELETED
Binary file
|
app/code/community/Aramex/Shipment/Aramex_Shipment.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?xml version="1.0" ?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Aramex_Shipment>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>local</codePool>
|
7 |
-
</Aramex_Shipment>
|
8 |
-
</modules>
|
9 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Aramex/Shipment/Block/Sales/Order/View.php
CHANGED
@@ -1,15 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
class Aramex_Shipment_Block_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View
|
3 |
-
{
|
4 |
-
function __construct()
|
5 |
-
{ $itemscount = 0; $totalWeight = 0; $_order = Mage::getModel('sales/order')->load($this->getRequest()->getParam('order_id')); $itemsv = $_order->getAllVisibleItems(); foreach($itemsv as $itemvv){ if($itemvv->getQtyOrdered() > $itemvv->getQtyShipped()){ $itemscount += $itemvv->getQtyOrdered() - $itemvv->getQtyShipped(); } if($itemvv->getWeight() != 0){ $weight = $itemvv->getWeight()*$itemvv->getQtyOrdered(); } else { $weight = 0.5*$itemvv->getQtyOrdered(); } $totalWeight += $weight; }
|
6 |
-
$this->_addButton('create_aramex_shipment', array(
|
7 |
-
'label' => Mage::helper('Sales')->__('Prepare Aramex Shipment'),
|
8 |
-
'onclick' => 'aramexpop('.$itemscount.')',
|
9 |
-
'class' => 'go'
|
10 |
-
), 0, 100, 'header', 'header');
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
?>
|
1 |
+
<?php
|
2 |
+
class Aramex_Shipment_Block_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View
|
3 |
+
{
|
4 |
+
function __construct()
|
5 |
+
{ $itemscount = 0; $totalWeight = 0; $_order = Mage::getModel('sales/order')->load($this->getRequest()->getParam('order_id')); $itemsv = $_order->getAllVisibleItems(); foreach($itemsv as $itemvv){ if($itemvv->getQtyOrdered() > $itemvv->getQtyShipped()){ $itemscount += $itemvv->getQtyOrdered() - $itemvv->getQtyShipped(); } if($itemvv->getWeight() != 0){ $weight = $itemvv->getWeight()*$itemvv->getQtyOrdered(); } else { $weight = 0.5*$itemvv->getQtyOrdered(); } $totalWeight += $weight; }
|
6 |
+
$this->_addButton('create_aramex_shipment', array(
|
7 |
+
'label' => Mage::helper('Sales')->__('Prepare Aramex Shipment'),
|
8 |
+
'onclick' => 'aramexpop('.$itemscount.')',
|
9 |
+
'class' => 'go'
|
10 |
+
), 0, 100, 'header', 'header');
|
11 |
+
//barry code
|
12 |
+
if($itemscount==0){
|
13 |
+
$this->_addButton('print_aramex_label', array(
|
14 |
+
'label' => Mage::helper('Sales')->__('Aramex Print Label'),
|
15 |
+
'onclick' => "myObj.printLabel()",
|
16 |
+
'class' => 'go'
|
17 |
+
), 0, 200, 'header', 'header');
|
18 |
+
}
|
19 |
+
//barry code end here
|
20 |
+
|
21 |
+
parent::__construct();
|
22 |
+
}
|
23 |
+
}
|
24 |
?>
|
app/code/community/Aramex/Shipment/Helper/Data.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Aramex_Shipment_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
public function getClientInfo()
|
5 |
+
{
|
6 |
+
$account=Mage::getStoreConfig('aramexsettings/settings/account_number');
|
7 |
+
$username=Mage::getStoreConfig('aramexsettings/settings/user_name');
|
8 |
+
$password=Mage::getStoreConfig('aramexsettings/settings/password');
|
9 |
+
$pin=Mage::getStoreConfig('aramexsettings/settings/account_pin');
|
10 |
+
$entity=Mage::getStoreConfig('aramexsettings/settings/account_entity');
|
11 |
+
$country_code=Mage::getStoreConfig('aramexsettings/settings/account_country_code');
|
12 |
+
return array(
|
13 |
+
'AccountCountryCode' => $country_code,
|
14 |
+
'AccountEntity' => $entity,
|
15 |
+
'AccountNumber' => $account,
|
16 |
+
'AccountPin' => $pin,
|
17 |
+
'UserName' => $username,
|
18 |
+
'Password' => $password,
|
19 |
+
'Version' => 'v1.0',
|
20 |
+
'Source' => 31
|
21 |
+
);
|
22 |
+
}
|
23 |
+
public function getWsdlPath(){
|
24 |
+
$wsdlBasePath = Mage::getModuleDir('etc', 'Aramex_Shipment') . DS . 'wsdl' . DS . 'Aramex' . DS;
|
25 |
+
return $wsdlBasePath;
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex.php
CHANGED
@@ -1,329 +1,329 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Magento
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-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 Mage
|
23 |
-
* @package Mage_Usa
|
24 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
25 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
-
*/
|
27 |
-
class Aramex_Shipping_Model_Carrier_Aramex extends Mage_Usa_Model_Shipping_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
28 |
-
|
29 |
-
protected $_code = 'aramex';
|
30 |
-
protected $_request = null;
|
31 |
-
protected $_result = null;
|
32 |
-
protected $_defaultGatewayUrl = null;
|
33 |
-
|
34 |
-
function __construct()
|
35 |
-
{
|
36 |
-
$this->_defaultGatewayUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'wsdl/Tracking2.wsdl';
|
37 |
-
}
|
38 |
-
|
39 |
-
protected function _doShipmentRequest(Varien_Object $request)
|
40 |
-
{
|
41 |
-
return $result;
|
42 |
-
}
|
43 |
-
|
44 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
45 |
-
{
|
46 |
-
if (!$this->getConfigFlag($this->_activeFlag)) {
|
47 |
-
return false;
|
48 |
-
}
|
49 |
-
|
50 |
-
$this->setRequest($request);
|
51 |
-
|
52 |
-
$this->_result = $this->_getQuotes();
|
53 |
-
|
54 |
-
$this->_updateFreeMethodQuote($request);
|
55 |
-
|
56 |
-
return $this->getResult();
|
57 |
-
}
|
58 |
-
|
59 |
-
public function setRequest(Mage_Shipping_Model_Rate_Request $request) {
|
60 |
-
$this->_request = $request;
|
61 |
-
|
62 |
-
$r = new Varien_Object();
|
63 |
-
|
64 |
-
if ($request->getLimitMethod()) {
|
65 |
-
$r->setService($request->getLimitMethod());
|
66 |
-
} else {
|
67 |
-
$r->setService('ALL');
|
68 |
-
}
|
69 |
-
|
70 |
-
if ($request->getAramexUserid()) {
|
71 |
-
$userId = $request->getAramexUserid();
|
72 |
-
} else {
|
73 |
-
$userId = $this->getConfigData('userid');
|
74 |
-
}
|
75 |
-
$r->setUserId($userId);
|
76 |
-
|
77 |
-
if ($request->getAramexContainer()) {
|
78 |
-
$container = $request->getAramexContainer();
|
79 |
-
} else {
|
80 |
-
$container = $this->getConfigData('container');
|
81 |
-
}
|
82 |
-
$r->setContainer($container);
|
83 |
-
|
84 |
-
if ($request->getAramexSize()) {
|
85 |
-
$size = $request->getAramexSize();
|
86 |
-
} else {
|
87 |
-
$size = $this->getConfigData('size');
|
88 |
-
}
|
89 |
-
$r->setSize($size);
|
90 |
-
|
91 |
-
if ($request->getAramexMachinable()) {
|
92 |
-
$machinable = $request->getAramexMachinable();
|
93 |
-
} else {
|
94 |
-
$machinable = $this->getConfigData('machinable');
|
95 |
-
}
|
96 |
-
$r->setMachinable($machinable);
|
97 |
-
|
98 |
-
if ($request->getOrigPostcode()) {
|
99 |
-
$r->setOrigPostal($request->getOrigPostcode());
|
100 |
-
} else {
|
101 |
-
$r->setOrigPostal(Mage::getStoreConfig('shipping/origin/postcode'));
|
102 |
-
}
|
103 |
-
|
104 |
-
if ($request->getDestCountryId()) {
|
105 |
-
$destCountry = $request->getDestCountryId();
|
106 |
-
} else {
|
107 |
-
$destCountry = self::USA_COUNTRY_ID;
|
108 |
-
}
|
109 |
-
|
110 |
-
$r->setDestCountryId($destCountry);
|
111 |
-
|
112 |
-
|
113 |
-
$countries = Mage::getResourceModel('directory/country_collection')
|
114 |
-
->addCountryIdFilter($destCountry)
|
115 |
-
->load()
|
116 |
-
->getItems();
|
117 |
-
$country = array_shift($countries);
|
118 |
-
$countryName = $country->getName();
|
119 |
-
|
120 |
-
$r->setDestCountryName($countryName);
|
121 |
-
|
122 |
-
if ($request->getDestPostcode()) {
|
123 |
-
$r->setDestPostal($request->getDestPostcode());
|
124 |
-
}
|
125 |
-
|
126 |
-
$weight = $this->getTotalNumOfBoxes($request->getPackageWeight());
|
127 |
-
$r->setWeightPounds(floor($weight));
|
128 |
-
$r->setWeightOunces(round(($weight - floor($weight)) * 16, 1));
|
129 |
-
if ($request->getFreeMethodWeight() != $request->getPackageWeight()) {
|
130 |
-
$r->setFreeMethodWeight($request->getFreeMethodWeight());
|
131 |
-
}
|
132 |
-
|
133 |
-
$r->setValue($request->getPackageValue());
|
134 |
-
$r->setValueWithDiscount($request->getPackageValueWithDiscount());
|
135 |
-
|
136 |
-
$this->_rawRequest = $r;
|
137 |
-
|
138 |
-
return $this;
|
139 |
-
}
|
140 |
-
|
141 |
-
public function getCode($type, $code='') {
|
142 |
-
return false;
|
143 |
-
}
|
144 |
-
|
145 |
-
protected function _getQuotes() {
|
146 |
-
return false;
|
147 |
-
}
|
148 |
-
|
149 |
-
public function getResult() {
|
150 |
-
return $this->_result;
|
151 |
-
}
|
152 |
-
|
153 |
-
protected function _setFreeMethodRequest($freeMethod) {
|
154 |
-
$r = $this->_rawRequest;
|
155 |
-
|
156 |
-
$weight = $this->getTotalNumOfBoxes($r->getFreeMethodWeight());
|
157 |
-
$r->setWeightPounds(floor($weight));
|
158 |
-
$r->setWeightOunces(round(($weight - floor($weight)) * 16, 1));
|
159 |
-
$r->setService($freeMethod);
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Get allowed shipping methods
|
164 |
-
*
|
165 |
-
* @return array
|
166 |
-
*/
|
167 |
-
public function getAllowedMethods()
|
168 |
-
{
|
169 |
-
$allowed = explode(',', $this->getConfigData('allowed_methods'));
|
170 |
-
$arr = array();
|
171 |
-
foreach ($allowed as $k) {
|
172 |
-
$arr[$k] = $this->getCode('method', $k);
|
173 |
-
}
|
174 |
-
return $arr;
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Return array of authenticated information
|
179 |
-
*
|
180 |
-
* @return array
|
181 |
-
*/
|
182 |
-
protected function _getAuthDetails()
|
183 |
-
{
|
184 |
-
return array(
|
185 |
-
'ClientInfo' => array(
|
186 |
-
'AccountCountryCode' => Mage::getStoreConfig('aramexsettings/settings/account_country_code'),
|
187 |
-
'AccountEntity' => Mage::getStoreConfig('aramexsettings/settings/account_entity'),
|
188 |
-
'AccountNumber' => Mage::getStoreConfig('aramexsettings/settings/account_number'),
|
189 |
-
'AccountPin' => Mage::getStoreConfig('aramexsettings/settings/account_pin'),
|
190 |
-
'UserName' => Mage::getStoreConfig('aramexsettings/settings/user_name'),
|
191 |
-
'Password' => Mage::getStoreConfig('aramexsettings/settings/password'),
|
192 |
-
'Version' => 'v1.0'
|
193 |
-
)
|
194 |
-
);
|
195 |
-
}
|
196 |
-
|
197 |
-
public function getTracking($trackings) {
|
198 |
-
$this->setTrackingReqeust();
|
199 |
-
|
200 |
-
if (!is_array($trackings)) {
|
201 |
-
$trackings = array($trackings);
|
202 |
-
}
|
203 |
-
|
204 |
-
$this->_getXmlTracking($trackings);
|
205 |
-
|
206 |
-
return $this->_result;
|
207 |
-
}
|
208 |
-
|
209 |
-
protected function setTrackingReqeust() {
|
210 |
-
$r = new Varien_Object();
|
211 |
-
|
212 |
-
$userId = $this->getConfigData('userid');
|
213 |
-
$r->setUserId($userId);
|
214 |
-
|
215 |
-
$this->_rawTrackRequest = $r;
|
216 |
-
}
|
217 |
-
|
218 |
-
protected function _getXmlTracking($trackings) {
|
219 |
-
$r = $this->_rawTrackRequest;
|
220 |
-
|
221 |
-
foreach ($trackings as $tracking) {
|
222 |
-
$this->_parseXmlTrackingResponse($tracking);
|
223 |
-
}
|
224 |
-
}
|
225 |
-
|
226 |
-
protected function _parseXmlTrackingResponse($trackingvalue) {
|
227 |
-
$resultArr = array();
|
228 |
-
|
229 |
-
if (!$this->_result) {
|
230 |
-
$this->_result = Mage::getModel('shipping/tracking_result');
|
231 |
-
}
|
232 |
-
$defaults = $this->getDefaults();
|
233 |
-
|
234 |
-
//$url = 'http://localhost:8080/soap_test/wsdl/Tracking.wsdl';
|
235 |
-
//if (!$url) {
|
236 |
-
$url = $this->_defaultGatewayUrl;
|
237 |
-
//}
|
238 |
-
|
239 |
-
$clientAramex = new SoapClient($url);
|
240 |
-
$aramexParams = $this->_getAuthDetails();
|
241 |
-
|
242 |
-
$aramexParams['Transaction'] = array('Reference1' => '001' );
|
243 |
-
$aramexParams['Shipments'] = array($trackingvalue);
|
244 |
-
|
245 |
-
$_resAramex = $clientAramex->TrackShipments($aramexParams);
|
246 |
-
|
247 |
-
if(is_object($_resAramex) && !$_resAramex->HasErrors){
|
248 |
-
$tracking = Mage::getModel('shipping/tracking_result_status');
|
249 |
-
$tracking->setCarrier('aramex');
|
250 |
-
$tracking->setCarrierTitle($this->getConfigData('title'));
|
251 |
-
$tracking->setTracking($trackingvalue);
|
252 |
-
if(!empty($_resAramex->TrackingResults->KeyValueOfstringArrayOfTrackingResultmFAkxlpY->Value->TrackingResult)){
|
253 |
-
$tracking->setTrackSummary($this->getTrackingInfoTable($_resAramex->TrackingResults->KeyValueOfstringArrayOfTrackingResultmFAkxlpY->Value->TrackingResult));
|
254 |
-
} else {
|
255 |
-
$tracking->setTrackSummary('Unable to retrieve quotes, please check if the Tracking Number is valid or contact your administrator.');
|
256 |
-
}
|
257 |
-
$this->_result->append($tracking);
|
258 |
-
} else {
|
259 |
-
$errorMessage = '';
|
260 |
-
foreach($_resAramex->Notifications as $notification){
|
261 |
-
$errorMessage .= '<b>' . $notification->Code . '</b>' . $notification->Message;
|
262 |
-
}
|
263 |
-
$error = Mage::getModel('shipping/tracking_result_error');
|
264 |
-
$error->setCarrier('aramex');
|
265 |
-
$error->setCarrierTitle($this->getConfigData('title'));
|
266 |
-
$error->setTracking($trackingvalue);
|
267 |
-
$error->setErrorMessage($errorMessage);
|
268 |
-
$this->_result->append($error);
|
269 |
-
}
|
270 |
-
}
|
271 |
-
|
272 |
-
public function getResponse() {
|
273 |
-
$statuses = '';
|
274 |
-
if ($this->_result instanceof Mage_Shipping_Model_Tracking_Result) {
|
275 |
-
if ($trackings = $this->_result->getAllTrackings()) {
|
276 |
-
foreach ($trackings as $tracking) {
|
277 |
-
if ($data = $tracking->getAllData()) {
|
278 |
-
if (!empty($data['track_summary'])) {
|
279 |
-
$statuses .= Mage::helper('usa')->__($data['track_summary']);
|
280 |
-
} else {
|
281 |
-
$statuses .= Mage::helper('usa')->__('Empty response');
|
282 |
-
}
|
283 |
-
}
|
284 |
-
}
|
285 |
-
}
|
286 |
-
}
|
287 |
-
if (empty($statuses)) {
|
288 |
-
$statuses = Mage::helper('usa')->__('Empty response');
|
289 |
-
}
|
290 |
-
return $statuses;
|
291 |
-
}
|
292 |
-
|
293 |
-
/**
|
294 |
-
* Get allowed shipping methods
|
295 |
-
*
|
296 |
-
* @return array
|
297 |
-
*/
|
298 |
-
public function getTrackingInfoTable($HAWBHistory) {
|
299 |
-
|
300 |
-
$_resultTable = '<table summary="Item Tracking" class="data-table">';
|
301 |
-
$_resultTable .= '<col width="1">
|
302 |
-
<col width="1">
|
303 |
-
<col width="1">
|
304 |
-
<col width="1">
|
305 |
-
<thead>
|
306 |
-
<tr class="first last">
|
307 |
-
<th>Location</th>
|
308 |
-
<th>Action Date/Time</th>
|
309 |
-
<th class="a-right">Tracking Description</th>
|
310 |
-
<th class="a-center">Comments</th>
|
311 |
-
</tr>
|
312 |
-
</thead><tbody>';
|
313 |
-
|
314 |
-
foreach ($HAWBHistory as $HAWBUpdate) {
|
315 |
-
|
316 |
-
$_resultTable .= '<tr>
|
317 |
-
<td>' . $HAWBUpdate->UpdateLocation . '</td>
|
318 |
-
<td>' . $HAWBUpdate->UpdateDateTime . '</td>
|
319 |
-
<td>' . $HAWBUpdate->UpdateDescription . '</td>
|
320 |
-
<td>' . $HAWBUpdate->Comments . '</td>
|
321 |
-
</tr>';
|
322 |
-
}
|
323 |
-
$_resultTable .= '</tbody></table>';
|
324 |
-
|
325 |
-
return $_resultTable;
|
326 |
-
}
|
327 |
-
}
|
328 |
-
|
329 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-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 Mage
|
23 |
+
* @package Mage_Usa
|
24 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
class Aramex_Shipping_Model_Carrier_Aramex extends Mage_Usa_Model_Shipping_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
28 |
+
|
29 |
+
protected $_code = 'aramex';
|
30 |
+
protected $_request = null;
|
31 |
+
protected $_result = null;
|
32 |
+
protected $_defaultGatewayUrl = null;
|
33 |
+
|
34 |
+
function __construct()
|
35 |
+
{
|
36 |
+
$this->_defaultGatewayUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'wsdl/Tracking2.wsdl';
|
37 |
+
}
|
38 |
+
|
39 |
+
protected function _doShipmentRequest(Varien_Object $request)
|
40 |
+
{
|
41 |
+
return $result;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
45 |
+
{
|
46 |
+
if (!$this->getConfigFlag($this->_activeFlag)) {
|
47 |
+
return false;
|
48 |
+
}
|
49 |
+
|
50 |
+
$this->setRequest($request);
|
51 |
+
|
52 |
+
$this->_result = $this->_getQuotes();
|
53 |
+
|
54 |
+
$this->_updateFreeMethodQuote($request);
|
55 |
+
|
56 |
+
return $this->getResult();
|
57 |
+
}
|
58 |
+
|
59 |
+
public function setRequest(Mage_Shipping_Model_Rate_Request $request) {
|
60 |
+
$this->_request = $request;
|
61 |
+
|
62 |
+
$r = new Varien_Object();
|
63 |
+
|
64 |
+
if ($request->getLimitMethod()) {
|
65 |
+
$r->setService($request->getLimitMethod());
|
66 |
+
} else {
|
67 |
+
$r->setService('ALL');
|
68 |
+
}
|
69 |
+
|
70 |
+
if ($request->getAramexUserid()) {
|
71 |
+
$userId = $request->getAramexUserid();
|
72 |
+
} else {
|
73 |
+
$userId = $this->getConfigData('userid');
|
74 |
+
}
|
75 |
+
$r->setUserId($userId);
|
76 |
+
|
77 |
+
if ($request->getAramexContainer()) {
|
78 |
+
$container = $request->getAramexContainer();
|
79 |
+
} else {
|
80 |
+
$container = $this->getConfigData('container');
|
81 |
+
}
|
82 |
+
$r->setContainer($container);
|
83 |
+
|
84 |
+
if ($request->getAramexSize()) {
|
85 |
+
$size = $request->getAramexSize();
|
86 |
+
} else {
|
87 |
+
$size = $this->getConfigData('size');
|
88 |
+
}
|
89 |
+
$r->setSize($size);
|
90 |
+
|
91 |
+
if ($request->getAramexMachinable()) {
|
92 |
+
$machinable = $request->getAramexMachinable();
|
93 |
+
} else {
|
94 |
+
$machinable = $this->getConfigData('machinable');
|
95 |
+
}
|
96 |
+
$r->setMachinable($machinable);
|
97 |
+
|
98 |
+
if ($request->getOrigPostcode()) {
|
99 |
+
$r->setOrigPostal($request->getOrigPostcode());
|
100 |
+
} else {
|
101 |
+
$r->setOrigPostal(Mage::getStoreConfig('shipping/origin/postcode'));
|
102 |
+
}
|
103 |
+
|
104 |
+
if ($request->getDestCountryId()) {
|
105 |
+
$destCountry = $request->getDestCountryId();
|
106 |
+
} else {
|
107 |
+
$destCountry = self::USA_COUNTRY_ID;
|
108 |
+
}
|
109 |
+
|
110 |
+
$r->setDestCountryId($destCountry);
|
111 |
+
|
112 |
+
|
113 |
+
$countries = Mage::getResourceModel('directory/country_collection')
|
114 |
+
->addCountryIdFilter($destCountry)
|
115 |
+
->load()
|
116 |
+
->getItems();
|
117 |
+
$country = array_shift($countries);
|
118 |
+
$countryName = $country->getName();
|
119 |
+
|
120 |
+
$r->setDestCountryName($countryName);
|
121 |
+
|
122 |
+
if ($request->getDestPostcode()) {
|
123 |
+
$r->setDestPostal($request->getDestPostcode());
|
124 |
+
}
|
125 |
+
|
126 |
+
$weight = $this->getTotalNumOfBoxes($request->getPackageWeight());
|
127 |
+
$r->setWeightPounds(floor($weight));
|
128 |
+
$r->setWeightOunces(round(($weight - floor($weight)) * 16, 1));
|
129 |
+
if ($request->getFreeMethodWeight() != $request->getPackageWeight()) {
|
130 |
+
$r->setFreeMethodWeight($request->getFreeMethodWeight());
|
131 |
+
}
|
132 |
+
|
133 |
+
$r->setValue($request->getPackageValue());
|
134 |
+
$r->setValueWithDiscount($request->getPackageValueWithDiscount());
|
135 |
+
|
136 |
+
$this->_rawRequest = $r;
|
137 |
+
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
|
141 |
+
public function getCode($type, $code='') {
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
|
145 |
+
protected function _getQuotes() {
|
146 |
+
return false;
|
147 |
+
}
|
148 |
+
|
149 |
+
public function getResult() {
|
150 |
+
return $this->_result;
|
151 |
+
}
|
152 |
+
|
153 |
+
protected function _setFreeMethodRequest($freeMethod) {
|
154 |
+
$r = $this->_rawRequest;
|
155 |
+
|
156 |
+
$weight = $this->getTotalNumOfBoxes($r->getFreeMethodWeight());
|
157 |
+
$r->setWeightPounds(floor($weight));
|
158 |
+
$r->setWeightOunces(round(($weight - floor($weight)) * 16, 1));
|
159 |
+
$r->setService($freeMethod);
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Get allowed shipping methods
|
164 |
+
*
|
165 |
+
* @return array
|
166 |
+
*/
|
167 |
+
public function getAllowedMethods()
|
168 |
+
{
|
169 |
+
$allowed = explode(',', $this->getConfigData('allowed_methods'));
|
170 |
+
$arr = array();
|
171 |
+
foreach ($allowed as $k) {
|
172 |
+
$arr[$k] = $this->getCode('method', $k);
|
173 |
+
}
|
174 |
+
return $arr;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Return array of authenticated information
|
179 |
+
*
|
180 |
+
* @return array
|
181 |
+
*/
|
182 |
+
protected function _getAuthDetails()
|
183 |
+
{
|
184 |
+
return array(
|
185 |
+
'ClientInfo' => array(
|
186 |
+
'AccountCountryCode' => Mage::getStoreConfig('aramexsettings/settings/account_country_code'),
|
187 |
+
'AccountEntity' => Mage::getStoreConfig('aramexsettings/settings/account_entity'),
|
188 |
+
'AccountNumber' => Mage::getStoreConfig('aramexsettings/settings/account_number'),
|
189 |
+
'AccountPin' => Mage::getStoreConfig('aramexsettings/settings/account_pin'),
|
190 |
+
'UserName' => Mage::getStoreConfig('aramexsettings/settings/user_name'),
|
191 |
+
'Password' => Mage::getStoreConfig('aramexsettings/settings/password'),
|
192 |
+
'Version' => 'v1.0'
|
193 |
+
)
|
194 |
+
);
|
195 |
+
}
|
196 |
+
|
197 |
+
public function getTracking($trackings) {
|
198 |
+
$this->setTrackingReqeust();
|
199 |
+
|
200 |
+
if (!is_array($trackings)) {
|
201 |
+
$trackings = array($trackings);
|
202 |
+
}
|
203 |
+
|
204 |
+
$this->_getXmlTracking($trackings);
|
205 |
+
|
206 |
+
return $this->_result;
|
207 |
+
}
|
208 |
+
|
209 |
+
protected function setTrackingReqeust() {
|
210 |
+
$r = new Varien_Object();
|
211 |
+
|
212 |
+
$userId = $this->getConfigData('userid');
|
213 |
+
$r->setUserId($userId);
|
214 |
+
|
215 |
+
$this->_rawTrackRequest = $r;
|
216 |
+
}
|
217 |
+
|
218 |
+
protected function _getXmlTracking($trackings) {
|
219 |
+
$r = $this->_rawTrackRequest;
|
220 |
+
|
221 |
+
foreach ($trackings as $tracking) {
|
222 |
+
$this->_parseXmlTrackingResponse($tracking);
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
protected function _parseXmlTrackingResponse($trackingvalue) {
|
227 |
+
$resultArr = array();
|
228 |
+
|
229 |
+
if (!$this->_result) {
|
230 |
+
$this->_result = Mage::getModel('shipping/tracking_result');
|
231 |
+
}
|
232 |
+
$defaults = $this->getDefaults();
|
233 |
+
|
234 |
+
//$url = 'http://localhost:8080/soap_test/wsdl/Tracking.wsdl';
|
235 |
+
//if (!$url) {
|
236 |
+
$url = $this->_defaultGatewayUrl;
|
237 |
+
//}
|
238 |
+
|
239 |
+
$clientAramex = new SoapClient($url);
|
240 |
+
$aramexParams = $this->_getAuthDetails();
|
241 |
+
|
242 |
+
$aramexParams['Transaction'] = array('Reference1' => '001' );
|
243 |
+
$aramexParams['Shipments'] = array($trackingvalue);
|
244 |
+
|
245 |
+
$_resAramex = $clientAramex->TrackShipments($aramexParams);
|
246 |
+
|
247 |
+
if(is_object($_resAramex) && !$_resAramex->HasErrors){
|
248 |
+
$tracking = Mage::getModel('shipping/tracking_result_status');
|
249 |
+
$tracking->setCarrier('aramex');
|
250 |
+
$tracking->setCarrierTitle($this->getConfigData('title'));
|
251 |
+
$tracking->setTracking($trackingvalue);
|
252 |
+
if(!empty($_resAramex->TrackingResults->KeyValueOfstringArrayOfTrackingResultmFAkxlpY->Value->TrackingResult)){
|
253 |
+
$tracking->setTrackSummary($this->getTrackingInfoTable($_resAramex->TrackingResults->KeyValueOfstringArrayOfTrackingResultmFAkxlpY->Value->TrackingResult));
|
254 |
+
} else {
|
255 |
+
$tracking->setTrackSummary('Unable to retrieve quotes, please check if the Tracking Number is valid or contact your administrator.');
|
256 |
+
}
|
257 |
+
$this->_result->append($tracking);
|
258 |
+
} else {
|
259 |
+
$errorMessage = '';
|
260 |
+
foreach($_resAramex->Notifications as $notification){
|
261 |
+
$errorMessage .= '<b>' . $notification->Code . '</b>' . $notification->Message;
|
262 |
+
}
|
263 |
+
$error = Mage::getModel('shipping/tracking_result_error');
|
264 |
+
$error->setCarrier('aramex');
|
265 |
+
$error->setCarrierTitle($this->getConfigData('title'));
|
266 |
+
$error->setTracking($trackingvalue);
|
267 |
+
$error->setErrorMessage($errorMessage);
|
268 |
+
$this->_result->append($error);
|
269 |
+
}
|
270 |
+
}
|
271 |
+
|
272 |
+
public function getResponse() {
|
273 |
+
$statuses = '';
|
274 |
+
if ($this->_result instanceof Mage_Shipping_Model_Tracking_Result) {
|
275 |
+
if ($trackings = $this->_result->getAllTrackings()) {
|
276 |
+
foreach ($trackings as $tracking) {
|
277 |
+
if ($data = $tracking->getAllData()) {
|
278 |
+
if (!empty($data['track_summary'])) {
|
279 |
+
$statuses .= Mage::helper('usa')->__($data['track_summary']);
|
280 |
+
} else {
|
281 |
+
$statuses .= Mage::helper('usa')->__('Empty response');
|
282 |
+
}
|
283 |
+
}
|
284 |
+
}
|
285 |
+
}
|
286 |
+
}
|
287 |
+
if (empty($statuses)) {
|
288 |
+
$statuses = Mage::helper('usa')->__('Empty response');
|
289 |
+
}
|
290 |
+
return $statuses;
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Get allowed shipping methods
|
295 |
+
*
|
296 |
+
* @return array
|
297 |
+
*/
|
298 |
+
public function getTrackingInfoTable($HAWBHistory) {
|
299 |
+
|
300 |
+
$_resultTable = '<table summary="Item Tracking" class="data-table">';
|
301 |
+
$_resultTable .= '<col width="1">
|
302 |
+
<col width="1">
|
303 |
+
<col width="1">
|
304 |
+
<col width="1">
|
305 |
+
<thead>
|
306 |
+
<tr class="first last">
|
307 |
+
<th>Location</th>
|
308 |
+
<th>Action Date/Time</th>
|
309 |
+
<th class="a-right">Tracking Description</th>
|
310 |
+
<th class="a-center">Comments</th>
|
311 |
+
</tr>
|
312 |
+
</thead><tbody>';
|
313 |
+
|
314 |
+
foreach ($HAWBHistory as $HAWBUpdate) {
|
315 |
+
|
316 |
+
$_resultTable .= '<tr>
|
317 |
+
<td>' . $HAWBUpdate->UpdateLocation . '</td>
|
318 |
+
<td>' . $HAWBUpdate->UpdateDateTime . '</td>
|
319 |
+
<td>' . $HAWBUpdate->UpdateDescription . '</td>
|
320 |
+
<td>' . $HAWBUpdate->Comments . '</td>
|
321 |
+
</tr>';
|
322 |
+
}
|
323 |
+
$_resultTable .= '</tbody></table>';
|
324 |
+
|
325 |
+
return $_resultTable;
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
?>
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Dropoff.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
22 |
-
* @package Mage_Usa
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
class Aramex_Shipping_Model_Carrier_Aramex_Source_Dropoff
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
-
$arr = array();
|
34 |
-
foreach ($fedex->getCode('dropoff') as $k=>$v) {
|
35 |
-
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
-
}
|
37 |
-
return $arr;
|
38 |
-
}
|
39 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-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 Mage
|
22 |
+
* @package Mage_Usa
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aramex_Shipping_Model_Carrier_Aramex_Source_Dropoff
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
+
$arr = array();
|
34 |
+
foreach ($fedex->getCode('dropoff') as $k=>$v) {
|
35 |
+
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
+
}
|
37 |
+
return $arr;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Freemethod.php
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
22 |
-
* @package Mage_Usa
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
class Aramex_Shipping_Model_Carrier_Aramex_Source_Freemethod extends Aramex_Shipping_Model_Carrier_Aramex_Source_Method
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$arr = parent::toOptionArray();
|
33 |
-
array_unshift($arr, array('value'=>'', 'label'=>Mage::helper('shipping')->__('None')));
|
34 |
-
return $arr;
|
35 |
-
}
|
36 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-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 Mage
|
22 |
+
* @package Mage_Usa
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aramex_Shipping_Model_Carrier_Aramex_Source_Freemethod extends Aramex_Shipping_Model_Carrier_Aramex_Source_Method
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
$arr = parent::toOptionArray();
|
33 |
+
array_unshift($arr, array('value'=>'', 'label'=>Mage::helper('shipping')->__('None')));
|
34 |
+
return $arr;
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Method.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
22 |
-
* @package Mage_Usa
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
class Aramex_Shipping_Model_Carrier_Aramex_Source_Method
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
-
$arr = array();
|
34 |
-
foreach ($fedex->getCode('method') as $k=>$v) {
|
35 |
-
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
-
}
|
37 |
-
return $arr;
|
38 |
-
}
|
39 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-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 Mage
|
22 |
+
* @package Mage_Usa
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aramex_Shipping_Model_Carrier_Aramex_Source_Method
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
+
$arr = array();
|
34 |
+
foreach ($fedex->getCode('method') as $k=>$v) {
|
35 |
+
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
+
}
|
37 |
+
return $arr;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Packaging.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
22 |
-
* @package Mage_Usa
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
class Aramex_Shipping_Model_Carrier_Aramex_Source_Packaging
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
-
$arr = array();
|
34 |
-
foreach ($fedex->getCode('packaging') as $k=>$v) {
|
35 |
-
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
-
}
|
37 |
-
return $arr;
|
38 |
-
}
|
39 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-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 Mage
|
22 |
+
* @package Mage_Usa
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aramex_Shipping_Model_Carrier_Aramex_Source_Packaging
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
+
$arr = array();
|
34 |
+
foreach ($fedex->getCode('packaging') as $k=>$v) {
|
35 |
+
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
+
}
|
37 |
+
return $arr;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/~$Aramex.php
DELETED
Binary file
|
app/code/community/Aramex/Shipment/controllers/.DS_Store
DELETED
Binary file
|
app/code/community/Aramex/Shipment/controllers/RateController.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Aramex_Shipment_RateController extends Mage_Adminhtml_Controller_Action {
|
3 |
+
|
4 |
+
public function postAction(){
|
5 |
+
$account=Mage::getStoreConfig('aramexsettings/settings/account_number');
|
6 |
+
$country_code=Mage::getStoreConfig('aramexsettings/settings/account_country_code');
|
7 |
+
$post = $this->getRequest()->getPost();
|
8 |
+
$country = Mage::getModel('directory/country')->loadByCode($country_code);
|
9 |
+
$response=array();
|
10 |
+
|
11 |
+
$clientInfo = Mage::helper('aramexshipment')->getClientInfo();
|
12 |
+
try {
|
13 |
+
if (empty($post)) {
|
14 |
+
$response['type']='error';
|
15 |
+
$response['error']=$this->__('Invalid form data.');
|
16 |
+
print json_encode($response);
|
17 |
+
die();
|
18 |
+
}
|
19 |
+
$params = array(
|
20 |
+
'ClientInfo' => $clientInfo,
|
21 |
+
|
22 |
+
'Transaction' => array(
|
23 |
+
'Reference1' => $post['reference']
|
24 |
+
),
|
25 |
+
|
26 |
+
'OriginAddress' => array(
|
27 |
+
'StateOrProvinceCode' =>html_entity_decode($post['origin_state']),
|
28 |
+
'City' => html_entity_decode($post['origin_city']),
|
29 |
+
'PostCode' =>$post['origin_zipcode'],
|
30 |
+
'CountryCode' => $post['origin_country']
|
31 |
+
),
|
32 |
+
|
33 |
+
'DestinationAddress' => array(
|
34 |
+
'StateOrProvinceCode' =>html_entity_decode($post['destination_state']),
|
35 |
+
'City' => html_entity_decode($post['destination_city']),
|
36 |
+
'PostCode' =>$post['destination_zipcode'],
|
37 |
+
'CountryCode' => $post['destination_country'],
|
38 |
+
),
|
39 |
+
'ShipmentDetails' => array(
|
40 |
+
'PaymentType' => $post['payment_type'],
|
41 |
+
'ProductGroup' => $post['product_group'],
|
42 |
+
'ProductType' => $post['service_type'],
|
43 |
+
'ActualWeight' => array('Value' => $post['text_weight'], 'Unit' => $post['weight_unit']),
|
44 |
+
'ChargeableWeight' => array('Value' => $post['text_weight'], 'Unit' => $post['weight_unit']),
|
45 |
+
'NumberOfPieces' => $post['total_count']
|
46 |
+
)
|
47 |
+
);
|
48 |
+
|
49 |
+
$baseUrl = Mage::helper('aramexshipment')->getWsdlPath();
|
50 |
+
$soapClient = new SoapClient($baseUrl.'aramex-rates-calculator-wsdl.wsdl', array('trace' => 1));
|
51 |
+
|
52 |
+
try{
|
53 |
+
$results = $soapClient->CalculateRate($params);
|
54 |
+
if($results->HasErrors){
|
55 |
+
if(count($results->Notifications->Notification) > 1){
|
56 |
+
$error="";
|
57 |
+
foreach($results->Notifications->Notification as $notify_error){
|
58 |
+
$error.=$this->__('Aramex: ' . $notify_error->Code .' - '. $notify_error->Message)."<br>";
|
59 |
+
}
|
60 |
+
$response['error']=$error;
|
61 |
+
}else{
|
62 |
+
$response['error']=$this->__('Aramex: ' . $results->Notifications->Notification->Code . ' - '. $results->Notifications->Notification->Message);
|
63 |
+
}
|
64 |
+
$response['type']='error';
|
65 |
+
}else{
|
66 |
+
$response['type']='success';
|
67 |
+
$amount="<p class='amount'>".$results->TotalAmount->Value." ".$results->TotalAmount->CurrencyCode."</p>";
|
68 |
+
$text="Local taxes - if any - are not included. Rate is based on account number $account in ".$country->getName();
|
69 |
+
$response['html']=$amount.$text;
|
70 |
+
|
71 |
+
}
|
72 |
+
} catch (Exception $e) {
|
73 |
+
$response['type']='error';
|
74 |
+
$response['error']=$e->getMessage();
|
75 |
+
}
|
76 |
+
}
|
77 |
+
catch (Exception $e) {
|
78 |
+
$response['type']='error';
|
79 |
+
$response['error']=$e->getMessage();
|
80 |
+
}
|
81 |
+
print json_encode($response);
|
82 |
+
die();
|
83 |
+
}
|
84 |
+
|
85 |
+
}
|
app/code/community/Aramex/Shipment/controllers/SchedulepickupController.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Aramex_Shipment_SchedulepickupController extends Mage_Adminhtml_Controller_Action {
|
3 |
+
|
4 |
+
public function postAction(){
|
5 |
+
$account=Mage::getStoreConfig('aramexsettings/settings/account_number');
|
6 |
+
$country_code=Mage::getStoreConfig('aramexsettings/settings/account_country_code');
|
7 |
+
$post = $this->getRequest()->getPost();
|
8 |
+
$country = Mage::getModel('directory/country')->loadByCode($country_code);
|
9 |
+
$response=array();
|
10 |
+
$clientInfo = Mage::helper('aramexshipment')->getClientInfo();
|
11 |
+
try {
|
12 |
+
if (empty($post)) {
|
13 |
+
$response['type']='error';
|
14 |
+
$response['error']=$this->__('Invalid form data.');
|
15 |
+
print json_encode($response);
|
16 |
+
die();
|
17 |
+
}
|
18 |
+
$post=$post['pickup'];
|
19 |
+
$_order = Mage::getModel('sales/order')->load($post['order_id']);
|
20 |
+
|
21 |
+
$pickupDate=strtotime($post['date']);
|
22 |
+
$readyTimeH=$post['ready_hour'];
|
23 |
+
$readyTimeM=$post['ready_minute'];
|
24 |
+
$readyTime=mktime(($readyTimeH-2),$readyTimeM,0,date("m",$pickupDate),date("d",$pickupDate),date("Y",$pickupDate));
|
25 |
+
|
26 |
+
$closingTimeH=$post['latest_hour'];
|
27 |
+
$closingTimeM=$post['latest_minute'];
|
28 |
+
$closingTime=mktime(($closingTimeH-2),$closingTimeM,0,date("m",$pickupDate),date("d",$pickupDate),date("Y",$pickupDate));
|
29 |
+
$params = array(
|
30 |
+
'ClientInfo' => $clientInfo,
|
31 |
+
|
32 |
+
'Transaction' => array(
|
33 |
+
'Reference1' => $post['reference']
|
34 |
+
),
|
35 |
+
|
36 |
+
'Pickup' =>array(
|
37 |
+
'PickupContact' =>array(
|
38 |
+
'PersonName' =>html_entity_decode($post['contact']),
|
39 |
+
'CompanyName' =>html_entity_decode($post['company']),
|
40 |
+
'PhoneNumber1' =>html_entity_decode($post['phone']),
|
41 |
+
'PhoneNumber1Ext' =>html_entity_decode($post['ext']),
|
42 |
+
'CellPhone' =>html_entity_decode($post['mobile']),
|
43 |
+
'EmailAddress' =>html_entity_decode($post['email'])
|
44 |
+
),
|
45 |
+
'PickupAddress' =>array(
|
46 |
+
'Line1' =>html_entity_decode($post['address']),
|
47 |
+
'City' =>html_entity_decode($post['city']),
|
48 |
+
'StateOrProvinceCode'=>html_entity_decode($post['state']),
|
49 |
+
'PostCode' =>html_entity_decode($post['zip']),
|
50 |
+
'CountryCode' =>$post['country']
|
51 |
+
),
|
52 |
+
|
53 |
+
'PickupLocation' =>html_entity_decode($post['location']),
|
54 |
+
'PickupDate' =>$readyTime,
|
55 |
+
'ReadyTime' =>$readyTime,
|
56 |
+
'LastPickupTime' =>$closingTime,
|
57 |
+
'ClosingTime' =>$closingTime,
|
58 |
+
'Comments' =>html_entity_decode($post['comments']),
|
59 |
+
'Reference1' =>html_entity_decode($post['reference']),
|
60 |
+
'Reference2' =>'',
|
61 |
+
'Vehicle' =>$post['vehicle'],
|
62 |
+
'Shipments' =>array(
|
63 |
+
'Shipment' =>array()
|
64 |
+
),
|
65 |
+
'PickupItems' =>array(
|
66 |
+
'PickupItemDetail'=>array(
|
67 |
+
'ProductGroup' =>$post['product_group'],
|
68 |
+
'ProductType' =>$post['product_type'],
|
69 |
+
'Payment' =>$post['payment_type'],
|
70 |
+
'NumberOfShipments'=>$post['no_shipments'],
|
71 |
+
'NumberOfPieces'=>$post['no_pieces'],
|
72 |
+
'ShipmentWeight'=>array('Value'=>$post['text_weight'],'Unit'=>$post['weight_unit']),
|
73 |
+
|
74 |
+
),
|
75 |
+
),
|
76 |
+
'Status' =>$post['status']
|
77 |
+
)
|
78 |
+
);
|
79 |
+
|
80 |
+
$baseUrl = Mage::helper('aramexshipment')->getWsdlPath();
|
81 |
+
$soapClient = new SoapClient($baseUrl . 'shipping.wsdl');
|
82 |
+
|
83 |
+
try{
|
84 |
+
$results = $soapClient->CreatePickup($params);
|
85 |
+
if($results->HasErrors){
|
86 |
+
if(count($results->Notifications->Notification) > 1){
|
87 |
+
$error="";
|
88 |
+
foreach($results->Notifications->Notification as $notify_error){
|
89 |
+
$error.=$this->__('Aramex: ' . $notify_error->Code .' - '. $notify_error->Message)."<br>";
|
90 |
+
}
|
91 |
+
$response['error']=$error;
|
92 |
+
}else{
|
93 |
+
$response['error']=$this->__('Aramex: ' . $results->Notifications->Notification->Code . ' - '. $results->Notifications->Notification->Message);
|
94 |
+
}
|
95 |
+
$response['type']='error';
|
96 |
+
}else{
|
97 |
+
$notify = false;
|
98 |
+
$visible = false;
|
99 |
+
$comment="Pickup reference number ( <strong>".$results->ProcessedPickup->ID."</strong> ).";
|
100 |
+
$_order->addStatusHistoryComment($comment, $_order->getStatus())
|
101 |
+
->setIsVisibleOnFront($visible)
|
102 |
+
->setIsCustomerNotified($notify);
|
103 |
+
$_order->save();
|
104 |
+
$shipmentId=null;
|
105 |
+
$shipment = Mage::getModel('sales/order_shipment')->getCollection()
|
106 |
+
->addFieldToFilter("order_id",$_order->getId())->load();
|
107 |
+
if($shipment->count()>0){
|
108 |
+
foreach($shipment as $_shipment){
|
109 |
+
$shipmentId=$_shipment->getId();
|
110 |
+
break;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
if($shipmentId!=null){
|
114 |
+
$shipment = Mage::getModel('sales/order_shipment')->load($shipmentId);
|
115 |
+
$shipment->addComment(
|
116 |
+
$comment,
|
117 |
+
false,
|
118 |
+
false
|
119 |
+
);
|
120 |
+
$shipment->save();
|
121 |
+
}
|
122 |
+
$response['type']='success';
|
123 |
+
$amount="<p class='amount'>Pickup reference number ( <strong>".$results->ProcessedPickup->ID."</strong> ).</p>";
|
124 |
+
$response['html']=$amount;
|
125 |
+
}
|
126 |
+
} catch (Exception $e) {
|
127 |
+
$response['type']='error';
|
128 |
+
$response['error']=$e->getMessage();
|
129 |
+
}
|
130 |
+
}
|
131 |
+
catch (Exception $e) {
|
132 |
+
$response['type']='error';
|
133 |
+
$response['error']=$e->getMessage();
|
134 |
+
}
|
135 |
+
print json_encode($response);
|
136 |
+
die();
|
137 |
+
}
|
138 |
+
|
139 |
+
}
|
app/code/community/Aramex/Shipment/controllers/ShipmentController.php
CHANGED
@@ -1,455 +1,406 @@
|
|
1 |
-
<?php
|
2 |
-
class Aramex_Shipment_ShipmentController extends Mage_Adminhtml_Controller_Action
|
3 |
-
{
|
4 |
-
|
5 |
-
public function postAction()
|
6 |
-
{
|
7 |
-
|
8 |
-
//
|
9 |
-
$
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
$
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
'
|
110 |
-
'
|
111 |
-
'
|
112 |
-
'
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
//
|
119 |
-
'
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
'
|
125 |
-
'
|
126 |
-
'
|
127 |
-
'
|
128 |
-
'
|
129 |
-
'
|
130 |
-
'
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
'
|
144 |
-
'
|
145 |
-
'
|
146 |
-
'
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
'
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
'
|
180 |
-
'
|
181 |
-
'
|
182 |
-
'
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
$
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
$params['
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
'
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
$
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
$
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
'
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
//
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
// }
|
408 |
-
// catch(Exception $ex) {
|
409 |
-
// Mage::getSingleton('core/session')
|
410 |
-
// ->addError('Unable to send email.');
|
411 |
-
// }
|
412 |
-
$body = 'Airway bill number: '.$auth_call->Shipments->ProcessedShipment->ID.'<br />Order number: '.$order->getIncrementId().'<br />You can track shipment on <a href="http://www.aramex.com/express/track.aspx">http://www.aramex.com/express/track.aspx</a><br />';
|
413 |
-
$mail = new Zend_Mail();
|
414 |
-
$mail->setBodyText($body);
|
415 |
-
$fromEmail=Mage::getStoreConfig('trans_email/ident_general/email');
|
416 |
-
$fromName=Mage::getStoreConfig('trans_email/ident_general/name');
|
417 |
-
$mail->setFrom($fromEmail, $fromName);
|
418 |
-
$toEmail=$order->getCustomerEmail();
|
419 |
-
$toName=$order->getCustomerName();
|
420 |
-
$mail->addTo($toEmail, $toName);
|
421 |
-
$mail->setSubject($subject);
|
422 |
-
|
423 |
-
try {
|
424 |
-
$mail->send();
|
425 |
-
}
|
426 |
-
|
427 |
-
catch(Exception $ex) {
|
428 |
-
Mage::getSingleton('core/session')
|
429 |
-
->addError('Unable to send email.');
|
430 |
-
}
|
431 |
-
|
432 |
-
// }
|
433 |
-
}
|
434 |
-
|
435 |
-
Mage::getSingleton('core/session')->addSuccess('Aramex Shipment Number: '.$auth_call->Shipments->ProcessedShipment->ID.' has been created.');
|
436 |
-
//$order->setState('warehouse_pickup_shipped', true);
|
437 |
-
}
|
438 |
-
}
|
439 |
-
} catch (Exception $e) {
|
440 |
-
$aramex_errors = true;
|
441 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
442 |
-
}
|
443 |
-
|
444 |
-
if($aramex_errors){
|
445 |
-
$this->_redirectUrl($post['aramex_shipment_referer'] . 'aramexpopup/show');
|
446 |
-
} else {
|
447 |
-
$this->_redirectUrl($post['aramex_shipment_referer']);
|
448 |
-
}
|
449 |
-
|
450 |
-
} catch (Exception $e) {
|
451 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
452 |
-
}
|
453 |
-
}
|
454 |
-
}
|
455 |
-
?>
|
1 |
+
<?php
|
2 |
+
class Aramex_Shipment_ShipmentController extends Mage_Adminhtml_Controller_Action
|
3 |
+
{
|
4 |
+
|
5 |
+
public function postAction()
|
6 |
+
{
|
7 |
+
$baseUrl = Mage::helper('aramexshipment')->getWsdlPath();
|
8 |
+
//SOAP object
|
9 |
+
$soapClient = new SoapClient($baseUrl . 'shipping.wsdl');
|
10 |
+
$aramex_errors = false;
|
11 |
+
$post = $this->getRequest()->getPost();
|
12 |
+
|
13 |
+
$flag = true;
|
14 |
+
$error = "";
|
15 |
+
try {
|
16 |
+
if (empty($post)) {
|
17 |
+
Mage::throwException($this->__('Invalid form data.'));
|
18 |
+
}
|
19 |
+
/* here's your form processing */
|
20 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($post['aramex_shipment_original_reference']);
|
21 |
+
$payment = $order->getPayment();
|
22 |
+
|
23 |
+
$totalWeight = 0;
|
24 |
+
$totalItems = 0;
|
25 |
+
|
26 |
+
$items = $order->getAllItems();
|
27 |
+
|
28 |
+
$aramex_items_counter = 0;
|
29 |
+
foreach($post['aramex_items'] as $key => $value){
|
30 |
+
$aramex_items_counter++;
|
31 |
+
if($value != 0){
|
32 |
+
//itrating order items
|
33 |
+
foreach($items as $item){
|
34 |
+
if($item->getId() == $key){
|
35 |
+
//get weight
|
36 |
+
if($item->getWeight() != 0){
|
37 |
+
$weight = $item->getWeight()*$item->getQtyOrdered();
|
38 |
+
} else {
|
39 |
+
$weight = 0.5*$item->getQtyOrdered();
|
40 |
+
}
|
41 |
+
|
42 |
+
// collect items for aramex
|
43 |
+
$aramex_items[] = array(
|
44 |
+
'PackageType' => 'Box',
|
45 |
+
'Quantity' => $post[$item->getId()],
|
46 |
+
'Weight' => array(
|
47 |
+
'Value' => $weight,
|
48 |
+
'Unit' => 'Kg'
|
49 |
+
),
|
50 |
+
'Comments' => $item->getName(), //'',
|
51 |
+
'Reference' => ''
|
52 |
+
);
|
53 |
+
|
54 |
+
$totalWeight += $weight;
|
55 |
+
$totalItems += $post[$item->getId()];
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
$aramex_atachments=array();
|
62 |
+
//attachment
|
63 |
+
for($i=1;$i<=3;$i++){
|
64 |
+
$fileName = $_FILES['file'.$i]['name'];
|
65 |
+
if(isset($fileName)){
|
66 |
+
$fileName = explode('.', $fileName);
|
67 |
+
$fileName = $fileName[0]; //filename without extension
|
68 |
+
$fileData = file_get_contents($_FILES['file'.$i]['tmp_name']);
|
69 |
+
//$fileData = base64_encode($fileData); //base64binary encode
|
70 |
+
$ext = pathinfo($_FILES['file'.$i]['name'], PATHINFO_EXTENSION); //file extension
|
71 |
+
if($fileName&&$ext&&$fileData)
|
72 |
+
$aramex_atachments[] = array(
|
73 |
+
'FileName' => $fileName,
|
74 |
+
'FileExtension' => $ext,
|
75 |
+
'FileContents' => $fileData
|
76 |
+
);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
$totalWeight = $post['order_weight'];
|
80 |
+
$params = array();
|
81 |
+
|
82 |
+
//shipper parameters
|
83 |
+
$params['Shipper'] = array(
|
84 |
+
'Reference1' => $post['aramex_shipment_shipper_reference'], //'ref11111',
|
85 |
+
'Reference2' => '',
|
86 |
+
'AccountNumber' => ($post['aramex_shipment_info_billing_account'] == 1) ? $post['aramex_shipment_shipper_account'] : $post['aramex_shipment_shipper_account'], //'43871',
|
87 |
+
|
88 |
+
//Party Address
|
89 |
+
'PartyAddress' => array(
|
90 |
+
'Line1' => mysql_escape_string($post['aramex_shipment_shipper_street']), //'13 Mecca St',
|
91 |
+
'Line2' => '',
|
92 |
+
'Line3' => '',
|
93 |
+
'City' => $post['aramex_shipment_shipper_city'], //'Dubai',
|
94 |
+
'StateOrProvinceCode' => $post['aramex_shipment_shipper_state'], //'',
|
95 |
+
'PostCode' => $post['aramex_shipment_shipper_postal'],
|
96 |
+
'CountryCode' => $post['aramex_shipment_shipper_country'], //'AE'
|
97 |
+
),
|
98 |
+
|
99 |
+
//Contact Info
|
100 |
+
'Contact' => array(
|
101 |
+
'Department' => '',
|
102 |
+
'PersonName' => $post['aramex_shipment_shipper_name'], //'Suheir',
|
103 |
+
'Title' => '',
|
104 |
+
'CompanyName' => $post['aramex_shipment_shipper_company'], //'Aramex',
|
105 |
+
'PhoneNumber1' => $post['aramex_shipment_shipper_phone'], //'55555555',
|
106 |
+
'PhoneNumber1Ext' => '',
|
107 |
+
'PhoneNumber2' => '',
|
108 |
+
'PhoneNumber2Ext' => '',
|
109 |
+
'FaxNumber' => '',
|
110 |
+
'CellPhone' => $post['aramex_shipment_shipper_phone'],
|
111 |
+
'EmailAddress' => $post['aramex_shipment_shipper_email'], //'',
|
112 |
+
'Type' => ''
|
113 |
+
),
|
114 |
+
);
|
115 |
+
|
116 |
+
//consinee parameters
|
117 |
+
$params['Consignee'] = array(
|
118 |
+
'Reference1' => $post['aramex_shipment_receiver_reference'], //'',
|
119 |
+
'Reference2' => '',
|
120 |
+
'AccountNumber' => ($post['aramex_shipment_info_billing_account'] == 2) ? $post['aramex_shipment_shipper_account'] : '',
|
121 |
+
|
122 |
+
//Party Address
|
123 |
+
'PartyAddress' => array(
|
124 |
+
'Line1' => $post['aramex_shipment_receiver_street'], //'15 ABC St',
|
125 |
+
'Line2' => '',
|
126 |
+
'Line3' => '',
|
127 |
+
'City' => $post['aramex_shipment_receiver_city'], //'Amman',
|
128 |
+
'StateOrProvinceCode' => '',
|
129 |
+
'PostCode' => $post['aramex_shipment_receiver_postal'],
|
130 |
+
'CountryCode' => $post['aramex_shipment_receiver_country'], //'JO'
|
131 |
+
),
|
132 |
+
|
133 |
+
//Contact Info
|
134 |
+
'Contact' => array(
|
135 |
+
'Department' => '',
|
136 |
+
'PersonName' => $post['aramex_shipment_receiver_name'], //'Mazen',
|
137 |
+
'Title' => '',
|
138 |
+
'CompanyName' => $post['aramex_shipment_receiver_company'], //'Aramex',
|
139 |
+
'PhoneNumber1' => $post['aramex_shipment_receiver_phone'], //'6666666',
|
140 |
+
'PhoneNumber1Ext' => '',
|
141 |
+
'PhoneNumber2' => '',
|
142 |
+
'PhoneNumber2Ext' => '',
|
143 |
+
'FaxNumber' => '',
|
144 |
+
'CellPhone' => $post['aramex_shipment_receiver_phone'],
|
145 |
+
'EmailAddress' => $post['aramex_shipment_receiver_email'], //'mazen@aramex.com',
|
146 |
+
'Type' => ''
|
147 |
+
)
|
148 |
+
);
|
149 |
+
|
150 |
+
//new
|
151 |
+
|
152 |
+
if($post['aramex_shipment_info_billing_account'] == 3){
|
153 |
+
$params['ThirdParty'] = array(
|
154 |
+
'Reference1' => $post['aramex_shipment_shipper_reference'], //'ref11111',
|
155 |
+
'Reference2' => '',
|
156 |
+
'AccountNumber' => $post['aramex_shipment_shipper_account'], //'43871',
|
157 |
+
|
158 |
+
//Party Address
|
159 |
+
'PartyAddress' => array(
|
160 |
+
'Line1' => mysql_escape_string(Mage::getStoreConfig('aramexsettings/shipperdetail/address')), //'13 Mecca St',
|
161 |
+
'Line2' => '',
|
162 |
+
'Line3' => '',
|
163 |
+
'City' => Mage::getStoreConfig('aramexsettings/shipperdetail/city'), //'Dubai',
|
164 |
+
'StateOrProvinceCode' => Mage::getStoreConfig('aramexsettings/shipperdetail/state'), //'',
|
165 |
+
'PostCode' => Mage::getStoreConfig('aramexsettings/shipperdetail/postalcode'),
|
166 |
+
'CountryCode' => Mage::getStoreConfig('aramexsettings/shipperdetail/country'), //'AE'
|
167 |
+
),
|
168 |
+
|
169 |
+
//Contact Info
|
170 |
+
'Contact' => array(
|
171 |
+
'Department' => '',
|
172 |
+
'PersonName' => Mage::getStoreConfig('aramexsettings/shipperdetail/name'), //'Suheir',
|
173 |
+
'Title' => '',
|
174 |
+
'CompanyName' => Mage::getStoreConfig('aramexsettings/shipperdetail/company'), //'Aramex',
|
175 |
+
'PhoneNumber1' => Mage::getStoreConfig('aramexsettings/shipperdetail/phone'), //'55555555',
|
176 |
+
'PhoneNumber1Ext' => '',
|
177 |
+
'PhoneNumber2' => '',
|
178 |
+
'PhoneNumber2Ext' => '',
|
179 |
+
'FaxNumber' => '',
|
180 |
+
'CellPhone' => Mage::getStoreConfig('aramexsettings/shipperdetail/phone'),
|
181 |
+
'EmailAddress' => Mage::getStoreConfig('aramexsettings/shipperdetail/email'), //'',
|
182 |
+
'Type' => ''
|
183 |
+
),
|
184 |
+
);
|
185 |
+
|
186 |
+
}
|
187 |
+
// Other Main Shipment Parameters
|
188 |
+
$params['Reference1'] = $post['aramex_shipment_info_reference']; //'Shpt0001';
|
189 |
+
$params['Reference2'] = '';
|
190 |
+
$params['Reference3'] = '';
|
191 |
+
$params['ForeignHAWB'] = $post['aramex_shipment_info_foreignhawb'];
|
192 |
+
|
193 |
+
$params['TransportType'] = 0;
|
194 |
+
$params['ShippingDateTime'] = time(); //date('m/d/Y g:i:sA');
|
195 |
+
$params['DueDate'] = time() + (7 * 24 * 60 * 60); //date('m/d/Y g:i:sA');
|
196 |
+
$params['PickupLocation'] = 'Reception';
|
197 |
+
$params['PickupGUID'] = '';
|
198 |
+
$params['Comments'] = $post['aramex_shipment_info_comment'];
|
199 |
+
$params['AccountingInstrcutions'] = '';
|
200 |
+
$params['OperationsInstructions'] = '';
|
201 |
+
$params['Details'] = array(
|
202 |
+
'Dimensions' => array(
|
203 |
+
'Length' => '0',
|
204 |
+
'Width' => '0',
|
205 |
+
'Height' => '0',
|
206 |
+
'Unit' => 'cm'
|
207 |
+
),
|
208 |
+
|
209 |
+
'ActualWeight' => array(
|
210 |
+
'Value' => $totalWeight,
|
211 |
+
'Unit' => $post['weight_unit']
|
212 |
+
),
|
213 |
+
|
214 |
+
'ProductGroup' => $post['aramex_shipment_info_product_group'], //'EXP',
|
215 |
+
'ProductType' => $post['aramex_shipment_info_product_type'], //,'PDX'
|
216 |
+
|
217 |
+
|
218 |
+
'PaymentType' => $post['aramex_shipment_info_payment_type'],
|
219 |
+
|
220 |
+
|
221 |
+
'PaymentOptions' => $post['aramex_shipment_info_payment_option'], //$post['aramex_shipment_info_payment_option']
|
222 |
+
|
223 |
+
|
224 |
+
'Services' => $post['aramex_shipment_info_service_type'],
|
225 |
+
|
226 |
+
'NumberOfPieces' => $totalItems,
|
227 |
+
'DescriptionOfGoods' => $post['aramex_shipment_description'],
|
228 |
+
'GoodsOriginCountry' => $post['aramex_shipment_shipper_country'], //'JO',
|
229 |
+
'Items' => $aramex_items,
|
230 |
+
);
|
231 |
+
if(count($aramex_atachments)){
|
232 |
+
$params['Attachments'] = $aramex_atachments;
|
233 |
+
}
|
234 |
+
|
235 |
+
$params['Details']['CashOnDeliveryAmount'] = array(
|
236 |
+
'Value' => $post['aramex_shipment_info_cod_amount'],
|
237 |
+
'CurrencyCode' => $post['aramex_shipment_currency_code']
|
238 |
+
);
|
239 |
+
|
240 |
+
$params['Details']['CustomsValueAmount'] = array(
|
241 |
+
'Value' => $post['aramex_shipment_info_custom_amount'],
|
242 |
+
'CurrencyCode' => $post['aramex_shipment_currency_code']
|
243 |
+
);
|
244 |
+
|
245 |
+
$major_par['Shipments'][] = $params;
|
246 |
+
$clientInfo = Mage::helper('aramexshipment')->getClientInfo();
|
247 |
+
$major_par['ClientInfo'] =$clientInfo;
|
248 |
+
|
249 |
+
$major_par['LabelInfo'] = array(
|
250 |
+
'ReportID' => 9729, //'9201',
|
251 |
+
'ReportType' => 'URL'
|
252 |
+
);
|
253 |
+
|
254 |
+
$formSession=Mage::getSingleton('adminhtml/session');
|
255 |
+
$formSession->setData("form_data",$post);
|
256 |
+
try {
|
257 |
+
//create shipment call
|
258 |
+
$auth_call = $soapClient->CreateShipments($major_par);
|
259 |
+
if($auth_call->HasErrors){
|
260 |
+
if(empty($auth_call->Shipments)){
|
261 |
+
if(count($auth_call->Notifications->Notification) > 1){
|
262 |
+
foreach($auth_call->Notifications->Notification as $notify_error){
|
263 |
+
Mage::throwException($this->__('Aramex: ' . $notify_error->Code .' - '. $notify_error->Message));
|
264 |
+
}
|
265 |
+
} else {
|
266 |
+
Mage::throwException($this->__('Aramex: ' . $auth_call->Notifications->Notification->Code . ' - '. $auth_call->Notifications->Notification->Message));
|
267 |
+
}
|
268 |
+
} else {
|
269 |
+
if(count($auth_call->Shipments->ProcessedShipment->Notifications->Notification) > 1){
|
270 |
+
$notification_string = '';
|
271 |
+
foreach($auth_call->Shipments->ProcessedShipment->Notifications->Notification as $notification_error){
|
272 |
+
$notification_string .= $notification_error->Code .' - '. $notification_error->Message . ' <br />';
|
273 |
+
}
|
274 |
+
Mage::throwException($notification_string);
|
275 |
+
} else {
|
276 |
+
Mage::throwException($this->__('Aramex: ' . $auth_call->Shipments->ProcessedShipment->Notifications->Notification->Code .' - '. $auth_call->Shipments->ProcessedShipment->Notifications->Notification->Message));Mage::throwException($this->__('Aramex: ' . $auth_call->Shipments->ProcessedShipment->Notifications->Notification->Code .' - '. $auth_call->Shipments->ProcessedShipment->Notifications->Notification->Message));
|
277 |
+
}
|
278 |
+
}
|
279 |
+
} else {
|
280 |
+
if($order->canShip()) {
|
281 |
+
|
282 |
+
$shipmentid = Mage::getModel('sales/order_shipment_api')->create($order->getIncrementId(), $post['aramex_items'], "AWB No. ".$auth_call->Shipments->ProcessedShipment->ID." - Order No. ".$auth_call->Shipments->ProcessedShipment->Reference1." - <a href='javascript:void(0);' onclick='myObj.printLabel();'>Print Label</a>");
|
283 |
+
|
284 |
+
$ship = true;
|
285 |
+
|
286 |
+
$ship = Mage::getModel('sales/order_shipment_api')->addTrack($shipmentid, 'aramex', 'Aramex', $auth_call->Shipments->ProcessedShipment->ID);
|
287 |
+
|
288 |
+
//sending mail
|
289 |
+
if($ship){
|
290 |
+
// if($post['aramex_email_customer'] == 'yes'){
|
291 |
+
|
292 |
+
|
293 |
+
$fromEmail = $post['aramex_shipment_shipper_email']; // sender email address
|
294 |
+
$fromName = $post['aramex_shipment_shipper_name']; // sender name
|
295 |
+
|
296 |
+
$toEmail = $post['aramex_shipment_receiver_email']; // recipient email address
|
297 |
+
$toName = $post['aramex_shipment_receiver_name']; // recipient name
|
298 |
+
|
299 |
+
$body = "Your shipment has been created for order id : ".$post['aramex_shipment_info_reference']."<br />Shipment No : ".$auth_call->Shipments->ProcessedShipment->ID."<br />"; // body text
|
300 |
+
$subject = "Aramex Shipment";
|
301 |
+
$body = 'Airway bill number: '.$auth_call->Shipments->ProcessedShipment->ID.'<br />Order number: '.$order->getIncrementId().'<br />You can track shipment on <a href="http://www.aramex.com/express/track.aspx">http://www.aramex.com/express/track.aspx</a><br />';
|
302 |
+
$mail = new Zend_Mail();
|
303 |
+
$mail->setBodyText($body);
|
304 |
+
$fromEmail=Mage::getStoreConfig('trans_email/ident_general/email');
|
305 |
+
$fromName=Mage::getStoreConfig('trans_email/ident_general/name');
|
306 |
+
$mail->setFrom($fromEmail, $fromName);
|
307 |
+
$toEmail=$order->getCustomerEmail();
|
308 |
+
$toName=$order->getCustomerName();
|
309 |
+
$mail->addTo($toEmail, $toName);
|
310 |
+
$mail->setSubject($subject);
|
311 |
+
|
312 |
+
try {
|
313 |
+
$mail->send();
|
314 |
+
}
|
315 |
+
|
316 |
+
catch(Exception $ex) {
|
317 |
+
Mage::getSingleton('core/session')
|
318 |
+
->addError('Unable to send email.');
|
319 |
+
}
|
320 |
+
|
321 |
+
// }
|
322 |
+
}
|
323 |
+
|
324 |
+
Mage::getSingleton('core/session')->addSuccess('Aramex Shipment Number: '.$auth_call->Shipments->ProcessedShipment->ID.' has been created.');
|
325 |
+
//$order->setState('warehouse_pickup_shipped', true);
|
326 |
+
}
|
327 |
+
}
|
328 |
+
} catch (Exception $e) {
|
329 |
+
$aramex_errors = true;
|
330 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
331 |
+
}
|
332 |
+
|
333 |
+
if($aramex_errors){
|
334 |
+
$strip=strstr($post['aramex_shipment_referer'],"aramexpopup",true);
|
335 |
+
$url=$strip;
|
336 |
+
if(empty($strip)){
|
337 |
+
$url=$post['aramex_shipment_referer'];
|
338 |
+
}
|
339 |
+
$this->_redirectUrl($url . 'aramexpopup/show');
|
340 |
+
} else {
|
341 |
+
$this->_redirectUrl($post['aramex_shipment_referer']);
|
342 |
+
}
|
343 |
+
|
344 |
+
} catch (Exception $e) {
|
345 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
346 |
+
}
|
347 |
+
}
|
348 |
+
public function printLabelAction(){
|
349 |
+
$_order = Mage::getModel('sales/order')->load($this->getRequest()->getParam('order_id'));
|
350 |
+
$previuosUrl=Mage::getSingleton('core/session')->getPreviousUrl();
|
351 |
+
|
352 |
+
if($_order->getId()){
|
353 |
+
$baseUrl = Mage::helper('aramexshipment')->getWsdlPath();
|
354 |
+
$soapClient = new SoapClient($baseUrl . 'shipping.wsdl');
|
355 |
+
$clientInfo = Mage::helper('aramexshipment')->getClientInfo();
|
356 |
+
$commentTable= Mage::getSingleton('core/resource')->getTableName('sales/shipment_comment');
|
357 |
+
$shipments = Mage::getResourceModel('sales/order_shipment_collection')
|
358 |
+
->addAttributeToSelect('*')
|
359 |
+
->addFieldToFilter("order_id",$_order->getId())->join("sales/shipment_comment",'main_table.entity_id=parent_id','comment')->addFieldToFilter('comment', array('like'=>"%{$_order->getIncrementId()}%"))->load();
|
360 |
+
if($shipments->count()){
|
361 |
+
foreach($shipments as $key=>$comment){
|
362 |
+
$awbno=strstr($comment->getComment(),"- Order No",true);
|
363 |
+
$awbno=trim($awbno,"AWB No.");
|
364 |
+
break;
|
365 |
+
}
|
366 |
+
$params = array(
|
367 |
+
|
368 |
+
'ClientInfo' => $clientInfo,
|
369 |
+
|
370 |
+
'Transaction' => array(
|
371 |
+
'Reference1' => $_order->getIncrementId(),
|
372 |
+
'Reference2' => '',
|
373 |
+
'Reference3' => '',
|
374 |
+
'Reference4' => '',
|
375 |
+
'Reference5' => '',
|
376 |
+
),
|
377 |
+
'LabelInfo' => array(
|
378 |
+
'ReportID' => 9729,
|
379 |
+
'ReportType' => 'URL',
|
380 |
+
),
|
381 |
+
);
|
382 |
+
$params['ShipmentNumber']=$awbno;
|
383 |
+
//print_r($params);
|
384 |
+
try {
|
385 |
+
$auth_call = $soapClient->PrintLabel($params);
|
386 |
+
$filepath=$auth_call->ShipmentLabel->LabelURL;
|
387 |
+
$name="{$_order->getIncrementId()}-shipment-label.pdf";
|
388 |
+
header('Content-type: application/pdf');
|
389 |
+
header('Content-Disposition: attachment; filename="'.$name.'"');
|
390 |
+
readfile($filepath);
|
391 |
+
exit();
|
392 |
+
} catch (SoapFault $fault) {
|
393 |
+
Mage::getSingleton('adminhtml/session')->addError('Error : ' . $fault->faultstring);
|
394 |
+
$this->_redirectUrl($previuosUrl);
|
395 |
+
}
|
396 |
+
}else{
|
397 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Shipment is empty or not created yet.'));
|
398 |
+
$this->_redirectUrl($previuosUrl);
|
399 |
+
}
|
400 |
+
}else{
|
401 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('This order no longer exists.'));
|
402 |
+
$this->_redirectUrl($previuosUrl);
|
403 |
+
}
|
404 |
+
}
|
405 |
+
}
|
406 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Aramex/Shipment/etc/config.xml
CHANGED
@@ -1,112 +1,128 @@
|
|
1 |
-
<?xml version="1.0" ?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Aramex_Shipment>
|
5 |
-
<version>0.1.0</version>
|
6 |
-
</Aramex_Shipment>
|
7 |
-
</modules>
|
8 |
-
<global>
|
9 |
-
<blocks>
|
10 |
-
<adminhtml>
|
11 |
-
<rewrite>
|
12 |
-
<sales_order_view>Aramex_Shipment_Block_Sales_Order_View</sales_order_view>
|
13 |
-
</rewrite>
|
14 |
-
</adminhtml>
|
15 |
-
</blocks>
|
16 |
-
<template>
|
17 |
-
<email>
|
18 |
-
<aramex_general_email_template>
|
19 |
-
<label>Aramex New Shipment</label>
|
20 |
-
<file>aramex_shipment_created.html</file>
|
21 |
-
<type>html</type>
|
22 |
-
</aramex_general_email_template>
|
23 |
-
</email>
|
24 |
-
</template>
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
<
|
31 |
-
|
32 |
-
<
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
<
|
39 |
-
<
|
40 |
-
<
|
41 |
-
<
|
42 |
-
<
|
43 |
-
</
|
44 |
-
</
|
45 |
-
</
|
46 |
-
</
|
47 |
-
|
48 |
-
|
49 |
-
<
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
<
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
</
|
78 |
-
</
|
79 |
-
|
80 |
-
<
|
81 |
-
<!-- declare
|
82 |
-
|
83 |
-
|
84 |
-
<!--
|
85 |
-
<
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
<!--
|
95 |
-
|
96 |
-
|
97 |
-
<!--
|
98 |
-
<
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
</config>
|
1 |
+
<?xml version="1.0" ?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Aramex_Shipment>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Aramex_Shipment>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<blocks>
|
10 |
+
<adminhtml>
|
11 |
+
<rewrite>
|
12 |
+
<sales_order_view>Aramex_Shipment_Block_Sales_Order_View</sales_order_view>
|
13 |
+
</rewrite>
|
14 |
+
</adminhtml>
|
15 |
+
</blocks>
|
16 |
+
<template>
|
17 |
+
<email>
|
18 |
+
<aramex_general_email_template>
|
19 |
+
<label>Aramex New Shipment</label>
|
20 |
+
<file>aramex_shipment_created.html</file>
|
21 |
+
<type>html</type>
|
22 |
+
</aramex_general_email_template>
|
23 |
+
</email>
|
24 |
+
</template>
|
25 |
+
|
26 |
+
</global>
|
27 |
+
<admin>
|
28 |
+
<routers>
|
29 |
+
<aramexshipment>
|
30 |
+
<use>admin</use>
|
31 |
+
<args>
|
32 |
+
<module>Aramex_Shipment</module>
|
33 |
+
<frontName>aramexshipment</frontName>
|
34 |
+
</args>
|
35 |
+
</aramexshipment>
|
36 |
+
</routers>
|
37 |
+
</admin>
|
38 |
+
<adminhtml>
|
39 |
+
<layout>
|
40 |
+
<updates>
|
41 |
+
<aramexshipment>
|
42 |
+
<file>aramex.xml</file>
|
43 |
+
</aramexshipment>
|
44 |
+
</updates>
|
45 |
+
</layout>
|
46 |
+
</adminhtml>
|
47 |
+
|
48 |
+
<sales>
|
49 |
+
<shipping>
|
50 |
+
<carriers>
|
51 |
+
<aramex>
|
52 |
+
<class>Aramex_Shipment_Model_Carrier_Aramex</class>
|
53 |
+
</aramex>
|
54 |
+
</carriers>
|
55 |
+
</shipping>
|
56 |
+
</sales>
|
57 |
+
|
58 |
+
<default>
|
59 |
+
<carriers>
|
60 |
+
<!-- Use group alias -->
|
61 |
+
<aramex>
|
62 |
+
<active>1</active>
|
63 |
+
<sallowspecific>0</sallowspecific>
|
64 |
+
<!--model>shipping/carrier_aramex</model-->
|
65 |
+
<!--model>newmodule/carrier_newmodule</model-->
|
66 |
+
|
67 |
+
<model>Aramex_Shipping_Model_Carrier_Aramex</model>
|
68 |
+
<name>aramex</name>
|
69 |
+
<gateway_url>aramex/Tracking.wsdl</gateway_url>
|
70 |
+
<price>10.00</price>
|
71 |
+
<title>aramex</title>
|
72 |
+
<specificerrmsg>
|
73 |
+
This shipping method is currently unavailable.If you would like to ship using this shipping method, please contact us.
|
74 |
+
</specificerrmsg>
|
75 |
+
<handling_type>F</handling_type>
|
76 |
+
</aramex>
|
77 |
+
</carriers>
|
78 |
+
</default>
|
79 |
+
|
80 |
+
<modules>
|
81 |
+
<!-- declare module's version information -->
|
82 |
+
<!-- Use module name_Shipping -->
|
83 |
+
<Aramex_Shipping>
|
84 |
+
<!-- this version number will be used for database upgrades -->
|
85 |
+
<version>0.6.0</version>
|
86 |
+
<!-- Use module name_Shipping -->
|
87 |
+
</Aramex_Shipping>
|
88 |
+
</modules>
|
89 |
+
|
90 |
+
<global>
|
91 |
+
<!-- declare model group for new module -->
|
92 |
+
<models>
|
93 |
+
<!-- model group alias to be used in Mage::getModel() -->
|
94 |
+
<!-- Use group alias -->
|
95 |
+
<aramex>
|
96 |
+
<!-- base class name for the model group -->
|
97 |
+
<!-- Use module name_Shipping_Model -->
|
98 |
+
<class>Aramex_Shipping_Model</class>
|
99 |
+
<!-- Use group alias -->
|
100 |
+
</aramex>
|
101 |
+
</models>
|
102 |
+
<helpers>
|
103 |
+
<aramexshipment>
|
104 |
+
<class>Aramex_Shipment_Helper</class>
|
105 |
+
</aramexshipment>
|
106 |
+
</helpers>
|
107 |
+
<!-- declare resource setup for new module -->
|
108 |
+
<resources>
|
109 |
+
<!-- resource identifier -->
|
110 |
+
<!-- Use group alias_setup -->
|
111 |
+
<aramex_setup>
|
112 |
+
<!-- specify that this resource is a setup resource and used for upgrades -->
|
113 |
+
<setup>
|
114 |
+
<!-- which module to look for install/upgrade files in -->
|
115 |
+
<!-- Use module name_Shipping_Model -->
|
116 |
+
<module>Aramex_Shipping</module>
|
117 |
+
</setup>
|
118 |
+
<!-- specify database connection for this resource -->
|
119 |
+
<connection>
|
120 |
+
<!-- do not create new connection, use predefined core setup connection -->
|
121 |
+
<use>core_setup</use>
|
122 |
+
</connection>
|
123 |
+
<!-- Use group alias_setup -->
|
124 |
+
</aramex_setup>
|
125 |
+
</resources>
|
126 |
+
|
127 |
+
</global>
|
128 |
</config>
|
{wsdl → app/code/community/Aramex/Shipment/etc/wsdl/Aramex}/Tracking.wsdl
RENAMED
File without changes
|
app/code/community/Aramex/Shipment/etc/wsdl/Aramex/aramex-rates-calculator-wsdl.wsdl
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:i0="http://ws.aramex.net/ShippingAPI/v1" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tns="http://ws.aramex.net/ShippingAPI/v1/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" name="Service_1_0">
|
3 |
+
<wsdl:binding type="i0:Service_1_0" name="BasicHttpBinding_Service_1_0">
|
4 |
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
|
5 |
+
<wsdl:operation name="CalculateRate">
|
6 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CalculateRate"/>
|
7 |
+
<wsdl:input name="RateCalculatorRequest">
|
8 |
+
<soap:body use="literal"/>
|
9 |
+
</wsdl:input>
|
10 |
+
<wsdl:output name="RateCalculatorResponse">
|
11 |
+
<soap:body use="literal"/>
|
12 |
+
</wsdl:output>
|
13 |
+
</wsdl:operation>
|
14 |
+
</wsdl:binding>
|
15 |
+
<wsdl:types>
|
16 |
+
<xsd:schema targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" elementFormDefault="qualified">
|
17 |
+
<xsd:element name="RateCalculatorRequest">
|
18 |
+
<xsd:complexType>
|
19 |
+
<xsd:sequence>
|
20 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
21 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
22 |
+
<xsd:element type="tns:Address" name="OriginAddress" nillable="true" minOccurs="0"/>
|
23 |
+
<xsd:element type="tns:Address" name="DestinationAddress" nillable="true" minOccurs="0"/>
|
24 |
+
<xsd:element type="tns:ShipmentDetails" name="ShipmentDetails" nillable="true" minOccurs="0"/>
|
25 |
+
</xsd:sequence>
|
26 |
+
</xsd:complexType>
|
27 |
+
</xsd:element>
|
28 |
+
<xsd:complexType name="ClientInfo">
|
29 |
+
<xsd:sequence>
|
30 |
+
<xsd:element type="xsd:string" name="UserName" nillable="true"/>
|
31 |
+
<xsd:element type="xsd:string" name="Password" nillable="true"/>
|
32 |
+
<xsd:element type="xsd:string" name="Version" nillable="true"/>
|
33 |
+
<xsd:element type="xsd:string" name="AccountNumber" nillable="true"/>
|
34 |
+
<xsd:element type="xsd:string" name="AccountPin" nillable="true"/>
|
35 |
+
<xsd:element type="xsd:string" name="AccountEntity" nillable="true"/>
|
36 |
+
<xsd:element type="xsd:string" name="AccountCountryCode" nillable="true"/>
|
37 |
+
</xsd:sequence>
|
38 |
+
</xsd:complexType>
|
39 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true"/>
|
40 |
+
<xsd:complexType name="Transaction">
|
41 |
+
<xsd:sequence>
|
42 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true"/>
|
43 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true"/>
|
44 |
+
<xsd:element type="xsd:string" name="Reference3" nillable="true"/>
|
45 |
+
<xsd:element type="xsd:string" name="Reference4" nillable="true"/>
|
46 |
+
<xsd:element type="xsd:string" name="Reference5" nillable="true"/>
|
47 |
+
</xsd:sequence>
|
48 |
+
</xsd:complexType>
|
49 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true"/>
|
50 |
+
<xsd:complexType name="Address">
|
51 |
+
<xsd:sequence>
|
52 |
+
<xsd:element type="xsd:string" name="Line1" nillable="true"/>
|
53 |
+
<xsd:element type="xsd:string" name="Line2" nillable="true"/>
|
54 |
+
<xsd:element type="xsd:string" name="Line3" nillable="true"/>
|
55 |
+
<xsd:element type="xsd:string" name="City" nillable="true"/>
|
56 |
+
<xsd:element type="xsd:string" name="StateOrProvinceCode" nillable="true" minOccurs="0"/>
|
57 |
+
<xsd:element type="xsd:string" name="PostCode" nillable="true"/>
|
58 |
+
<xsd:element type="xsd:string" name="CountryCode" nillable="true"/>
|
59 |
+
</xsd:sequence>
|
60 |
+
</xsd:complexType>
|
61 |
+
<xsd:element type="tns:Address" name="Address" nillable="true"/>
|
62 |
+
<xsd:complexType name="ShipmentDetails">
|
63 |
+
<xsd:sequence>
|
64 |
+
<xsd:element type="tns:Dimensions" name="Dimensions" nillable="true"/>
|
65 |
+
<xsd:element type="tns:Weight" name="ActualWeight" nillable="true"/>
|
66 |
+
<xsd:element type="tns:Weight" name="ChargeableWeight" nillable="true"/>
|
67 |
+
<xsd:element type="xsd:string" name="DescriptionOfGoods" nillable="true"/>
|
68 |
+
<xsd:element type="xsd:string" name="GoodsOriginCountry" nillable="true"/>
|
69 |
+
<xsd:element type="xsd:int" name="NumberOfPieces"/>
|
70 |
+
<xsd:element type="xsd:string" name="ProductGroup" nillable="true"/>
|
71 |
+
<xsd:element type="xsd:string" name="ProductType" nillable="true"/>
|
72 |
+
<xsd:element type="xsd:string" name="PaymentType" nillable="true"/>
|
73 |
+
<xsd:element type="xsd:string" name="PaymentOptions" nillable="true"/>
|
74 |
+
<xsd:element type="tns:Money" name="CustomsValueAmount" nillable="true" minOccurs="0"/>
|
75 |
+
<xsd:element type="tns:Money" name="CashOnDeliveryAmount" nillable="true" minOccurs="0"/>
|
76 |
+
<xsd:element type="tns:Money" name="InsuranceAmount" nillable="true" minOccurs="0"/>
|
77 |
+
<xsd:element type="tns:Money" name="CashAdditionalAmount" nillable="true" minOccurs="0"/>
|
78 |
+
<xsd:element type="tns:Money" name="CollectAmount" nillable="true" minOccurs="0"/>
|
79 |
+
<xsd:element type="xsd:string" name="Services" nillable="true" minOccurs="0"/>
|
80 |
+
<xsd:element type="tns:ArrayOfShipmentItem" name="Items" nillable="true" minOccurs="0"/>
|
81 |
+
</xsd:sequence>
|
82 |
+
</xsd:complexType>
|
83 |
+
<xsd:element type="tns:ShipmentDetails" name="ShipmentDetails" nillable="true"/>
|
84 |
+
<xsd:complexType name="Dimensions">
|
85 |
+
<xsd:sequence>
|
86 |
+
<xsd:element type="xsd:int" name="Length"/>
|
87 |
+
<xsd:element type="xsd:int" name="Width"/>
|
88 |
+
<xsd:element type="xsd:int" name="Height"/>
|
89 |
+
<xsd:element type="xsd:string" name="Unit" nillable="true"/>
|
90 |
+
</xsd:sequence>
|
91 |
+
</xsd:complexType>
|
92 |
+
<xsd:element type="tns:Dimensions" name="Dimensions" nillable="true"/>
|
93 |
+
<xsd:complexType name="Weight">
|
94 |
+
<xsd:sequence>
|
95 |
+
<xsd:element type="xsd:string" name="Unit" nillable="true"/>
|
96 |
+
<xsd:element type="xsd:double" name="Value"/>
|
97 |
+
</xsd:sequence>
|
98 |
+
</xsd:complexType>
|
99 |
+
<xsd:element type="tns:Weight" name="Weight" nillable="true"/>
|
100 |
+
<xsd:complexType name="Money">
|
101 |
+
<xsd:sequence>
|
102 |
+
<xsd:element type="xsd:string" name="CurrencyCode" nillable="true"/>
|
103 |
+
<xsd:element type="xsd:double" name="Value"/>
|
104 |
+
</xsd:sequence>
|
105 |
+
</xsd:complexType>
|
106 |
+
<xsd:element type="tns:Money" name="Money" nillable="true"/>
|
107 |
+
<xsd:complexType name="ArrayOfShipmentItem">
|
108 |
+
<xsd:sequence>
|
109 |
+
<xsd:element type="tns:ShipmentItem" name="ShipmentItem" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
110 |
+
</xsd:sequence>
|
111 |
+
</xsd:complexType>
|
112 |
+
<xsd:element type="tns:ArrayOfShipmentItem" name="ArrayOfShipmentItem" nillable="true"/>
|
113 |
+
<xsd:complexType name="ShipmentItem">
|
114 |
+
<xsd:sequence>
|
115 |
+
<xsd:element type="xsd:string" name="PackageType" nillable="true"/>
|
116 |
+
<xsd:element type="xsd:int" name="Quantity"/>
|
117 |
+
<xsd:element type="tns:Weight" name="Weight" nillable="true"/>
|
118 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true" minOccurs="0"/>
|
119 |
+
<xsd:element type="xsd:string" name="Reference" nillable="true" minOccurs="0"/>
|
120 |
+
</xsd:sequence>
|
121 |
+
</xsd:complexType>
|
122 |
+
<xsd:element type="tns:ShipmentItem" name="ShipmentItem" nillable="true"/>
|
123 |
+
<xsd:element name="RateCalculatorResponse">
|
124 |
+
<xsd:complexType>
|
125 |
+
<xsd:sequence>
|
126 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
127 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
128 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
129 |
+
<xsd:element type="tns:Money" name="TotalAmount" nillable="true" minOccurs="0"/>
|
130 |
+
</xsd:sequence>
|
131 |
+
</xsd:complexType>
|
132 |
+
</xsd:element>
|
133 |
+
<xsd:complexType name="ArrayOfNotification">
|
134 |
+
<xsd:sequence>
|
135 |
+
<xsd:element type="tns:Notification" name="Notification" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
136 |
+
</xsd:sequence>
|
137 |
+
</xsd:complexType>
|
138 |
+
<xsd:element type="tns:ArrayOfNotification" name="ArrayOfNotification" nillable="true"/>
|
139 |
+
<xsd:complexType name="Notification">
|
140 |
+
<xsd:sequence>
|
141 |
+
<xsd:element type="xsd:string" name="Code" nillable="true"/>
|
142 |
+
<xsd:element type="xsd:string" name="Message" nillable="true"/>
|
143 |
+
</xsd:sequence>
|
144 |
+
</xsd:complexType>
|
145 |
+
<xsd:element type="tns:Notification" name="Notification" nillable="true"/>
|
146 |
+
</xsd:schema>
|
147 |
+
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified">
|
148 |
+
<xs:element type="xs:anyType" name="anyType" nillable="true"/>
|
149 |
+
<xs:element type="xs:anyURI" name="anyURI" nillable="true"/>
|
150 |
+
<xs:element type="xs:base64Binary" name="base64Binary" nillable="true"/>
|
151 |
+
<xs:element type="xs:boolean" name="boolean" nillable="true"/>
|
152 |
+
<xs:element type="xs:byte" name="byte" nillable="true"/>
|
153 |
+
<xs:element type="xs:dateTime" name="dateTime" nillable="true"/>
|
154 |
+
<xs:element type="xs:decimal" name="decimal" nillable="true"/>
|
155 |
+
<xs:element type="xs:double" name="double" nillable="true"/>
|
156 |
+
<xs:element type="xs:float" name="float" nillable="true"/>
|
157 |
+
<xs:element type="xs:int" name="int" nillable="true"/>
|
158 |
+
<xs:element type="xs:long" name="long" nillable="true"/>
|
159 |
+
<xs:element type="xs:QName" name="QName" nillable="true"/>
|
160 |
+
<xs:element type="xs:short" name="short" nillable="true"/>
|
161 |
+
<xs:element type="xs:string" name="string" nillable="true"/>
|
162 |
+
<xs:element type="xs:unsignedByte" name="unsignedByte" nillable="true"/>
|
163 |
+
<xs:element type="xs:unsignedInt" name="unsignedInt" nillable="true"/>
|
164 |
+
<xs:element type="xs:unsignedLong" name="unsignedLong" nillable="true"/>
|
165 |
+
<xs:element type="xs:unsignedShort" name="unsignedShort" nillable="true"/>
|
166 |
+
<xs:element type="tns:char" name="char" nillable="true"/>
|
167 |
+
<xs:simpleType name="char">
|
168 |
+
<xs:restriction base="xs:int"/>
|
169 |
+
</xs:simpleType>
|
170 |
+
<xs:element type="tns:duration" name="duration" nillable="true"/>
|
171 |
+
<xs:simpleType name="duration">
|
172 |
+
<xs:restriction base="xs:duration">
|
173 |
+
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
|
174 |
+
<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
|
175 |
+
<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
|
176 |
+
</xs:restriction>
|
177 |
+
</xs:simpleType>
|
178 |
+
<xs:element type="tns:guid" name="guid" nillable="true"/>
|
179 |
+
<xs:simpleType name="guid">
|
180 |
+
<xs:restriction base="xs:string">
|
181 |
+
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
|
182 |
+
</xs:restriction>
|
183 |
+
</xs:simpleType>
|
184 |
+
<xs:attribute type="xs:QName" name="FactoryType"/>
|
185 |
+
<xs:attribute type="xs:ID" name="Id"/>
|
186 |
+
<xs:attribute type="xs:IDREF" name="Ref"/>
|
187 |
+
</xs:schema>
|
188 |
+
</wsdl:types>
|
189 |
+
<wsdl:message name="RateCalculatorRequest">
|
190 |
+
<wsdl:part name="parameters" element="tns:RateCalculatorRequest"/>
|
191 |
+
</wsdl:message>
|
192 |
+
<wsdl:message name="RateCalculatorResponse">
|
193 |
+
<wsdl:part name="parameters" element="tns:RateCalculatorResponse"/>
|
194 |
+
</wsdl:message>
|
195 |
+
<wsdl:portType name="Service_1_0">
|
196 |
+
<wsdl:operation name="CalculateRate">
|
197 |
+
<wsdl:input name="RateCalculatorRequest" message="tns:RateCalculatorRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CalculateRate"/>
|
198 |
+
<wsdl:output name="RateCalculatorResponse" message="tns:RateCalculatorResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CalculateRateResponse"/>
|
199 |
+
</wsdl:operation>
|
200 |
+
</wsdl:portType>
|
201 |
+
<wsdl:service name="Service_1_0">
|
202 |
+
<wsdl:port name="BasicHttpBinding_Service_1_0" binding="i0:BasicHttpBinding_Service_1_0">
|
203 |
+
<soap:address location="http://ws.aramex.net/shippingapi/ratecalculator/service_1_0.svc"/>
|
204 |
+
</wsdl:port>
|
205 |
+
</wsdl:service>
|
206 |
+
</wsdl:definitions>
|
{aramex → app/code/community/Aramex/Shipment/etc/wsdl/Aramex}/shipping.wsdl
RENAMED
@@ -1,494 +1,488 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<wsdl:definitions xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tns="http://ws.aramex.net/ShippingAPI/v1/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" name="Service_1_0">
|
3 |
-
<wsdl:types>
|
4 |
-
<xsd:schema targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified">
|
5 |
-
<xsd:element name="ShipmentCreationRequest">
|
6 |
-
<xsd:complexType>
|
7 |
-
<xsd:sequence>
|
8 |
-
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
9 |
-
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
10 |
-
<xsd:element type="tns:ArrayOfShipment" name="Shipments" nillable="true" minOccurs="0"/>
|
11 |
-
<xsd:element type="tns:LabelInfo" name="LabelInfo" nillable="true" minOccurs="0"/>
|
12 |
-
</xsd:sequence>
|
13 |
-
</xsd:complexType>
|
14 |
-
</xsd:element>
|
15 |
-
<xsd:complexType name="ClientInfo">
|
16 |
-
<xsd:sequence>
|
17 |
-
<xsd:element type="xsd:string" name="UserName" nillable="true"/>
|
18 |
-
<xsd:element type="xsd:string" name="Password" nillable="true"/>
|
19 |
-
<xsd:element type="xsd:string" name="Version" nillable="true"/>
|
20 |
-
<xsd:element type="xsd:string" name="AccountNumber" nillable="true"/>
|
21 |
-
<xsd:element type="xsd:string" name="AccountPin" nillable="true"/>
|
22 |
-
<xsd:element type="xsd:string" name="AccountEntity" nillable="true"/>
|
23 |
-
<xsd:element type="xsd:string" name="AccountCountryCode" nillable="true"/>
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
<xsd:
|
28 |
-
|
29 |
-
|
30 |
-
<xsd:element type="xsd:string" name="
|
31 |
-
<xsd:element type="xsd:string" name="
|
32 |
-
<xsd:element type="xsd:string" name="
|
33 |
-
<xsd:element type="xsd:string" name="
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
<xsd:
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
<xsd:
|
44 |
-
|
45 |
-
|
46 |
-
<xsd:element type="xsd:string" name="
|
47 |
-
<xsd:element type="xsd:string" name="
|
48 |
-
<xsd:element type="
|
49 |
-
<xsd:element type="tns:Party" name="
|
50 |
-
<xsd:element type="tns:Party" name="
|
51 |
-
<xsd:element type="
|
52 |
-
<xsd:element type="xsd:dateTime" name="
|
53 |
-
<xsd:element type="xsd:
|
54 |
-
<xsd:element type="xsd:string" name="
|
55 |
-
<xsd:element type="xsd:string" name="
|
56 |
-
<xsd:element type="xsd:string" name="
|
57 |
-
<xsd:element type="
|
58 |
-
<xsd:element type="
|
59 |
-
<xsd:element type="
|
60 |
-
<xsd:element type="xsd:string" name="
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
<xsd:element type="
|
70 |
-
<xsd:element type="
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
<xsd:element type="xsd:string" name="
|
80 |
-
<xsd:element type="xsd:string" name="
|
81 |
-
<xsd:element type="xsd:string" name="
|
82 |
-
<xsd:element type="xsd:string" name="
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
<xsd:element type="xsd:string" name="
|
92 |
-
<xsd:element type="xsd:string" name="
|
93 |
-
<xsd:element type="xsd:string" name="
|
94 |
-
<xsd:element type="xsd:string" name="
|
95 |
-
<xsd:element type="xsd:string" name="
|
96 |
-
<xsd:element type="xsd:string" name="
|
97 |
-
<xsd:element type="xsd:string" name="
|
98 |
-
<xsd:element type="xsd:string" name="
|
99 |
-
<xsd:element type="xsd:string" name="
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
<xsd:element type="
|
109 |
-
<xsd:element type="
|
110 |
-
<xsd:element type="
|
111 |
-
<xsd:element type="xsd:string" name="
|
112 |
-
<xsd:element type="xsd:string" name="
|
113 |
-
<xsd:element type="xsd:
|
114 |
-
<xsd:element type="xsd:string" name="
|
115 |
-
<xsd:element type="
|
116 |
-
<xsd:element type="
|
117 |
-
<xsd:element type="
|
118 |
-
<xsd:element type="tns:Money" name="
|
119 |
-
<xsd:element type="
|
120 |
-
<xsd:element type="tns:Money" name="
|
121 |
-
<xsd:element type="
|
122 |
-
<xsd:element type="
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
<xsd:element type="xsd:double" name="
|
132 |
-
<xsd:element type="xsd:
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
<xsd:element type="xsd:
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
<xsd:
|
152 |
-
|
153 |
-
|
154 |
-
<xsd:element type="
|
155 |
-
</xsd:sequence>
|
156 |
-
</xsd:complexType>
|
157 |
-
<xsd:element type="tns:
|
158 |
-
<xsd:complexType name="
|
159 |
-
<xsd:sequence>
|
160 |
-
<xsd:element type="
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
<xsd:element type="
|
171 |
-
</xsd:sequence>
|
172 |
-
</xsd:complexType>
|
173 |
-
<xsd:element type="tns:
|
174 |
-
<xsd:complexType name="
|
175 |
-
<xsd:sequence>
|
176 |
-
<xsd:element type="
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
<xsd:element type="xsd:
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
<xsd:
|
189 |
-
|
190 |
-
|
191 |
-
<xsd:
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
<xsd:complexType name="
|
206 |
-
<xsd:sequence>
|
207 |
-
<xsd:element type="
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
<xsd:
|
212 |
-
|
213 |
-
|
214 |
-
<xsd:element type="
|
215 |
-
</xsd:sequence>
|
216 |
-
</xsd:complexType>
|
217 |
-
<xsd:element type="tns:
|
218 |
-
<xsd:complexType name="
|
219 |
-
<xsd:sequence>
|
220 |
-
<xsd:element type="
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
<xsd:element type="
|
227 |
-
<xsd:element type="
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
<xsd:element type="
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
<xsd:
|
238 |
-
|
239 |
-
|
240 |
-
<xsd:
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
<xsd:element type="
|
280 |
-
<xsd:element type="
|
281 |
-
<xsd:element type="xsd:string" name="
|
282 |
-
<xsd:element type="xsd:
|
283 |
-
<xsd:element type="xsd:
|
284 |
-
<xsd:element type="
|
285 |
-
<xsd:element type="
|
286 |
-
<xsd:element type="xsd:string" name="
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
<xsd:element type="
|
293 |
-
</xsd:sequence>
|
294 |
-
</xsd:complexType>
|
295 |
-
<xsd:element type="tns:
|
296 |
-
<xsd:complexType name="
|
297 |
-
<xsd:sequence>
|
298 |
-
<xsd:element type="
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
<xsd:element type="
|
305 |
-
<xsd:element type="xsd:
|
306 |
-
<xsd:element type="
|
307 |
-
<xsd:element type="
|
308 |
-
<xsd:element type="
|
309 |
-
<xsd:element type="
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
<xsd:element type="xsd:string" name="
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
<xsd:
|
320 |
-
|
321 |
-
|
322 |
-
<xsd:
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
<xsd:
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
<xs:element type="xs:
|
368 |
-
<xs:element type="xs:
|
369 |
-
<xs:element type="xs:
|
370 |
-
<xs:element type="xs:
|
371 |
-
<xs:element type="xs:
|
372 |
-
<xs:element type="xs:
|
373 |
-
<xs:element type="xs:
|
374 |
-
<xs:element type="xs:
|
375 |
-
<xs:element type="xs:
|
376 |
-
<xs:element type="xs:
|
377 |
-
<xs:element type="xs:
|
378 |
-
<xs:element type="xs:
|
379 |
-
<xs:element type="
|
380 |
-
<xs:
|
381 |
-
|
382 |
-
|
383 |
-
<xs:element type="
|
384 |
-
<xs:
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
<xs:
|
395 |
-
</xs:restriction>
|
396 |
-
</xs:simpleType>
|
397 |
-
<xs:
|
398 |
-
<xs:
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
</wsdl:
|
408 |
-
<wsdl:message name="
|
409 |
-
<wsdl:part name="parameters" element="tns:
|
410 |
-
</wsdl:message>
|
411 |
-
<wsdl:message name="
|
412 |
-
<wsdl:part name="parameters" element="tns:
|
413 |
-
</wsdl:message>
|
414 |
-
<wsdl:message name="
|
415 |
-
<wsdl:part name="parameters" element="tns:
|
416 |
-
</wsdl:message>
|
417 |
-
<wsdl:message name="
|
418 |
-
<wsdl:part name="parameters" element="tns:
|
419 |
-
</wsdl:message>
|
420 |
-
<wsdl:message name="
|
421 |
-
<wsdl:part name="parameters" element="tns:
|
422 |
-
</wsdl:message>
|
423 |
-
<wsdl:message name="
|
424 |
-
<wsdl:part name="parameters" element="tns:
|
425 |
-
</wsdl:message>
|
426 |
-
<wsdl:
|
427 |
-
<wsdl:
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
<
|
446 |
-
|
447 |
-
<
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
<wsdl:
|
458 |
-
<soap:body use="literal"/>
|
459 |
-
</wsdl:
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
<wsdl:
|
467 |
-
<soap:body use="literal"/>
|
468 |
-
</wsdl:
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
<wsdl:
|
476 |
-
<soap:body use="literal"/>
|
477 |
-
</wsdl:
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
</wsdl:binding>
|
489 |
-
<wsdl:service name="Service_1_0">
|
490 |
-
<wsdl:port name="Service_1_0" binding="tns:Service_1_0">
|
491 |
-
<soap:address location="https://ws.aramex.net/shippingapi/shipping/service_1_0.svc"/>
|
492 |
-
</wsdl:port>
|
493 |
-
</wsdl:service>
|
494 |
</wsdl:definitions>
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tns="http://ws.aramex.net/ShippingAPI/v1/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" name="Service_1_0">
|
3 |
+
<wsdl:types>
|
4 |
+
<xsd:schema targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified">
|
5 |
+
<xsd:element name="ShipmentCreationRequest">
|
6 |
+
<xsd:complexType>
|
7 |
+
<xsd:sequence>
|
8 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
9 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
10 |
+
<xsd:element type="tns:ArrayOfShipment" name="Shipments" nillable="true" minOccurs="0"/>
|
11 |
+
<xsd:element type="tns:LabelInfo" name="LabelInfo" nillable="true" minOccurs="0"/>
|
12 |
+
</xsd:sequence>
|
13 |
+
</xsd:complexType>
|
14 |
+
</xsd:element>
|
15 |
+
<xsd:complexType name="ClientInfo">
|
16 |
+
<xsd:sequence>
|
17 |
+
<xsd:element type="xsd:string" name="UserName" nillable="true"/>
|
18 |
+
<xsd:element type="xsd:string" name="Password" nillable="true"/>
|
19 |
+
<xsd:element type="xsd:string" name="Version" nillable="true"/>
|
20 |
+
<xsd:element type="xsd:string" name="AccountNumber" nillable="true"/>
|
21 |
+
<xsd:element type="xsd:string" name="AccountPin" nillable="true"/>
|
22 |
+
<xsd:element type="xsd:string" name="AccountEntity" nillable="true"/>
|
23 |
+
<xsd:element type="xsd:string" name="AccountCountryCode" nillable="true"/>
|
24 |
+
<xsd:element type="xsd:int" name="Source" nillable="true"/>
|
25 |
+
</xsd:sequence>
|
26 |
+
</xsd:complexType>
|
27 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true"/>
|
28 |
+
<xsd:complexType name="Transaction">
|
29 |
+
<xsd:sequence>
|
30 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true"/>
|
31 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true"/>
|
32 |
+
<xsd:element type="xsd:string" name="Reference3" nillable="true"/>
|
33 |
+
<xsd:element type="xsd:string" name="Reference4" nillable="true"/>
|
34 |
+
<xsd:element type="xsd:string" name="Reference5" nillable="true"/>
|
35 |
+
</xsd:sequence>
|
36 |
+
</xsd:complexType>
|
37 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true"/>
|
38 |
+
<xsd:complexType name="ArrayOfShipment">
|
39 |
+
<xsd:sequence>
|
40 |
+
<xsd:element type="tns:Shipment" name="Shipment" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
41 |
+
</xsd:sequence>
|
42 |
+
</xsd:complexType>
|
43 |
+
<xsd:element type="tns:ArrayOfShipment" name="ArrayOfShipment" nillable="true"/>
|
44 |
+
<xsd:complexType name="Shipment">
|
45 |
+
<xsd:sequence>
|
46 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true" minOccurs="0"/>
|
47 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true" minOccurs="0"/>
|
48 |
+
<xsd:element type="xsd:string" name="Reference3" nillable="true" minOccurs="0"/>
|
49 |
+
<xsd:element type="tns:Party" name="Shipper" nillable="true"/>
|
50 |
+
<xsd:element type="tns:Party" name="Consignee" nillable="true"/>
|
51 |
+
<xsd:element type="tns:Party" name="ThirdParty" nillable="true" minOccurs="0"/>
|
52 |
+
<xsd:element type="xsd:dateTime" name="ShippingDateTime"/>
|
53 |
+
<xsd:element type="xsd:dateTime" name="DueDate" minOccurs="0"/>
|
54 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true" minOccurs="0"/>
|
55 |
+
<xsd:element type="xsd:string" name="PickupLocation" nillable="true" minOccurs="0"/>
|
56 |
+
<xsd:element type="xsd:string" name="OperationsInstructions" nillable="true" minOccurs="0"/>
|
57 |
+
<xsd:element type="xsd:string" name="AccountingInstrcutions" nillable="true" minOccurs="0"/>
|
58 |
+
<xsd:element type="tns:ShipmentDetails" name="Details" nillable="true" minOccurs="0"/>
|
59 |
+
<xsd:element type="tns:ArrayOfAttachment" name="Attachments" nillable="true" minOccurs="0"/>
|
60 |
+
<xsd:element type="xsd:string" name="ForeignHAWB" nillable="true" minOccurs="0"/>
|
61 |
+
<xsd:element type="xsd:int" name="TransportType_x0020_" minOccurs="0"/>
|
62 |
+
<xsd:element type="xsd:string" name="PickupGUID" nillable="true" minOccurs="0"/>
|
63 |
+
<xsd:element minOccurs="0" name="Number" nillable="true" type="xsd:string"/>
|
64 |
+
</xsd:sequence>
|
65 |
+
</xsd:complexType>
|
66 |
+
<xsd:element type="tns:Shipment" name="Shipment" nillable="true"/>
|
67 |
+
<xsd:complexType name="Party">
|
68 |
+
<xsd:sequence>
|
69 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true" minOccurs="0"/>
|
70 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true" minOccurs="0"/>
|
71 |
+
<xsd:element type="xsd:string" name="AccountNumber" nillable="true" minOccurs="0"/>
|
72 |
+
<xsd:element type="tns:Address" name="PartyAddress" nillable="true"/>
|
73 |
+
<xsd:element type="tns:Contact" name="Contact" nillable="true"/>
|
74 |
+
</xsd:sequence>
|
75 |
+
</xsd:complexType>
|
76 |
+
<xsd:element type="tns:Party" name="Party" nillable="true"/>
|
77 |
+
<xsd:complexType name="Address">
|
78 |
+
<xsd:sequence>
|
79 |
+
<xsd:element type="xsd:string" name="Line1" nillable="true"/>
|
80 |
+
<xsd:element type="xsd:string" name="Line2" nillable="true"/>
|
81 |
+
<xsd:element type="xsd:string" name="Line3" nillable="true"/>
|
82 |
+
<xsd:element type="xsd:string" name="City" nillable="true"/>
|
83 |
+
<xsd:element type="xsd:string" name="StateOrProvinceCode" nillable="true" minOccurs="0"/>
|
84 |
+
<xsd:element type="xsd:string" name="PostCode" nillable="true"/>
|
85 |
+
<xsd:element type="xsd:string" name="CountryCode" nillable="true"/>
|
86 |
+
</xsd:sequence>
|
87 |
+
</xsd:complexType>
|
88 |
+
<xsd:element type="tns:Address" name="Address" nillable="true"/>
|
89 |
+
<xsd:complexType name="Contact">
|
90 |
+
<xsd:sequence>
|
91 |
+
<xsd:element type="xsd:string" name="Department" nillable="true" minOccurs="0"/>
|
92 |
+
<xsd:element type="xsd:string" name="PersonName" nillable="true"/>
|
93 |
+
<xsd:element type="xsd:string" name="Title" nillable="true" minOccurs="0"/>
|
94 |
+
<xsd:element type="xsd:string" name="CompanyName" nillable="true" minOccurs="0"/>
|
95 |
+
<xsd:element type="xsd:string" name="PhoneNumber1" nillable="true"/>
|
96 |
+
<xsd:element type="xsd:string" name="PhoneNumber1Ext" nillable="true" minOccurs="0"/>
|
97 |
+
<xsd:element type="xsd:string" name="PhoneNumber2" nillable="true"/>
|
98 |
+
<xsd:element type="xsd:string" name="PhoneNumber2Ext" nillable="true" minOccurs="0"/>
|
99 |
+
<xsd:element type="xsd:string" name="FaxNumber" nillable="true" minOccurs="0"/>
|
100 |
+
<xsd:element type="xsd:string" name="CellPhone" nillable="true" minOccurs="0"/>
|
101 |
+
<xsd:element type="xsd:string" name="EmailAddress" nillable="true" minOccurs="0"/>
|
102 |
+
<xsd:element type="xsd:string" name="Type" nillable="true"/>
|
103 |
+
</xsd:sequence>
|
104 |
+
</xsd:complexType>
|
105 |
+
<xsd:element type="tns:Contact" name="Contact" nillable="true"/>
|
106 |
+
<xsd:complexType name="ShipmentDetails">
|
107 |
+
<xsd:sequence>
|
108 |
+
<xsd:element type="tns:Dimensions" name="Dimensions" nillable="true"/>
|
109 |
+
<xsd:element type="tns:Weight" name="ActualWeight" nillable="true"/>
|
110 |
+
<xsd:element type="tns:Weight" name="ChargeableWeight" nillable="true"/>
|
111 |
+
<xsd:element type="xsd:string" name="DescriptionOfGoods" nillable="true"/>
|
112 |
+
<xsd:element type="xsd:string" name="GoodsOriginCountry" nillable="true"/>
|
113 |
+
<xsd:element type="xsd:int" name="NumberOfPieces"/>
|
114 |
+
<xsd:element type="xsd:string" name="ProductGroup" nillable="true"/>
|
115 |
+
<xsd:element type="xsd:string" name="ProductType" nillable="true"/>
|
116 |
+
<xsd:element type="xsd:string" name="PaymentType" nillable="true"/>
|
117 |
+
<xsd:element type="xsd:string" name="PaymentOptions" nillable="true"/>
|
118 |
+
<xsd:element type="tns:Money" name="CustomsValueAmount" nillable="true" minOccurs="0"/>
|
119 |
+
<xsd:element type="tns:Money" name="CashOnDeliveryAmount" nillable="true" minOccurs="0"/>
|
120 |
+
<xsd:element type="tns:Money" name="InsuranceAmount" nillable="true" minOccurs="0"/>
|
121 |
+
<xsd:element type="tns:Money" name="CashAdditionalAmount" nillable="true" minOccurs="0"/>
|
122 |
+
<xsd:element type="xsd:string" name="CashAdditionalAmountDescription" nillable="true" minOccurs="0"/>
|
123 |
+
<xsd:element type="tns:Money" name="CollectAmount" nillable="true" minOccurs="0"/>
|
124 |
+
<xsd:element type="xsd:string" name="Services" nillable="true" minOccurs="0"/>
|
125 |
+
<xsd:element type="tns:ArrayOfShipmentItem" name="Items" nillable="true" minOccurs="0"/>
|
126 |
+
</xsd:sequence>
|
127 |
+
</xsd:complexType>
|
128 |
+
<xsd:element type="tns:ShipmentDetails" name="ShipmentDetails" nillable="true"/>
|
129 |
+
<xsd:complexType name="Dimensions">
|
130 |
+
<xsd:sequence>
|
131 |
+
<xsd:element type="xsd:double" name="Length"/>
|
132 |
+
<xsd:element type="xsd:double" name="Width"/>
|
133 |
+
<xsd:element type="xsd:double" name="Height"/>
|
134 |
+
<xsd:element type="xsd:string" name="Unit" nillable="true"/>
|
135 |
+
</xsd:sequence>
|
136 |
+
</xsd:complexType>
|
137 |
+
<xsd:element type="tns:Dimensions" name="Dimensions" nillable="true"/>
|
138 |
+
<xsd:complexType name="Weight">
|
139 |
+
<xsd:sequence>
|
140 |
+
<xsd:element type="xsd:string" name="Unit" nillable="true"/>
|
141 |
+
<xsd:element type="xsd:double" name="Value"/>
|
142 |
+
</xsd:sequence>
|
143 |
+
</xsd:complexType>
|
144 |
+
<xsd:element type="tns:Weight" name="Weight" nillable="true"/>
|
145 |
+
<xsd:complexType name="Money">
|
146 |
+
<xsd:sequence>
|
147 |
+
<xsd:element type="xsd:string" name="CurrencyCode" nillable="true"/>
|
148 |
+
<xsd:element type="xsd:double" name="Value"/>
|
149 |
+
</xsd:sequence>
|
150 |
+
</xsd:complexType>
|
151 |
+
<xsd:element type="tns:Money" name="Money" nillable="true"/>
|
152 |
+
<xsd:complexType name="ArrayOfShipmentItem">
|
153 |
+
<xsd:sequence>
|
154 |
+
<xsd:element type="tns:ShipmentItem" name="ShipmentItem" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
155 |
+
</xsd:sequence>
|
156 |
+
</xsd:complexType>
|
157 |
+
<xsd:element type="tns:ArrayOfShipmentItem" name="ArrayOfShipmentItem" nillable="true"/>
|
158 |
+
<xsd:complexType name="ShipmentItem">
|
159 |
+
<xsd:sequence>
|
160 |
+
<xsd:element type="xsd:string" name="PackageType" nillable="true"/>
|
161 |
+
<xsd:element type="xsd:int" name="Quantity"/>
|
162 |
+
<xsd:element type="tns:Weight" name="Weight" nillable="true"/>
|
163 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true" minOccurs="0"/>
|
164 |
+
<xsd:element type="xsd:string" name="Reference" nillable="true" minOccurs="0"/>
|
165 |
+
</xsd:sequence>
|
166 |
+
</xsd:complexType>
|
167 |
+
<xsd:element type="tns:ShipmentItem" name="ShipmentItem" nillable="true"/>
|
168 |
+
<xsd:complexType name="ArrayOfAttachment">
|
169 |
+
<xsd:sequence>
|
170 |
+
<xsd:element type="tns:Attachment" name="Attachment" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
171 |
+
</xsd:sequence>
|
172 |
+
</xsd:complexType>
|
173 |
+
<xsd:element type="tns:ArrayOfAttachment" name="ArrayOfAttachment" nillable="true"/>
|
174 |
+
<xsd:complexType name="Attachment">
|
175 |
+
<xsd:sequence>
|
176 |
+
<xsd:element type="xsd:string" name="FileName" nillable="true"/>
|
177 |
+
<xsd:element type="xsd:string" name="FileExtension" nillable="true"/>
|
178 |
+
<xsd:element type="xsd:base64Binary" name="FileContents" nillable="true"/>
|
179 |
+
</xsd:sequence>
|
180 |
+
</xsd:complexType>
|
181 |
+
<xsd:element type="tns:Attachment" name="Attachment" nillable="true"/>
|
182 |
+
<xsd:complexType name="LabelInfo">
|
183 |
+
<xsd:sequence>
|
184 |
+
<xsd:element type="xsd:int" name="ReportID"/>
|
185 |
+
<xsd:element type="xsd:string" name="ReportType" nillable="true"/>
|
186 |
+
</xsd:sequence>
|
187 |
+
</xsd:complexType>
|
188 |
+
<xsd:element type="tns:LabelInfo" name="LabelInfo" nillable="true"/>
|
189 |
+
<xsd:element name="ShipmentCreationResponse">
|
190 |
+
<xsd:complexType>
|
191 |
+
<xsd:sequence>
|
192 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
193 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
194 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
195 |
+
<xsd:element type="tns:ArrayOfProcessedShipment" name="Shipments" nillable="true" minOccurs="0"/>
|
196 |
+
</xsd:sequence>
|
197 |
+
</xsd:complexType>
|
198 |
+
</xsd:element>
|
199 |
+
<xsd:complexType name="ArrayOfNotification">
|
200 |
+
<xsd:sequence>
|
201 |
+
<xsd:element type="tns:Notification" name="Notification" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
202 |
+
</xsd:sequence>
|
203 |
+
</xsd:complexType>
|
204 |
+
<xsd:element type="tns:ArrayOfNotification" name="ArrayOfNotification" nillable="true"/>
|
205 |
+
<xsd:complexType name="Notification">
|
206 |
+
<xsd:sequence>
|
207 |
+
<xsd:element type="xsd:string" name="Code" nillable="true"/>
|
208 |
+
<xsd:element type="xsd:string" name="Message" nillable="true"/>
|
209 |
+
</xsd:sequence>
|
210 |
+
</xsd:complexType>
|
211 |
+
<xsd:element type="tns:Notification" name="Notification" nillable="true"/>
|
212 |
+
<xsd:complexType name="ArrayOfProcessedShipment">
|
213 |
+
<xsd:sequence>
|
214 |
+
<xsd:element type="tns:ProcessedShipment" name="ProcessedShipment" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
215 |
+
</xsd:sequence>
|
216 |
+
</xsd:complexType>
|
217 |
+
<xsd:element type="tns:ArrayOfProcessedShipment" name="ArrayOfProcessedShipment" nillable="true"/>
|
218 |
+
<xsd:complexType name="ProcessedShipment">
|
219 |
+
<xsd:sequence>
|
220 |
+
<xsd:element type="xsd:string" name="ID" nillable="true"/>
|
221 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true"/>
|
222 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true"/>
|
223 |
+
<xsd:element type="xsd:string" name="Reference3" nillable="true"/>
|
224 |
+
<xsd:element type="xsd:string" name="ForeignHAWB" nillable="true"/>
|
225 |
+
<xsd:element type="xsd:boolean" name="HasErrors"/>
|
226 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true"/>
|
227 |
+
<xsd:element type="tns:ShipmentLabel" name="ShipmentLabel" nillable="true"/>
|
228 |
+
</xsd:sequence>
|
229 |
+
</xsd:complexType>
|
230 |
+
<xsd:element type="tns:ProcessedShipment" name="ProcessedShipment" nillable="true"/>
|
231 |
+
<xsd:complexType name="ShipmentLabel">
|
232 |
+
<xsd:sequence>
|
233 |
+
<xsd:element type="xsd:string" name="LabelURL" nillable="true"/>
|
234 |
+
<xsd:element type="xsd:base64Binary" name="LabelFileContents" nillable="true"/>
|
235 |
+
</xsd:sequence>
|
236 |
+
</xsd:complexType>
|
237 |
+
<xsd:element type="tns:ShipmentLabel" name="ShipmentLabel" nillable="true"/>
|
238 |
+
<xsd:element name="LabelPrintingRequest">
|
239 |
+
<xsd:complexType>
|
240 |
+
<xsd:sequence>
|
241 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
242 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
243 |
+
<xsd:element type="xsd:string" name="ShipmentNumber" nillable="true" minOccurs="0"/>
|
244 |
+
<xsd:element type="xsd:string" name="ProductGroup" nillable="true" minOccurs="0"/>
|
245 |
+
<xsd:element type="xsd:string" name="OriginEntity" nillable="true" minOccurs="0"/>
|
246 |
+
<xsd:element type="tns:LabelInfo" name="LabelInfo" nillable="true" minOccurs="0"/>
|
247 |
+
</xsd:sequence>
|
248 |
+
</xsd:complexType>
|
249 |
+
</xsd:element>
|
250 |
+
<xsd:element name="LabelPrintingResponse">
|
251 |
+
<xsd:complexType>
|
252 |
+
<xsd:sequence>
|
253 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
254 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
255 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
256 |
+
<xsd:element type="xsd:string" name="ShipmentNumber" nillable="true" minOccurs="0"/>
|
257 |
+
<xsd:element type="tns:ShipmentLabel" name="ShipmentLabel" nillable="true" minOccurs="0"/>
|
258 |
+
</xsd:sequence>
|
259 |
+
</xsd:complexType>
|
260 |
+
</xsd:element>
|
261 |
+
<xsd:element name="PickupCreationRequest">
|
262 |
+
<xsd:complexType>
|
263 |
+
<xsd:sequence>
|
264 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
265 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
266 |
+
<xsd:element type="tns:Pickup" name="Pickup" nillable="true" minOccurs="0"/>
|
267 |
+
<xsd:element type="tns:LabelInfo" name="LabelInfo" nillable="true" minOccurs="0"/>
|
268 |
+
</xsd:sequence>
|
269 |
+
</xsd:complexType>
|
270 |
+
</xsd:element>
|
271 |
+
<xsd:complexType name="Pickup">
|
272 |
+
<xsd:sequence>
|
273 |
+
<xsd:element type="tns:Address" name="PickupAddress" nillable="true"/>
|
274 |
+
<xsd:element type="tns:Contact" name="PickupContact" nillable="true"/>
|
275 |
+
<xsd:element type="xsd:string" name="PickupLocation" nillable="true"/>
|
276 |
+
<xsd:element type="xsd:dateTime" name="PickupDate"/>
|
277 |
+
<xsd:element type="xsd:dateTime" name="ReadyTime"/>
|
278 |
+
<xsd:element type="xsd:dateTime" name="LastPickupTime"/>
|
279 |
+
<xsd:element type="xsd:dateTime" name="ClosingTime"/>
|
280 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true"/>
|
281 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true" minOccurs="0"/>
|
282 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true" minOccurs="0"/>
|
283 |
+
<xsd:element type="xsd:string" name="Vehicle" nillable="true"/>
|
284 |
+
<xsd:element type="tns:ArrayOfShipment" name="Shipments" nillable="true" minOccurs="0"/>
|
285 |
+
<xsd:element type="tns:ArrayOfPickupItemDetail" name="PickupItems" nillable="true"/>
|
286 |
+
<xsd:element type="xsd:string" name="Status" nillable="true" minOccurs="0"/>
|
287 |
+
</xsd:sequence>
|
288 |
+
</xsd:complexType>
|
289 |
+
<xsd:element type="tns:Pickup" name="Pickup" nillable="true"/>
|
290 |
+
<xsd:complexType name="ArrayOfPickupItemDetail">
|
291 |
+
<xsd:sequence>
|
292 |
+
<xsd:element type="tns:PickupItemDetail" name="PickupItemDetail" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
293 |
+
</xsd:sequence>
|
294 |
+
</xsd:complexType>
|
295 |
+
<xsd:element type="tns:ArrayOfPickupItemDetail" name="ArrayOfPickupItemDetail" nillable="true"/>
|
296 |
+
<xsd:complexType name="PickupItemDetail">
|
297 |
+
<xsd:sequence>
|
298 |
+
<xsd:element type="xsd:string" name="ProductGroup" nillable="true"/>
|
299 |
+
<xsd:element type="xsd:string" name="ProductType" nillable="true"/>
|
300 |
+
<xsd:element type="xsd:int" name="NumberOfShipments"/>
|
301 |
+
<xsd:element type="xsd:string" name="PackageType" nillable="true"/>
|
302 |
+
<xsd:element type="xsd:string" name="Payment" nillable="true"/>
|
303 |
+
<xsd:element type="tns:Weight" name="ShipmentWeight" nillable="true"/>
|
304 |
+
<xsd:element type="tns:Volume" name="ShipmentVolume" nillable="true"/>
|
305 |
+
<xsd:element type="xsd:int" name="NumberOfPieces"/>
|
306 |
+
<xsd:element type="tns:Money" name="CashAmount" nillable="true"/>
|
307 |
+
<xsd:element type="tns:Money" name="ExtraCharges" nillable="true"/>
|
308 |
+
<xsd:element type="tns:Dimensions" name="ShipmentDimensions" nillable="true"/>
|
309 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true"/>
|
310 |
+
</xsd:sequence>
|
311 |
+
</xsd:complexType>
|
312 |
+
<xsd:element type="tns:PickupItemDetail" name="PickupItemDetail" nillable="true"/>
|
313 |
+
<xsd:complexType name="Volume">
|
314 |
+
<xsd:sequence>
|
315 |
+
<xsd:element type="xsd:string" name="Unit" nillable="true"/>
|
316 |
+
<xsd:element type="xsd:double" name="Value"/>
|
317 |
+
</xsd:sequence>
|
318 |
+
</xsd:complexType>
|
319 |
+
<xsd:element type="tns:Volume" name="Volume" nillable="true"/>
|
320 |
+
<xsd:element name="PickupCreationResponse">
|
321 |
+
<xsd:complexType>
|
322 |
+
<xsd:sequence>
|
323 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
324 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
325 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
326 |
+
<xsd:element type="tns:ProcessedPickup" name="ProcessedPickup" nillable="true" minOccurs="0"/>
|
327 |
+
</xsd:sequence>
|
328 |
+
</xsd:complexType>
|
329 |
+
</xsd:element>
|
330 |
+
<xsd:complexType name="ProcessedPickup">
|
331 |
+
<xsd:sequence>
|
332 |
+
<xsd:element type="xsd:string" name="ID" nillable="true"/>
|
333 |
+
<xsd:element type="ser:guid" name="GUID"/>
|
334 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true"/>
|
335 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true"/>
|
336 |
+
<xsd:element type="tns:ArrayOfProcessedShipment" name="ProcessedShipments" nillable="true"/>
|
337 |
+
</xsd:sequence>
|
338 |
+
</xsd:complexType>
|
339 |
+
<xsd:element type="tns:ProcessedPickup" name="ProcessedPickup" nillable="true"/>
|
340 |
+
<xsd:element name="PickupCancelationRequest">
|
341 |
+
<xsd:complexType>
|
342 |
+
<xsd:sequence>
|
343 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
344 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
345 |
+
<xsd:element type="xsd:string" name="PickupGUID" nillable="true" minOccurs="0"/>
|
346 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true" minOccurs="0"/>
|
347 |
+
</xsd:sequence>
|
348 |
+
</xsd:complexType>
|
349 |
+
</xsd:element>
|
350 |
+
<xsd:element name="PickupCancelationResponse">
|
351 |
+
<xsd:complexType>
|
352 |
+
<xsd:sequence>
|
353 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
354 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
355 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
356 |
+
</xsd:sequence>
|
357 |
+
</xsd:complexType>
|
358 |
+
</xsd:element>
|
359 |
+
</xsd:schema>
|
360 |
+
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified">
|
361 |
+
<xs:element type="xs:anyType" name="anyType" nillable="true"/>
|
362 |
+
<xs:element type="xs:anyURI" name="anyURI" nillable="true"/>
|
363 |
+
<xs:element type="xs:base64Binary" name="base64Binary" nillable="true"/>
|
364 |
+
<xs:element type="xs:boolean" name="boolean" nillable="true"/>
|
365 |
+
<xs:element type="xs:byte" name="byte" nillable="true"/>
|
366 |
+
<xs:element type="xs:dateTime" name="dateTime" nillable="true"/>
|
367 |
+
<xs:element type="xs:decimal" name="decimal" nillable="true"/>
|
368 |
+
<xs:element type="xs:double" name="double" nillable="true"/>
|
369 |
+
<xs:element type="xs:float" name="float" nillable="true"/>
|
370 |
+
<xs:element type="xs:int" name="int" nillable="true"/>
|
371 |
+
<xs:element type="xs:long" name="long" nillable="true"/>
|
372 |
+
<xs:element type="xs:QName" name="QName" nillable="true"/>
|
373 |
+
<xs:element type="xs:short" name="short" nillable="true"/>
|
374 |
+
<xs:element type="xs:string" name="string" nillable="true"/>
|
375 |
+
<xs:element type="xs:unsignedByte" name="unsignedByte" nillable="true"/>
|
376 |
+
<xs:element type="xs:unsignedInt" name="unsignedInt" nillable="true"/>
|
377 |
+
<xs:element type="xs:unsignedLong" name="unsignedLong" nillable="true"/>
|
378 |
+
<xs:element type="xs:unsignedShort" name="unsignedShort" nillable="true"/>
|
379 |
+
<xs:element type="tns:char" name="char" nillable="true"/>
|
380 |
+
<xs:simpleType name="char">
|
381 |
+
<xs:restriction base="xs:int"/>
|
382 |
+
</xs:simpleType>
|
383 |
+
<xs:element type="tns:duration" name="duration" nillable="true"/>
|
384 |
+
<xs:simpleType name="duration">
|
385 |
+
<xs:restriction base="xs:duration">
|
386 |
+
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
|
387 |
+
<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
|
388 |
+
<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
|
389 |
+
</xs:restriction>
|
390 |
+
</xs:simpleType>
|
391 |
+
<xs:element type="tns:guid" name="guid" nillable="true"/>
|
392 |
+
<xs:simpleType name="guid">
|
393 |
+
<xs:restriction base="xs:string">
|
394 |
+
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
|
395 |
+
</xs:restriction>
|
396 |
+
</xs:simpleType>
|
397 |
+
<xs:attribute type="xs:QName" name="FactoryType"/>
|
398 |
+
<xs:attribute type="xs:ID" name="Id"/>
|
399 |
+
<xs:attribute type="xs:IDREF" name="Ref"/>
|
400 |
+
</xs:schema>
|
401 |
+
</wsdl:types>
|
402 |
+
<wsdl:message name="ShipmentCreationRequest">
|
403 |
+
<wsdl:part name="parameters" element="tns:ShipmentCreationRequest"/>
|
404 |
+
</wsdl:message>
|
405 |
+
<wsdl:message name="ShipmentCreationResponse">
|
406 |
+
<wsdl:part name="parameters" element="tns:ShipmentCreationResponse"/>
|
407 |
+
</wsdl:message>
|
408 |
+
<wsdl:message name="LabelPrintingRequest">
|
409 |
+
<wsdl:part name="parameters" element="tns:LabelPrintingRequest"/>
|
410 |
+
</wsdl:message>
|
411 |
+
<wsdl:message name="LabelPrintingResponse">
|
412 |
+
<wsdl:part name="parameters" element="tns:LabelPrintingResponse"/>
|
413 |
+
</wsdl:message>
|
414 |
+
<wsdl:message name="PickupCreationRequest">
|
415 |
+
<wsdl:part name="parameters" element="tns:PickupCreationRequest"/>
|
416 |
+
</wsdl:message>
|
417 |
+
<wsdl:message name="PickupCreationResponse">
|
418 |
+
<wsdl:part name="parameters" element="tns:PickupCreationResponse"/>
|
419 |
+
</wsdl:message>
|
420 |
+
<wsdl:message name="PickupCancelationRequest">
|
421 |
+
<wsdl:part name="parameters" element="tns:PickupCancelationRequest"/>
|
422 |
+
</wsdl:message>
|
423 |
+
<wsdl:message name="PickupCancelationResponse">
|
424 |
+
<wsdl:part name="parameters" element="tns:PickupCancelationResponse"/>
|
425 |
+
</wsdl:message>
|
426 |
+
<wsdl:portType name="Service_1_0">
|
427 |
+
<wsdl:operation name="CreateShipments">
|
428 |
+
<wsdl:input name="ShipmentCreationRequest" message="tns:ShipmentCreationRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipments"/>
|
429 |
+
<wsdl:output name="ShipmentCreationResponse" message="tns:ShipmentCreationResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipmentsResponse"/>
|
430 |
+
</wsdl:operation>
|
431 |
+
<wsdl:operation name="PrintLabel">
|
432 |
+
<wsdl:input name="LabelPrintingRequest" message="tns:LabelPrintingRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/PrintLabel"/>
|
433 |
+
<wsdl:output name="LabelPrintingResponse" message="tns:LabelPrintingResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/PrintLabelResponse"/>
|
434 |
+
</wsdl:operation>
|
435 |
+
<wsdl:operation name="CreatePickup">
|
436 |
+
<wsdl:input name="PickupCreationRequest" message="tns:PickupCreationRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreatePickup"/>
|
437 |
+
<wsdl:output name="PickupCreationResponse" message="tns:PickupCreationResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreatePickupResponse"/>
|
438 |
+
</wsdl:operation>
|
439 |
+
<wsdl:operation name="CancelPickup">
|
440 |
+
<wsdl:input name="PickupCancelationRequest" message="tns:PickupCancelationRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CancelPickup"/>
|
441 |
+
<wsdl:output name="PickupCancelationResponse" message="tns:PickupCancelationResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CancelPickupResponse"/>
|
442 |
+
</wsdl:operation>
|
443 |
+
</wsdl:portType>
|
444 |
+
<wsdl:binding type="tns:Service_1_0" name="Service_1_0">
|
445 |
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
|
446 |
+
<wsdl:operation name="CreateShipments">
|
447 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipments"/>
|
448 |
+
<wsdl:input name="ShipmentCreationRequest">
|
449 |
+
<soap:body use="literal"/>
|
450 |
+
</wsdl:input>
|
451 |
+
<wsdl:output name="ShipmentCreationResponse">
|
452 |
+
<soap:body use="literal"/>
|
453 |
+
</wsdl:output>
|
454 |
+
</wsdl:operation>
|
455 |
+
<wsdl:operation name="PrintLabel">
|
456 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/PrintLabel"/>
|
457 |
+
<wsdl:input name="LabelPrintingRequest">
|
458 |
+
<soap:body use="literal"/>
|
459 |
+
</wsdl:input>
|
460 |
+
<wsdl:output name="LabelPrintingResponse">
|
461 |
+
<soap:body use="literal"/>
|
462 |
+
</wsdl:output>
|
463 |
+
</wsdl:operation>
|
464 |
+
<wsdl:operation name="CreatePickup">
|
465 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreatePickup"/>
|
466 |
+
<wsdl:input name="PickupCreationRequest">
|
467 |
+
<soap:body use="literal"/>
|
468 |
+
</wsdl:input>
|
469 |
+
<wsdl:output name="PickupCreationResponse">
|
470 |
+
<soap:body use="literal"/>
|
471 |
+
</wsdl:output>
|
472 |
+
</wsdl:operation>
|
473 |
+
<wsdl:operation name="CancelPickup">
|
474 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CancelPickup"/>
|
475 |
+
<wsdl:input name="PickupCancelationRequest">
|
476 |
+
<soap:body use="literal"/>
|
477 |
+
</wsdl:input>
|
478 |
+
<wsdl:output name="PickupCancelationResponse">
|
479 |
+
<soap:body use="literal"/>
|
480 |
+
</wsdl:output>
|
481 |
+
</wsdl:operation>
|
482 |
+
</wsdl:binding>
|
483 |
+
<wsdl:service name="Service_1_0">
|
484 |
+
<wsdl:port name="Service_1_0" binding="tns:Service_1_0">
|
485 |
+
<soap:address location="https://ws.aramex.net/shippingapi/shipping/service_1_0.svc"/>
|
486 |
+
</wsdl:port>
|
487 |
+
</wsdl:service>
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
</wsdl:definitions>
|
app/code/community/Aramex/Shipping/Model/Carrier/Aramex.php
CHANGED
@@ -1,329 +1,329 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Magento
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-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 Mage
|
23 |
-
* @package Mage_Usa
|
24 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
25 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
-
*/
|
27 |
-
class Aramex_Shipping_Model_Carrier_Aramex extends Mage_Usa_Model_Shipping_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
28 |
-
|
29 |
-
protected $_code = 'aramex';
|
30 |
-
protected $_request = null;
|
31 |
-
protected $_result = null;
|
32 |
-
protected $_defaultGatewayUrl = null;
|
33 |
-
|
34 |
-
function __construct()
|
35 |
-
{
|
36 |
-
$this->_defaultGatewayUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . '
|
37 |
-
}
|
38 |
-
|
39 |
-
protected function _doShipmentRequest(Varien_Object $request)
|
40 |
-
{
|
41 |
-
return $result;
|
42 |
-
}
|
43 |
-
|
44 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
45 |
-
{
|
46 |
-
if (!$this->getConfigFlag($this->_activeFlag)) {
|
47 |
-
return false;
|
48 |
-
}
|
49 |
-
|
50 |
-
$this->setRequest($request);
|
51 |
-
|
52 |
-
$this->_result = $this->_getQuotes();
|
53 |
-
|
54 |
-
$this->_updateFreeMethodQuote($request);
|
55 |
-
|
56 |
-
return $this->getResult();
|
57 |
-
}
|
58 |
-
|
59 |
-
public function setRequest(Mage_Shipping_Model_Rate_Request $request) {
|
60 |
-
$this->_request = $request;
|
61 |
-
|
62 |
-
$r = new Varien_Object();
|
63 |
-
|
64 |
-
if ($request->getLimitMethod()) {
|
65 |
-
$r->setService($request->getLimitMethod());
|
66 |
-
} else {
|
67 |
-
$r->setService('ALL');
|
68 |
-
}
|
69 |
-
|
70 |
-
if ($request->getAramexUserid()) {
|
71 |
-
$userId = $request->getAramexUserid();
|
72 |
-
} else {
|
73 |
-
$userId = $this->getConfigData('userid');
|
74 |
-
}
|
75 |
-
$r->setUserId($userId);
|
76 |
-
|
77 |
-
if ($request->getAramexContainer()) {
|
78 |
-
$container = $request->getAramexContainer();
|
79 |
-
} else {
|
80 |
-
$container = $this->getConfigData('container');
|
81 |
-
}
|
82 |
-
$r->setContainer($container);
|
83 |
-
|
84 |
-
if ($request->getAramexSize()) {
|
85 |
-
$size = $request->getAramexSize();
|
86 |
-
} else {
|
87 |
-
$size = $this->getConfigData('size');
|
88 |
-
}
|
89 |
-
$r->setSize($size);
|
90 |
-
|
91 |
-
if ($request->getAramexMachinable()) {
|
92 |
-
$machinable = $request->getAramexMachinable();
|
93 |
-
} else {
|
94 |
-
$machinable = $this->getConfigData('machinable');
|
95 |
-
}
|
96 |
-
$r->setMachinable($machinable);
|
97 |
-
|
98 |
-
if ($request->getOrigPostcode()) {
|
99 |
-
$r->setOrigPostal($request->getOrigPostcode());
|
100 |
-
} else {
|
101 |
-
$r->setOrigPostal(Mage::getStoreConfig('shipping/origin/postcode'));
|
102 |
-
}
|
103 |
-
|
104 |
-
if ($request->getDestCountryId()) {
|
105 |
-
$destCountry = $request->getDestCountryId();
|
106 |
-
} else {
|
107 |
-
$destCountry = self::USA_COUNTRY_ID;
|
108 |
-
}
|
109 |
-
|
110 |
-
$r->setDestCountryId($destCountry);
|
111 |
-
|
112 |
-
|
113 |
-
$countries = Mage::getResourceModel('directory/country_collection')
|
114 |
-
->addCountryIdFilter($destCountry)
|
115 |
-
->load()
|
116 |
-
->getItems();
|
117 |
-
$country = array_shift($countries);
|
118 |
-
$countryName = $country->getName();
|
119 |
-
|
120 |
-
$r->setDestCountryName($countryName);
|
121 |
-
|
122 |
-
if ($request->getDestPostcode()) {
|
123 |
-
$r->setDestPostal($request->getDestPostcode());
|
124 |
-
}
|
125 |
-
|
126 |
-
$weight = $this->getTotalNumOfBoxes($request->getPackageWeight());
|
127 |
-
$r->setWeightPounds(floor($weight));
|
128 |
-
$r->setWeightOunces(round(($weight - floor($weight)) * 16, 1));
|
129 |
-
if ($request->getFreeMethodWeight() != $request->getPackageWeight()) {
|
130 |
-
$r->setFreeMethodWeight($request->getFreeMethodWeight());
|
131 |
-
}
|
132 |
-
|
133 |
-
$r->setValue($request->getPackageValue());
|
134 |
-
$r->setValueWithDiscount($request->getPackageValueWithDiscount());
|
135 |
-
|
136 |
-
$this->_rawRequest = $r;
|
137 |
-
|
138 |
-
return $this;
|
139 |
-
}
|
140 |
-
|
141 |
-
public function getCode($type, $code='') {
|
142 |
-
return false;
|
143 |
-
}
|
144 |
-
|
145 |
-
protected function _getQuotes() {
|
146 |
-
return false;
|
147 |
-
}
|
148 |
-
|
149 |
-
public function getResult() {
|
150 |
-
return $this->_result;
|
151 |
-
}
|
152 |
-
|
153 |
-
protected function _setFreeMethodRequest($freeMethod) {
|
154 |
-
$r = $this->_rawRequest;
|
155 |
-
|
156 |
-
$weight = $this->getTotalNumOfBoxes($r->getFreeMethodWeight());
|
157 |
-
$r->setWeightPounds(floor($weight));
|
158 |
-
$r->setWeightOunces(round(($weight - floor($weight)) * 16, 1));
|
159 |
-
$r->setService($freeMethod);
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Get allowed shipping methods
|
164 |
-
*
|
165 |
-
* @return array
|
166 |
-
*/
|
167 |
-
public function getAllowedMethods()
|
168 |
-
{
|
169 |
-
$allowed = explode(',', $this->getConfigData('allowed_methods'));
|
170 |
-
$arr = array();
|
171 |
-
foreach ($allowed as $k) {
|
172 |
-
$arr[$k] = $this->getCode('method', $k);
|
173 |
-
}
|
174 |
-
return $arr;
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Return array of authenticated information
|
179 |
-
*
|
180 |
-
* @return array
|
181 |
-
*/
|
182 |
-
protected function _getAuthDetails()
|
183 |
-
{
|
184 |
-
return array(
|
185 |
-
'ClientInfo' => array(
|
186 |
-
'AccountCountryCode' => Mage::getStoreConfig('aramexsettings/settings/account_country_code'),
|
187 |
-
'AccountEntity' => Mage::getStoreConfig('aramexsettings/settings/account_entity'),
|
188 |
-
'AccountNumber' => Mage::getStoreConfig('aramexsettings/settings/account_number'),
|
189 |
-
'AccountPin' => Mage::getStoreConfig('aramexsettings/settings/account_pin'),
|
190 |
-
'UserName' => Mage::getStoreConfig('aramexsettings/settings/user_name'),
|
191 |
-
'Password' => Mage::getStoreConfig('aramexsettings/settings/password'),
|
192 |
-
'Version' => 'v1.0'
|
193 |
-
)
|
194 |
-
);
|
195 |
-
}
|
196 |
-
|
197 |
-
public function getTracking($trackings) {
|
198 |
-
$this->setTrackingReqeust();
|
199 |
-
|
200 |
-
if (!is_array($trackings)) {
|
201 |
-
$trackings = array($trackings);
|
202 |
-
}
|
203 |
-
|
204 |
-
$this->_getXmlTracking($trackings);
|
205 |
-
|
206 |
-
return $this->_result;
|
207 |
-
}
|
208 |
-
|
209 |
-
protected function setTrackingReqeust() {
|
210 |
-
$r = new Varien_Object();
|
211 |
-
|
212 |
-
$userId = $this->getConfigData('userid');
|
213 |
-
$r->setUserId($userId);
|
214 |
-
|
215 |
-
$this->_rawTrackRequest = $r;
|
216 |
-
}
|
217 |
-
|
218 |
-
protected function _getXmlTracking($trackings) {
|
219 |
-
$r = $this->_rawTrackRequest;
|
220 |
-
|
221 |
-
foreach ($trackings as $tracking) {
|
222 |
-
$this->_parseXmlTrackingResponse($tracking);
|
223 |
-
}
|
224 |
-
}
|
225 |
-
|
226 |
-
protected function _parseXmlTrackingResponse($trackingvalue) {
|
227 |
-
$resultArr = array();
|
228 |
-
|
229 |
-
if (!$this->_result) {
|
230 |
-
$this->_result = Mage::getModel('shipping/tracking_result');
|
231 |
-
}
|
232 |
-
$defaults = $this->getDefaults();
|
233 |
-
|
234 |
-
//$url = 'http://localhost:8080/soap_test/wsdl/Tracking.wsdl';
|
235 |
-
//if (!$url) {
|
236 |
-
$url = $this->_defaultGatewayUrl;
|
237 |
-
//}
|
238 |
-
|
239 |
-
$clientAramex = new SoapClient($url);
|
240 |
-
$aramexParams = $this->_getAuthDetails();
|
241 |
-
|
242 |
-
$aramexParams['Transaction'] = array('Reference1' => '001' );
|
243 |
-
$aramexParams['Shipments'] = array($trackingvalue);
|
244 |
-
|
245 |
-
$_resAramex = $clientAramex->TrackShipments($aramexParams);
|
246 |
-
|
247 |
-
if(is_object($_resAramex) && !$_resAramex->HasErrors){
|
248 |
-
$tracking = Mage::getModel('shipping/tracking_result_status');
|
249 |
-
$tracking->setCarrier('aramex');
|
250 |
-
$tracking->setCarrierTitle($this->getConfigData('title'));
|
251 |
-
$tracking->setTracking($trackingvalue);
|
252 |
-
if(!empty($_resAramex->TrackingResults->KeyValueOfstringArrayOfTrackingResultmFAkxlpY->Value->TrackingResult)){
|
253 |
-
$tracking->setTrackSummary($this->getTrackingInfoTable($_resAramex->TrackingResults->KeyValueOfstringArrayOfTrackingResultmFAkxlpY->Value->TrackingResult));
|
254 |
-
} else {
|
255 |
-
$tracking->setTrackSummary('Unable to retrieve quotes, please check if the Tracking Number is valid or contact your administrator.');
|
256 |
-
}
|
257 |
-
$this->_result->append($tracking);
|
258 |
-
} else {
|
259 |
-
$errorMessage = '';
|
260 |
-
foreach($_resAramex->Notifications as $notification){
|
261 |
-
$errorMessage .= '<b>' . $notification->Code . '</b>' . $notification->Message;
|
262 |
-
}
|
263 |
-
$error = Mage::getModel('shipping/tracking_result_error');
|
264 |
-
$error->setCarrier('aramex');
|
265 |
-
$error->setCarrierTitle($this->getConfigData('title'));
|
266 |
-
$error->setTracking($trackingvalue);
|
267 |
-
$error->setErrorMessage($errorMessage);
|
268 |
-
$this->_result->append($error);
|
269 |
-
}
|
270 |
-
}
|
271 |
-
|
272 |
-
public function getResponse() {
|
273 |
-
$statuses = '';
|
274 |
-
if ($this->_result instanceof Mage_Shipping_Model_Tracking_Result) {
|
275 |
-
if ($trackings = $this->_result->getAllTrackings()) {
|
276 |
-
foreach ($trackings as $tracking) {
|
277 |
-
if ($data = $tracking->getAllData()) {
|
278 |
-
if (!empty($data['track_summary'])) {
|
279 |
-
$statuses .= Mage::helper('usa')->__($data['track_summary']);
|
280 |
-
} else {
|
281 |
-
$statuses .= Mage::helper('usa')->__('Empty response');
|
282 |
-
}
|
283 |
-
}
|
284 |
-
}
|
285 |
-
}
|
286 |
-
}
|
287 |
-
if (empty($statuses)) {
|
288 |
-
$statuses = Mage::helper('usa')->__('Empty response');
|
289 |
-
}
|
290 |
-
return $statuses;
|
291 |
-
}
|
292 |
-
|
293 |
-
/**
|
294 |
-
* Get allowed shipping methods
|
295 |
-
*
|
296 |
-
* @return array
|
297 |
-
*/
|
298 |
-
public function getTrackingInfoTable($HAWBHistory) {
|
299 |
-
|
300 |
-
$_resultTable = '<table summary="Item Tracking" class="data-table">';
|
301 |
-
$_resultTable .= '<col width="1">
|
302 |
-
<col width="1">
|
303 |
-
<col width="1">
|
304 |
-
<col width="1">
|
305 |
-
<thead>
|
306 |
-
<tr class="first last">
|
307 |
-
<th>Location</th>
|
308 |
-
<th>Action Date/Time</th>
|
309 |
-
<th class="a-right">Tracking Description</th>
|
310 |
-
<th class="a-center">Comments</th>
|
311 |
-
</tr>
|
312 |
-
</thead><tbody>';
|
313 |
-
|
314 |
-
foreach ($HAWBHistory as $HAWBUpdate) {
|
315 |
-
|
316 |
-
$_resultTable .= '<tr>
|
317 |
-
<td>' . $HAWBUpdate->UpdateLocation . '</td>
|
318 |
-
<td>' . $HAWBUpdate->UpdateDateTime . '</td>
|
319 |
-
<td>' . $HAWBUpdate->UpdateDescription . '</td>
|
320 |
-
<td>' . $HAWBUpdate->Comments . '</td>
|
321 |
-
</tr>';
|
322 |
-
}
|
323 |
-
$_resultTable .= '</tbody></table>';
|
324 |
-
|
325 |
-
return $_resultTable;
|
326 |
-
}
|
327 |
-
}
|
328 |
-
|
329 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-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 Mage
|
23 |
+
* @package Mage_Usa
|
24 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
class Aramex_Shipping_Model_Carrier_Aramex extends Mage_Usa_Model_Shipping_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
|
28 |
+
|
29 |
+
protected $_code = 'aramex';
|
30 |
+
protected $_request = null;
|
31 |
+
protected $_result = null;
|
32 |
+
protected $_defaultGatewayUrl = null;
|
33 |
+
|
34 |
+
function __construct()
|
35 |
+
{
|
36 |
+
$this->_defaultGatewayUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'aramex/Tracking.wsdl';
|
37 |
+
}
|
38 |
+
|
39 |
+
protected function _doShipmentRequest(Varien_Object $request)
|
40 |
+
{
|
41 |
+
return $result;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
45 |
+
{
|
46 |
+
if (!$this->getConfigFlag($this->_activeFlag)) {
|
47 |
+
return false;
|
48 |
+
}
|
49 |
+
|
50 |
+
$this->setRequest($request);
|
51 |
+
|
52 |
+
$this->_result = $this->_getQuotes();
|
53 |
+
|
54 |
+
$this->_updateFreeMethodQuote($request);
|
55 |
+
|
56 |
+
return $this->getResult();
|
57 |
+
}
|
58 |
+
|
59 |
+
public function setRequest(Mage_Shipping_Model_Rate_Request $request) {
|
60 |
+
$this->_request = $request;
|
61 |
+
|
62 |
+
$r = new Varien_Object();
|
63 |
+
|
64 |
+
if ($request->getLimitMethod()) {
|
65 |
+
$r->setService($request->getLimitMethod());
|
66 |
+
} else {
|
67 |
+
$r->setService('ALL');
|
68 |
+
}
|
69 |
+
|
70 |
+
if ($request->getAramexUserid()) {
|
71 |
+
$userId = $request->getAramexUserid();
|
72 |
+
} else {
|
73 |
+
$userId = $this->getConfigData('userid');
|
74 |
+
}
|
75 |
+
$r->setUserId($userId);
|
76 |
+
|
77 |
+
if ($request->getAramexContainer()) {
|
78 |
+
$container = $request->getAramexContainer();
|
79 |
+
} else {
|
80 |
+
$container = $this->getConfigData('container');
|
81 |
+
}
|
82 |
+
$r->setContainer($container);
|
83 |
+
|
84 |
+
if ($request->getAramexSize()) {
|
85 |
+
$size = $request->getAramexSize();
|
86 |
+
} else {
|
87 |
+
$size = $this->getConfigData('size');
|
88 |
+
}
|
89 |
+
$r->setSize($size);
|
90 |
+
|
91 |
+
if ($request->getAramexMachinable()) {
|
92 |
+
$machinable = $request->getAramexMachinable();
|
93 |
+
} else {
|
94 |
+
$machinable = $this->getConfigData('machinable');
|
95 |
+
}
|
96 |
+
$r->setMachinable($machinable);
|
97 |
+
|
98 |
+
if ($request->getOrigPostcode()) {
|
99 |
+
$r->setOrigPostal($request->getOrigPostcode());
|
100 |
+
} else {
|
101 |
+
$r->setOrigPostal(Mage::getStoreConfig('shipping/origin/postcode'));
|
102 |
+
}
|
103 |
+
|
104 |
+
if ($request->getDestCountryId()) {
|
105 |
+
$destCountry = $request->getDestCountryId();
|
106 |
+
} else {
|
107 |
+
$destCountry = self::USA_COUNTRY_ID;
|
108 |
+
}
|
109 |
+
|
110 |
+
$r->setDestCountryId($destCountry);
|
111 |
+
|
112 |
+
|
113 |
+
$countries = Mage::getResourceModel('directory/country_collection')
|
114 |
+
->addCountryIdFilter($destCountry)
|
115 |
+
->load()
|
116 |
+
->getItems();
|
117 |
+
$country = array_shift($countries);
|
118 |
+
$countryName = $country->getName();
|
119 |
+
|
120 |
+
$r->setDestCountryName($countryName);
|
121 |
+
|
122 |
+
if ($request->getDestPostcode()) {
|
123 |
+
$r->setDestPostal($request->getDestPostcode());
|
124 |
+
}
|
125 |
+
|
126 |
+
$weight = $this->getTotalNumOfBoxes($request->getPackageWeight());
|
127 |
+
$r->setWeightPounds(floor($weight));
|
128 |
+
$r->setWeightOunces(round(($weight - floor($weight)) * 16, 1));
|
129 |
+
if ($request->getFreeMethodWeight() != $request->getPackageWeight()) {
|
130 |
+
$r->setFreeMethodWeight($request->getFreeMethodWeight());
|
131 |
+
}
|
132 |
+
|
133 |
+
$r->setValue($request->getPackageValue());
|
134 |
+
$r->setValueWithDiscount($request->getPackageValueWithDiscount());
|
135 |
+
|
136 |
+
$this->_rawRequest = $r;
|
137 |
+
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
|
141 |
+
public function getCode($type, $code='') {
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
|
145 |
+
protected function _getQuotes() {
|
146 |
+
return false;
|
147 |
+
}
|
148 |
+
|
149 |
+
public function getResult() {
|
150 |
+
return $this->_result;
|
151 |
+
}
|
152 |
+
|
153 |
+
protected function _setFreeMethodRequest($freeMethod) {
|
154 |
+
$r = $this->_rawRequest;
|
155 |
+
|
156 |
+
$weight = $this->getTotalNumOfBoxes($r->getFreeMethodWeight());
|
157 |
+
$r->setWeightPounds(floor($weight));
|
158 |
+
$r->setWeightOunces(round(($weight - floor($weight)) * 16, 1));
|
159 |
+
$r->setService($freeMethod);
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Get allowed shipping methods
|
164 |
+
*
|
165 |
+
* @return array
|
166 |
+
*/
|
167 |
+
public function getAllowedMethods()
|
168 |
+
{
|
169 |
+
$allowed = explode(',', $this->getConfigData('allowed_methods'));
|
170 |
+
$arr = array();
|
171 |
+
foreach ($allowed as $k) {
|
172 |
+
$arr[$k] = $this->getCode('method', $k);
|
173 |
+
}
|
174 |
+
return $arr;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Return array of authenticated information
|
179 |
+
*
|
180 |
+
* @return array
|
181 |
+
*/
|
182 |
+
protected function _getAuthDetails()
|
183 |
+
{
|
184 |
+
return array(
|
185 |
+
'ClientInfo' => array(
|
186 |
+
'AccountCountryCode' => Mage::getStoreConfig('aramexsettings/settings/account_country_code'),
|
187 |
+
'AccountEntity' => Mage::getStoreConfig('aramexsettings/settings/account_entity'),
|
188 |
+
'AccountNumber' => Mage::getStoreConfig('aramexsettings/settings/account_number'),
|
189 |
+
'AccountPin' => Mage::getStoreConfig('aramexsettings/settings/account_pin'),
|
190 |
+
'UserName' => Mage::getStoreConfig('aramexsettings/settings/user_name'),
|
191 |
+
'Password' => Mage::getStoreConfig('aramexsettings/settings/password'),
|
192 |
+
'Version' => 'v1.0'
|
193 |
+
)
|
194 |
+
);
|
195 |
+
}
|
196 |
+
|
197 |
+
public function getTracking($trackings) {
|
198 |
+
$this->setTrackingReqeust();
|
199 |
+
|
200 |
+
if (!is_array($trackings)) {
|
201 |
+
$trackings = array($trackings);
|
202 |
+
}
|
203 |
+
|
204 |
+
$this->_getXmlTracking($trackings);
|
205 |
+
|
206 |
+
return $this->_result;
|
207 |
+
}
|
208 |
+
|
209 |
+
protected function setTrackingReqeust() {
|
210 |
+
$r = new Varien_Object();
|
211 |
+
|
212 |
+
$userId = $this->getConfigData('userid');
|
213 |
+
$r->setUserId($userId);
|
214 |
+
|
215 |
+
$this->_rawTrackRequest = $r;
|
216 |
+
}
|
217 |
+
|
218 |
+
protected function _getXmlTracking($trackings) {
|
219 |
+
$r = $this->_rawTrackRequest;
|
220 |
+
|
221 |
+
foreach ($trackings as $tracking) {
|
222 |
+
$this->_parseXmlTrackingResponse($tracking);
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
protected function _parseXmlTrackingResponse($trackingvalue) {
|
227 |
+
$resultArr = array();
|
228 |
+
|
229 |
+
if (!$this->_result) {
|
230 |
+
$this->_result = Mage::getModel('shipping/tracking_result');
|
231 |
+
}
|
232 |
+
$defaults = $this->getDefaults();
|
233 |
+
|
234 |
+
//$url = 'http://localhost:8080/soap_test/wsdl/Tracking.wsdl';
|
235 |
+
//if (!$url) {
|
236 |
+
$url = $this->_defaultGatewayUrl;
|
237 |
+
//}
|
238 |
+
|
239 |
+
$clientAramex = new SoapClient($url);
|
240 |
+
$aramexParams = $this->_getAuthDetails();
|
241 |
+
|
242 |
+
$aramexParams['Transaction'] = array('Reference1' => '001' );
|
243 |
+
$aramexParams['Shipments'] = array($trackingvalue);
|
244 |
+
|
245 |
+
$_resAramex = $clientAramex->TrackShipments($aramexParams);
|
246 |
+
|
247 |
+
if(is_object($_resAramex) && !$_resAramex->HasErrors){
|
248 |
+
$tracking = Mage::getModel('shipping/tracking_result_status');
|
249 |
+
$tracking->setCarrier('aramex');
|
250 |
+
$tracking->setCarrierTitle($this->getConfigData('title'));
|
251 |
+
$tracking->setTracking($trackingvalue);
|
252 |
+
if(!empty($_resAramex->TrackingResults->KeyValueOfstringArrayOfTrackingResultmFAkxlpY->Value->TrackingResult)){
|
253 |
+
$tracking->setTrackSummary($this->getTrackingInfoTable($_resAramex->TrackingResults->KeyValueOfstringArrayOfTrackingResultmFAkxlpY->Value->TrackingResult));
|
254 |
+
} else {
|
255 |
+
$tracking->setTrackSummary('Unable to retrieve quotes, please check if the Tracking Number is valid or contact your administrator.');
|
256 |
+
}
|
257 |
+
$this->_result->append($tracking);
|
258 |
+
} else {
|
259 |
+
$errorMessage = '';
|
260 |
+
foreach($_resAramex->Notifications as $notification){
|
261 |
+
$errorMessage .= '<b>' . $notification->Code . '</b>' . $notification->Message;
|
262 |
+
}
|
263 |
+
$error = Mage::getModel('shipping/tracking_result_error');
|
264 |
+
$error->setCarrier('aramex');
|
265 |
+
$error->setCarrierTitle($this->getConfigData('title'));
|
266 |
+
$error->setTracking($trackingvalue);
|
267 |
+
$error->setErrorMessage($errorMessage);
|
268 |
+
$this->_result->append($error);
|
269 |
+
}
|
270 |
+
}
|
271 |
+
|
272 |
+
public function getResponse() {
|
273 |
+
$statuses = '';
|
274 |
+
if ($this->_result instanceof Mage_Shipping_Model_Tracking_Result) {
|
275 |
+
if ($trackings = $this->_result->getAllTrackings()) {
|
276 |
+
foreach ($trackings as $tracking) {
|
277 |
+
if ($data = $tracking->getAllData()) {
|
278 |
+
if (!empty($data['track_summary'])) {
|
279 |
+
$statuses .= Mage::helper('usa')->__($data['track_summary']);
|
280 |
+
} else {
|
281 |
+
$statuses .= Mage::helper('usa')->__('Empty response');
|
282 |
+
}
|
283 |
+
}
|
284 |
+
}
|
285 |
+
}
|
286 |
+
}
|
287 |
+
if (empty($statuses)) {
|
288 |
+
$statuses = Mage::helper('usa')->__('Empty response');
|
289 |
+
}
|
290 |
+
return $statuses;
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Get allowed shipping methods
|
295 |
+
*
|
296 |
+
* @return array
|
297 |
+
*/
|
298 |
+
public function getTrackingInfoTable($HAWBHistory) {
|
299 |
+
|
300 |
+
$_resultTable = '<table summary="Item Tracking" class="data-table">';
|
301 |
+
$_resultTable .= '<col width="1">
|
302 |
+
<col width="1">
|
303 |
+
<col width="1">
|
304 |
+
<col width="1">
|
305 |
+
<thead>
|
306 |
+
<tr class="first last">
|
307 |
+
<th>Location</th>
|
308 |
+
<th>Action Date/Time</th>
|
309 |
+
<th class="a-right">Tracking Description</th>
|
310 |
+
<th class="a-center">Comments</th>
|
311 |
+
</tr>
|
312 |
+
</thead><tbody>';
|
313 |
+
|
314 |
+
foreach ($HAWBHistory as $HAWBUpdate) {
|
315 |
+
|
316 |
+
$_resultTable .= '<tr>
|
317 |
+
<td>' . $HAWBUpdate->UpdateLocation . '</td>
|
318 |
+
<td>' . $HAWBUpdate->UpdateDateTime . '</td>
|
319 |
+
<td>' . $HAWBUpdate->UpdateDescription . '</td>
|
320 |
+
<td>' . $HAWBUpdate->Comments . '</td>
|
321 |
+
</tr>';
|
322 |
+
}
|
323 |
+
$_resultTable .= '</tbody></table>';
|
324 |
+
|
325 |
+
return $_resultTable;
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
?>
|
app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Dropoff.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
22 |
-
* @package Mage_Usa
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
class Aramex_Shipping_Model_Carrier_Aramex_Source_Dropoff
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
-
$arr = array();
|
34 |
-
foreach ($fedex->getCode('dropoff') as $k=>$v) {
|
35 |
-
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
-
}
|
37 |
-
return $arr;
|
38 |
-
}
|
39 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-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 Mage
|
22 |
+
* @package Mage_Usa
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aramex_Shipping_Model_Carrier_Aramex_Source_Dropoff
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
+
$arr = array();
|
34 |
+
foreach ($fedex->getCode('dropoff') as $k=>$v) {
|
35 |
+
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
+
}
|
37 |
+
return $arr;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Freemethod.php
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
22 |
-
* @package Mage_Usa
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
class Aramex_Shipping_Model_Carrier_Aramex_Source_Freemethod extends Aramex_Shipping_Model_Carrier_Aramex_Source_Method
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$arr = parent::toOptionArray();
|
33 |
-
array_unshift($arr, array('value'=>'', 'label'=>Mage::helper('shipping')->__('None')));
|
34 |
-
return $arr;
|
35 |
-
}
|
36 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-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 Mage
|
22 |
+
* @package Mage_Usa
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aramex_Shipping_Model_Carrier_Aramex_Source_Freemethod extends Aramex_Shipping_Model_Carrier_Aramex_Source_Method
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
$arr = parent::toOptionArray();
|
33 |
+
array_unshift($arr, array('value'=>'', 'label'=>Mage::helper('shipping')->__('None')));
|
34 |
+
return $arr;
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Method.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
22 |
-
* @package Mage_Usa
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
class Aramex_Shipping_Model_Carrier_Aramex_Source_Method
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
-
$arr = array();
|
34 |
-
foreach ($fedex->getCode('method') as $k=>$v) {
|
35 |
-
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
-
}
|
37 |
-
return $arr;
|
38 |
-
}
|
39 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-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 Mage
|
22 |
+
* @package Mage_Usa
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aramex_Shipping_Model_Carrier_Aramex_Source_Method
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
+
$arr = array();
|
34 |
+
foreach ($fedex->getCode('method') as $k=>$v) {
|
35 |
+
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
+
}
|
37 |
+
return $arr;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Packaging.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
22 |
-
* @package Mage_Usa
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
|
28 |
-
class Aramex_Shipping_Model_Carrier_Aramex_Source_Packaging
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
-
$arr = array();
|
34 |
-
foreach ($fedex->getCode('packaging') as $k=>$v) {
|
35 |
-
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
-
}
|
37 |
-
return $arr;
|
38 |
-
}
|
39 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-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 Mage
|
22 |
+
* @package Mage_Usa
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
class Aramex_Shipping_Model_Carrier_Aramex_Source_Packaging
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
$fedex = Mage::getSingleton('Aramex_Shipping_Model_Carrier_Aramex');
|
33 |
+
$arr = array();
|
34 |
+
foreach ($fedex->getCode('packaging') as $k=>$v) {
|
35 |
+
$arr[] = array('value'=>$k, 'label'=>$v);
|
36 |
+
}
|
37 |
+
return $arr;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Aramex/Shipping/etc/config.xml
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
|
4 |
-
<sales>
|
5 |
-
<shipping>
|
6 |
-
<carriers>
|
7 |
-
<aramex>
|
8 |
-
<class>Aramex_Shipping_Model_Carrier_Aramex</class>
|
9 |
-
</aramex>
|
10 |
-
</carriers>
|
11 |
-
</shipping>
|
12 |
-
</sales>
|
13 |
-
|
14 |
-
<default>
|
15 |
-
<carriers>
|
16 |
-
<!-- Use group alias -->
|
17 |
-
<aramex>
|
18 |
-
<active>1</active>
|
19 |
-
<sallowspecific>0</sallowspecific>
|
20 |
-
<!--model>shipping/carrier_aramex</model-->
|
21 |
-
<!--model>newmodule/carrier_newmodule</model-->
|
22 |
-
|
23 |
-
<model>Aramex_Shipping_Model_Carrier_Aramex</model>
|
24 |
-
<name>aramex</name>
|
25 |
-
<gateway_url>
|
26 |
-
<price>10.00</price>
|
27 |
-
<title>aramex</title>
|
28 |
-
<specificerrmsg>
|
29 |
-
This shipping method is currently unavailable.If you would like to ship using this shipping method, please contact us.
|
30 |
-
</specificerrmsg>
|
31 |
-
<handling_type>F</handling_type>
|
32 |
-
</aramex>
|
33 |
-
</carriers>
|
34 |
-
</default>
|
35 |
-
|
36 |
-
<modules>
|
37 |
-
<!-- declare module's version information -->
|
38 |
-
<!-- Use module name_Shipping -->
|
39 |
-
<Aramex_Shipping>
|
40 |
-
<!-- this version number will be used for database upgrades -->
|
41 |
-
<version>0.6.0</version>
|
42 |
-
<!-- Use module name_Shipping -->
|
43 |
-
</Aramex_Shipping>
|
44 |
-
</modules>
|
45 |
-
|
46 |
-
<global>
|
47 |
-
<!-- declare model group for new module -->
|
48 |
-
<models>
|
49 |
-
<!-- model group alias to be used in Mage::getModel() -->
|
50 |
-
<!-- Use group alias -->
|
51 |
-
<aramex>
|
52 |
-
<!-- base class name for the model group -->
|
53 |
-
<!-- Use module name_Shipping_Model -->
|
54 |
-
<class>Aramex_Shipping_Model</class>
|
55 |
-
<!-- Use group alias -->
|
56 |
-
</aramex>
|
57 |
-
</models>
|
58 |
-
<!-- declare resource setup for new module -->
|
59 |
-
<resources>
|
60 |
-
<!-- resource identifier -->
|
61 |
-
<!-- Use group alias_setup -->
|
62 |
-
<aramex_setup>
|
63 |
-
<!-- specify that this resource is a setup resource and used for upgrades -->
|
64 |
-
<setup>
|
65 |
-
<!-- which module to look for install/upgrade files in -->
|
66 |
-
<!-- Use module name_Shipping_Model -->
|
67 |
-
<module>Aramex_Shipping</module>
|
68 |
-
</setup>
|
69 |
-
<!-- specify database connection for this resource -->
|
70 |
-
<connection>
|
71 |
-
<!-- do not create new connection, use predefined core setup connection -->
|
72 |
-
<use>core_setup</use>
|
73 |
-
</connection>
|
74 |
-
<!-- Use group alias_setup -->
|
75 |
-
</aramex_setup>
|
76 |
-
</resources>
|
77 |
-
</global>
|
78 |
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
|
4 |
+
<sales>
|
5 |
+
<shipping>
|
6 |
+
<carriers>
|
7 |
+
<aramex>
|
8 |
+
<class>Aramex_Shipping_Model_Carrier_Aramex</class>
|
9 |
+
</aramex>
|
10 |
+
</carriers>
|
11 |
+
</shipping>
|
12 |
+
</sales>
|
13 |
+
|
14 |
+
<default>
|
15 |
+
<carriers>
|
16 |
+
<!-- Use group alias -->
|
17 |
+
<aramex>
|
18 |
+
<active>1</active>
|
19 |
+
<sallowspecific>0</sallowspecific>
|
20 |
+
<!--model>shipping/carrier_aramex</model-->
|
21 |
+
<!--model>newmodule/carrier_newmodule</model-->
|
22 |
+
|
23 |
+
<model>Aramex_Shipping_Model_Carrier_Aramex</model>
|
24 |
+
<name>aramex</name>
|
25 |
+
<gateway_url>aramex/Tracking.wsdl</gateway_url>
|
26 |
+
<price>10.00</price>
|
27 |
+
<title>aramex</title>
|
28 |
+
<specificerrmsg>
|
29 |
+
This shipping method is currently unavailable.If you would like to ship using this shipping method, please contact us.
|
30 |
+
</specificerrmsg>
|
31 |
+
<handling_type>F</handling_type>
|
32 |
+
</aramex>
|
33 |
+
</carriers>
|
34 |
+
</default>
|
35 |
+
|
36 |
+
<modules>
|
37 |
+
<!-- declare module's version information -->
|
38 |
+
<!-- Use module name_Shipping -->
|
39 |
+
<Aramex_Shipping>
|
40 |
+
<!-- this version number will be used for database upgrades -->
|
41 |
+
<version>0.6.0</version>
|
42 |
+
<!-- Use module name_Shipping -->
|
43 |
+
</Aramex_Shipping>
|
44 |
+
</modules>
|
45 |
+
|
46 |
+
<global>
|
47 |
+
<!-- declare model group for new module -->
|
48 |
+
<models>
|
49 |
+
<!-- model group alias to be used in Mage::getModel() -->
|
50 |
+
<!-- Use group alias -->
|
51 |
+
<aramex>
|
52 |
+
<!-- base class name for the model group -->
|
53 |
+
<!-- Use module name_Shipping_Model -->
|
54 |
+
<class>Aramex_Shipping_Model</class>
|
55 |
+
<!-- Use group alias -->
|
56 |
+
</aramex>
|
57 |
+
</models>
|
58 |
+
<!-- declare resource setup for new module -->
|
59 |
+
<resources>
|
60 |
+
<!-- resource identifier -->
|
61 |
+
<!-- Use group alias_setup -->
|
62 |
+
<aramex_setup>
|
63 |
+
<!-- specify that this resource is a setup resource and used for upgrades -->
|
64 |
+
<setup>
|
65 |
+
<!-- which module to look for install/upgrade files in -->
|
66 |
+
<!-- Use module name_Shipping_Model -->
|
67 |
+
<module>Aramex_Shipping</module>
|
68 |
+
</setup>
|
69 |
+
<!-- specify database connection for this resource -->
|
70 |
+
<connection>
|
71 |
+
<!-- do not create new connection, use predefined core setup connection -->
|
72 |
+
<use>core_setup</use>
|
73 |
+
</connection>
|
74 |
+
<!-- Use group alias_setup -->
|
75 |
+
</aramex_setup>
|
76 |
+
</resources>
|
77 |
+
</global>
|
78 |
</config>
|
app/code/community/Aramex/Shipping/etc/system.xml
CHANGED
@@ -1,374 +1,374 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<sections>
|
4 |
-
<carriers>
|
5 |
-
<groups>
|
6 |
-
<aramex translate="label" module="shipping">
|
7 |
-
<label>aramex</label>
|
8 |
-
<frontend_type>text</frontend_type>
|
9 |
-
<sort_order>13</sort_order>
|
10 |
-
<show_in_default>1</show_in_default>
|
11 |
-
<show_in_website>1</show_in_website>
|
12 |
-
<show_in_store>1</show_in_store>
|
13 |
-
<fields>
|
14 |
-
<!--
|
15 |
-
<account translate="label">
|
16 |
-
<label>Account number</label>
|
17 |
-
<frontend_type>text</frontend_type>
|
18 |
-
<sort_order>7</sort_order>
|
19 |
-
<show_in_default>1</show_in_default>
|
20 |
-
<show_in_website>1</show_in_website>
|
21 |
-
<show_in_store>1</show_in_store>
|
22 |
-
</account>
|
23 |
-
-->
|
24 |
-
<active translate="label">
|
25 |
-
<label>Enabled</label>
|
26 |
-
<frontend_type>select</frontend_type>
|
27 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
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>
|
32 |
-
</active>
|
33 |
-
<!--
|
34 |
-
<contentdesc translate="label">
|
35 |
-
|
36 |
-
<label>Package Description</label>
|
37 |
-
|
38 |
-
<frontend_type>text</frontend_type>
|
39 |
-
|
40 |
-
<sort_order>12</sort_order>
|
41 |
-
|
42 |
-
<show_in_default>1</show_in_default>
|
43 |
-
|
44 |
-
<show_in_website>1</show_in_website>
|
45 |
-
|
46 |
-
<show_in_store>1</show_in_store>
|
47 |
-
|
48 |
-
</contentdesc>
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
If the free_shipping_enable flag enable, the system will check free_shipping_subtotal to give free shipping
|
53 |
-
|
54 |
-
otherwise will use shopping cart price rule behaviour
|
55 |
-
|
56 |
-
-->
|
57 |
-
<!--
|
58 |
-
<free_shipping_enable translate="label">
|
59 |
-
|
60 |
-
<label>Free shipping with minimum order amount</label>
|
61 |
-
|
62 |
-
<frontend_type>select</frontend_type>
|
63 |
-
|
64 |
-
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
65 |
-
|
66 |
-
<sort_order>21</sort_order>
|
67 |
-
|
68 |
-
<show_in_default>1</show_in_default>
|
69 |
-
|
70 |
-
<show_in_website>1</show_in_website>
|
71 |
-
|
72 |
-
<show_in_store>1</show_in_store>
|
73 |
-
|
74 |
-
</free_shipping_enable>
|
75 |
-
|
76 |
-
<free_shipping_subtotal translate="label">
|
77 |
-
|
78 |
-
<label>Minimum order amount for free shipping</label>
|
79 |
-
|
80 |
-
<frontend_type>text</frontend_type>
|
81 |
-
|
82 |
-
<sort_order>22</sort_order>
|
83 |
-
|
84 |
-
<show_in_default>1</show_in_default>
|
85 |
-
|
86 |
-
<show_in_website>1</show_in_website>
|
87 |
-
|
88 |
-
<show_in_store>1</show_in_store>
|
89 |
-
|
90 |
-
</free_shipping_subtotal>
|
91 |
-
|
92 |
-
<dutiable translate="label">
|
93 |
-
<label>Shipment Dutiable</label>
|
94 |
-
|
95 |
-
<frontend_type>select</frontend_type>
|
96 |
-
|
97 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
98 |
-
|
99 |
-
<sort_order>13</sort_order>
|
100 |
-
|
101 |
-
<show_in_default>1</show_in_default>
|
102 |
-
|
103 |
-
<show_in_website>1</show_in_website>
|
104 |
-
|
105 |
-
<show_in_store>1</show_in_store>
|
106 |
-
|
107 |
-
</dutiable>
|
108 |
-
-->
|
109 |
-
<gateway_url translate="label">
|
110 |
-
|
111 |
-
<label>Gateway URL</label>
|
112 |
-
|
113 |
-
<frontend_type>text</frontend_type>
|
114 |
-
|
115 |
-
<sort_order>2</sort_order>
|
116 |
-
|
117 |
-
<show_in_default>1</show_in_default>
|
118 |
-
|
119 |
-
<show_in_website>1</show_in_website>
|
120 |
-
|
121 |
-
<show_in_store>1</show_in_store>
|
122 |
-
|
123 |
-
</gateway_url>
|
124 |
-
<!--
|
125 |
-
<handling_type translate="label">
|
126 |
-
<label>Calculate Handling Fee</label>
|
127 |
-
|
128 |
-
<frontend_type>select</frontend_type>
|
129 |
-
|
130 |
-
<source_model>shipping/source_handlingType</source_model>
|
131 |
-
|
132 |
-
<sort_order>10</sort_order>
|
133 |
-
|
134 |
-
<show_in_default>1</show_in_default>
|
135 |
-
|
136 |
-
<show_in_website>1</show_in_website>
|
137 |
-
|
138 |
-
<show_in_store>0</show_in_store>
|
139 |
-
|
140 |
-
</handling_type>
|
141 |
-
|
142 |
-
<handling_action translate="label">
|
143 |
-
|
144 |
-
<label>Handling Applied</label>
|
145 |
-
|
146 |
-
<frontend_type>select</frontend_type>
|
147 |
-
|
148 |
-
<source_model>shipping/source_handlingAction</source_model>
|
149 |
-
|
150 |
-
<sort_order>11</sort_order>
|
151 |
-
|
152 |
-
<show_in_default>1</show_in_default>
|
153 |
-
|
154 |
-
<show_in_website>1</show_in_website>
|
155 |
-
|
156 |
-
<show_in_store>0</show_in_store>
|
157 |
-
|
158 |
-
</handling_action>
|
159 |
-
|
160 |
-
<handling_fee translate="label">
|
161 |
-
|
162 |
-
<label>Handling fee</label>
|
163 |
-
|
164 |
-
<frontend_type>text</frontend_type>
|
165 |
-
|
166 |
-
<sort_order>12</sort_order>
|
167 |
-
|
168 |
-
<show_in_default>1</show_in_default>
|
169 |
-
|
170 |
-
<show_in_website>1</show_in_website>
|
171 |
-
|
172 |
-
<show_in_store>1</show_in_store>
|
173 |
-
|
174 |
-
</handling_fee>
|
175 |
-
|
176 |
-
<max_package_weight translate="label">
|
177 |
-
|
178 |
-
<label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label>
|
179 |
-
|
180 |
-
<frontend_type>text</frontend_type>
|
181 |
-
|
182 |
-
<sort_order>13</sort_order>
|
183 |
-
|
184 |
-
<show_in_default>1</show_in_default>
|
185 |
-
|
186 |
-
<show_in_website>1</show_in_website>
|
187 |
-
|
188 |
-
<show_in_store>1</show_in_store>
|
189 |
-
|
190 |
-
</max_package_weight>
|
191 |
-
|
192 |
-
<id translate="label">
|
193 |
-
|
194 |
-
<label>Access ID</label>
|
195 |
-
|
196 |
-
<frontend_type>text</frontend_type>
|
197 |
-
|
198 |
-
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
199 |
-
|
200 |
-
<sort_order>5</sort_order>
|
201 |
-
|
202 |
-
<show_in_default>1</show_in_default>
|
203 |
-
|
204 |
-
<show_in_website>1</show_in_website>
|
205 |
-
|
206 |
-
<show_in_store>1</show_in_store>
|
207 |
-
|
208 |
-
</id>
|
209 |
-
|
210 |
-
<password translate="label">
|
211 |
-
|
212 |
-
<label>Password</label>
|
213 |
-
|
214 |
-
<frontend_type>text</frontend_type>
|
215 |
-
|
216 |
-
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
217 |
-
|
218 |
-
<sort_order>6</sort_order>
|
219 |
-
|
220 |
-
<show_in_default>1</show_in_default>
|
221 |
-
|
222 |
-
<show_in_website>1</show_in_website>
|
223 |
-
|
224 |
-
<show_in_store>1</show_in_store>
|
225 |
-
|
226 |
-
</password>
|
227 |
-
|
228 |
-
<shipping_intlkey translate="label">
|
229 |
-
|
230 |
-
<label>Shipping key (International)</label>
|
231 |
-
|
232 |
-
<frontend_type>text</frontend_type>
|
233 |
-
|
234 |
-
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
235 |
-
|
236 |
-
<sort_order>8</sort_order>
|
237 |
-
|
238 |
-
<show_in_default>1</show_in_default>
|
239 |
-
|
240 |
-
<show_in_website>1</show_in_website>
|
241 |
-
|
242 |
-
<show_in_store>1</show_in_store>
|
243 |
-
|
244 |
-
</shipping_intlkey>
|
245 |
-
|
246 |
-
<shipping_key translate="label">
|
247 |
-
|
248 |
-
<label>Shipping key</label>
|
249 |
-
|
250 |
-
<frontend_type>text</frontend_type>
|
251 |
-
|
252 |
-
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
253 |
-
|
254 |
-
<sort_order>8</sort_order>
|
255 |
-
|
256 |
-
<show_in_default>1</show_in_default>
|
257 |
-
|
258 |
-
<show_in_website>1</show_in_website>
|
259 |
-
|
260 |
-
<show_in_store>1</show_in_store>
|
261 |
-
|
262 |
-
</shipping_key>
|
263 |
-
|
264 |
-
<sort_order translate="label">
|
265 |
-
|
266 |
-
<label>Sort order</label>
|
267 |
-
|
268 |
-
<frontend_type>text</frontend_type>
|
269 |
-
|
270 |
-
<sort_order>100</sort_order>
|
271 |
-
|
272 |
-
<show_in_default>1</show_in_default>
|
273 |
-
|
274 |
-
<show_in_website>1</show_in_website>
|
275 |
-
|
276 |
-
<show_in_store>1</show_in_store>
|
277 |
-
|
278 |
-
</sort_order>
|
279 |
-
-->
|
280 |
-
<title translate="label">
|
281 |
-
|
282 |
-
<label>Title</label>
|
283 |
-
|
284 |
-
<frontend_type>text</frontend_type>
|
285 |
-
|
286 |
-
<sort_order>2</sort_order>
|
287 |
-
|
288 |
-
<show_in_default>1</show_in_default>
|
289 |
-
|
290 |
-
<show_in_website>1</show_in_website>
|
291 |
-
|
292 |
-
<show_in_store>1</show_in_store>
|
293 |
-
|
294 |
-
</title>
|
295 |
-
<!--
|
296 |
-
<sallowspecific translate="label">
|
297 |
-
|
298 |
-
<label>Ship to applicable countries</label>
|
299 |
-
|
300 |
-
<frontend_type>select</frontend_type>
|
301 |
-
|
302 |
-
<sort_order>90</sort_order>
|
303 |
-
|
304 |
-
<frontend_class>shipping-applicable-country</frontend_class>
|
305 |
-
|
306 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
307 |
-
|
308 |
-
<show_in_default>1</show_in_default>
|
309 |
-
|
310 |
-
<show_in_website>1</show_in_website>
|
311 |
-
|
312 |
-
<show_in_store>1</show_in_store>
|
313 |
-
|
314 |
-
</sallowspecific>
|
315 |
-
|
316 |
-
<specificcountry translate="label">
|
317 |
-
|
318 |
-
<label>Ship to Specific countries</label>
|
319 |
-
|
320 |
-
<frontend_type>multiselect</frontend_type>
|
321 |
-
|
322 |
-
<sort_order>91</sort_order>
|
323 |
-
|
324 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
325 |
-
|
326 |
-
<show_in_default>1</show_in_default>
|
327 |
-
|
328 |
-
<show_in_website>1</show_in_website>
|
329 |
-
|
330 |
-
<show_in_store>1</show_in_store>
|
331 |
-
|
332 |
-
</specificcountry>
|
333 |
-
|
334 |
-
<showmethod translate="label">
|
335 |
-
|
336 |
-
<label>Show method if not applicable</label>
|
337 |
-
|
338 |
-
<frontend_type>select</frontend_type>
|
339 |
-
|
340 |
-
<sort_order>92</sort_order>
|
341 |
-
|
342 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
343 |
-
|
344 |
-
<show_in_default>1</show_in_default>
|
345 |
-
|
346 |
-
<show_in_website>1</show_in_website>
|
347 |
-
|
348 |
-
<show_in_store>1</show_in_store>
|
349 |
-
|
350 |
-
</showmethod>
|
351 |
-
|
352 |
-
<specificerrmsg translate="label">
|
353 |
-
|
354 |
-
<label>Displayed Error Message</label>
|
355 |
-
|
356 |
-
<frontend_type>textarea</frontend_type>
|
357 |
-
|
358 |
-
<sort_order>80</sort_order>
|
359 |
-
|
360 |
-
<show_in_default>1</show_in_default>
|
361 |
-
|
362 |
-
<show_in_website>1</show_in_website>
|
363 |
-
|
364 |
-
<show_in_store>1</show_in_store>
|
365 |
-
|
366 |
-
</specificerrmsg>
|
367 |
-
-->
|
368 |
-
</fields>
|
369 |
-
|
370 |
-
</aramex>
|
371 |
-
</groups>
|
372 |
-
</carriers>
|
373 |
-
</sections>
|
374 |
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<carriers>
|
5 |
+
<groups>
|
6 |
+
<aramex translate="label" module="shipping">
|
7 |
+
<label>aramex</label>
|
8 |
+
<frontend_type>text</frontend_type>
|
9 |
+
<sort_order>13</sort_order>
|
10 |
+
<show_in_default>1</show_in_default>
|
11 |
+
<show_in_website>1</show_in_website>
|
12 |
+
<show_in_store>1</show_in_store>
|
13 |
+
<fields>
|
14 |
+
<!--
|
15 |
+
<account translate="label">
|
16 |
+
<label>Account number</label>
|
17 |
+
<frontend_type>text</frontend_type>
|
18 |
+
<sort_order>7</sort_order>
|
19 |
+
<show_in_default>1</show_in_default>
|
20 |
+
<show_in_website>1</show_in_website>
|
21 |
+
<show_in_store>1</show_in_store>
|
22 |
+
</account>
|
23 |
+
-->
|
24 |
+
<active translate="label">
|
25 |
+
<label>Enabled</label>
|
26 |
+
<frontend_type>select</frontend_type>
|
27 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
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>
|
32 |
+
</active>
|
33 |
+
<!--
|
34 |
+
<contentdesc translate="label">
|
35 |
+
|
36 |
+
<label>Package Description</label>
|
37 |
+
|
38 |
+
<frontend_type>text</frontend_type>
|
39 |
+
|
40 |
+
<sort_order>12</sort_order>
|
41 |
+
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
|
46 |
+
<show_in_store>1</show_in_store>
|
47 |
+
|
48 |
+
</contentdesc>
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
If the free_shipping_enable flag enable, the system will check free_shipping_subtotal to give free shipping
|
53 |
+
|
54 |
+
otherwise will use shopping cart price rule behaviour
|
55 |
+
|
56 |
+
-->
|
57 |
+
<!--
|
58 |
+
<free_shipping_enable translate="label">
|
59 |
+
|
60 |
+
<label>Free shipping with minimum order amount</label>
|
61 |
+
|
62 |
+
<frontend_type>select</frontend_type>
|
63 |
+
|
64 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
65 |
+
|
66 |
+
<sort_order>21</sort_order>
|
67 |
+
|
68 |
+
<show_in_default>1</show_in_default>
|
69 |
+
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
|
72 |
+
<show_in_store>1</show_in_store>
|
73 |
+
|
74 |
+
</free_shipping_enable>
|
75 |
+
|
76 |
+
<free_shipping_subtotal translate="label">
|
77 |
+
|
78 |
+
<label>Minimum order amount for free shipping</label>
|
79 |
+
|
80 |
+
<frontend_type>text</frontend_type>
|
81 |
+
|
82 |
+
<sort_order>22</sort_order>
|
83 |
+
|
84 |
+
<show_in_default>1</show_in_default>
|
85 |
+
|
86 |
+
<show_in_website>1</show_in_website>
|
87 |
+
|
88 |
+
<show_in_store>1</show_in_store>
|
89 |
+
|
90 |
+
</free_shipping_subtotal>
|
91 |
+
|
92 |
+
<dutiable translate="label">
|
93 |
+
<label>Shipment Dutiable</label>
|
94 |
+
|
95 |
+
<frontend_type>select</frontend_type>
|
96 |
+
|
97 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
98 |
+
|
99 |
+
<sort_order>13</sort_order>
|
100 |
+
|
101 |
+
<show_in_default>1</show_in_default>
|
102 |
+
|
103 |
+
<show_in_website>1</show_in_website>
|
104 |
+
|
105 |
+
<show_in_store>1</show_in_store>
|
106 |
+
|
107 |
+
</dutiable>
|
108 |
+
-->
|
109 |
+
<gateway_url translate="label">
|
110 |
+
|
111 |
+
<label>Gateway URL</label>
|
112 |
+
|
113 |
+
<frontend_type>text</frontend_type>
|
114 |
+
|
115 |
+
<sort_order>2</sort_order>
|
116 |
+
|
117 |
+
<show_in_default>1</show_in_default>
|
118 |
+
|
119 |
+
<show_in_website>1</show_in_website>
|
120 |
+
|
121 |
+
<show_in_store>1</show_in_store>
|
122 |
+
|
123 |
+
</gateway_url>
|
124 |
+
<!--
|
125 |
+
<handling_type translate="label">
|
126 |
+
<label>Calculate Handling Fee</label>
|
127 |
+
|
128 |
+
<frontend_type>select</frontend_type>
|
129 |
+
|
130 |
+
<source_model>shipping/source_handlingType</source_model>
|
131 |
+
|
132 |
+
<sort_order>10</sort_order>
|
133 |
+
|
134 |
+
<show_in_default>1</show_in_default>
|
135 |
+
|
136 |
+
<show_in_website>1</show_in_website>
|
137 |
+
|
138 |
+
<show_in_store>0</show_in_store>
|
139 |
+
|
140 |
+
</handling_type>
|
141 |
+
|
142 |
+
<handling_action translate="label">
|
143 |
+
|
144 |
+
<label>Handling Applied</label>
|
145 |
+
|
146 |
+
<frontend_type>select</frontend_type>
|
147 |
+
|
148 |
+
<source_model>shipping/source_handlingAction</source_model>
|
149 |
+
|
150 |
+
<sort_order>11</sort_order>
|
151 |
+
|
152 |
+
<show_in_default>1</show_in_default>
|
153 |
+
|
154 |
+
<show_in_website>1</show_in_website>
|
155 |
+
|
156 |
+
<show_in_store>0</show_in_store>
|
157 |
+
|
158 |
+
</handling_action>
|
159 |
+
|
160 |
+
<handling_fee translate="label">
|
161 |
+
|
162 |
+
<label>Handling fee</label>
|
163 |
+
|
164 |
+
<frontend_type>text</frontend_type>
|
165 |
+
|
166 |
+
<sort_order>12</sort_order>
|
167 |
+
|
168 |
+
<show_in_default>1</show_in_default>
|
169 |
+
|
170 |
+
<show_in_website>1</show_in_website>
|
171 |
+
|
172 |
+
<show_in_store>1</show_in_store>
|
173 |
+
|
174 |
+
</handling_fee>
|
175 |
+
|
176 |
+
<max_package_weight translate="label">
|
177 |
+
|
178 |
+
<label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label>
|
179 |
+
|
180 |
+
<frontend_type>text</frontend_type>
|
181 |
+
|
182 |
+
<sort_order>13</sort_order>
|
183 |
+
|
184 |
+
<show_in_default>1</show_in_default>
|
185 |
+
|
186 |
+
<show_in_website>1</show_in_website>
|
187 |
+
|
188 |
+
<show_in_store>1</show_in_store>
|
189 |
+
|
190 |
+
</max_package_weight>
|
191 |
+
|
192 |
+
<id translate="label">
|
193 |
+
|
194 |
+
<label>Access ID</label>
|
195 |
+
|
196 |
+
<frontend_type>text</frontend_type>
|
197 |
+
|
198 |
+
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
199 |
+
|
200 |
+
<sort_order>5</sort_order>
|
201 |
+
|
202 |
+
<show_in_default>1</show_in_default>
|
203 |
+
|
204 |
+
<show_in_website>1</show_in_website>
|
205 |
+
|
206 |
+
<show_in_store>1</show_in_store>
|
207 |
+
|
208 |
+
</id>
|
209 |
+
|
210 |
+
<password translate="label">
|
211 |
+
|
212 |
+
<label>Password</label>
|
213 |
+
|
214 |
+
<frontend_type>text</frontend_type>
|
215 |
+
|
216 |
+
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
217 |
+
|
218 |
+
<sort_order>6</sort_order>
|
219 |
+
|
220 |
+
<show_in_default>1</show_in_default>
|
221 |
+
|
222 |
+
<show_in_website>1</show_in_website>
|
223 |
+
|
224 |
+
<show_in_store>1</show_in_store>
|
225 |
+
|
226 |
+
</password>
|
227 |
+
|
228 |
+
<shipping_intlkey translate="label">
|
229 |
+
|
230 |
+
<label>Shipping key (International)</label>
|
231 |
+
|
232 |
+
<frontend_type>text</frontend_type>
|
233 |
+
|
234 |
+
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
235 |
+
|
236 |
+
<sort_order>8</sort_order>
|
237 |
+
|
238 |
+
<show_in_default>1</show_in_default>
|
239 |
+
|
240 |
+
<show_in_website>1</show_in_website>
|
241 |
+
|
242 |
+
<show_in_store>1</show_in_store>
|
243 |
+
|
244 |
+
</shipping_intlkey>
|
245 |
+
|
246 |
+
<shipping_key translate="label">
|
247 |
+
|
248 |
+
<label>Shipping key</label>
|
249 |
+
|
250 |
+
<frontend_type>text</frontend_type>
|
251 |
+
|
252 |
+
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
253 |
+
|
254 |
+
<sort_order>8</sort_order>
|
255 |
+
|
256 |
+
<show_in_default>1</show_in_default>
|
257 |
+
|
258 |
+
<show_in_website>1</show_in_website>
|
259 |
+
|
260 |
+
<show_in_store>1</show_in_store>
|
261 |
+
|
262 |
+
</shipping_key>
|
263 |
+
|
264 |
+
<sort_order translate="label">
|
265 |
+
|
266 |
+
<label>Sort order</label>
|
267 |
+
|
268 |
+
<frontend_type>text</frontend_type>
|
269 |
+
|
270 |
+
<sort_order>100</sort_order>
|
271 |
+
|
272 |
+
<show_in_default>1</show_in_default>
|
273 |
+
|
274 |
+
<show_in_website>1</show_in_website>
|
275 |
+
|
276 |
+
<show_in_store>1</show_in_store>
|
277 |
+
|
278 |
+
</sort_order>
|
279 |
+
-->
|
280 |
+
<title translate="label">
|
281 |
+
|
282 |
+
<label>Title</label>
|
283 |
+
|
284 |
+
<frontend_type>text</frontend_type>
|
285 |
+
|
286 |
+
<sort_order>2</sort_order>
|
287 |
+
|
288 |
+
<show_in_default>1</show_in_default>
|
289 |
+
|
290 |
+
<show_in_website>1</show_in_website>
|
291 |
+
|
292 |
+
<show_in_store>1</show_in_store>
|
293 |
+
|
294 |
+
</title>
|
295 |
+
<!--
|
296 |
+
<sallowspecific translate="label">
|
297 |
+
|
298 |
+
<label>Ship to applicable countries</label>
|
299 |
+
|
300 |
+
<frontend_type>select</frontend_type>
|
301 |
+
|
302 |
+
<sort_order>90</sort_order>
|
303 |
+
|
304 |
+
<frontend_class>shipping-applicable-country</frontend_class>
|
305 |
+
|
306 |
+
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
307 |
+
|
308 |
+
<show_in_default>1</show_in_default>
|
309 |
+
|
310 |
+
<show_in_website>1</show_in_website>
|
311 |
+
|
312 |
+
<show_in_store>1</show_in_store>
|
313 |
+
|
314 |
+
</sallowspecific>
|
315 |
+
|
316 |
+
<specificcountry translate="label">
|
317 |
+
|
318 |
+
<label>Ship to Specific countries</label>
|
319 |
+
|
320 |
+
<frontend_type>multiselect</frontend_type>
|
321 |
+
|
322 |
+
<sort_order>91</sort_order>
|
323 |
+
|
324 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
325 |
+
|
326 |
+
<show_in_default>1</show_in_default>
|
327 |
+
|
328 |
+
<show_in_website>1</show_in_website>
|
329 |
+
|
330 |
+
<show_in_store>1</show_in_store>
|
331 |
+
|
332 |
+
</specificcountry>
|
333 |
+
|
334 |
+
<showmethod translate="label">
|
335 |
+
|
336 |
+
<label>Show method if not applicable</label>
|
337 |
+
|
338 |
+
<frontend_type>select</frontend_type>
|
339 |
+
|
340 |
+
<sort_order>92</sort_order>
|
341 |
+
|
342 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
343 |
+
|
344 |
+
<show_in_default>1</show_in_default>
|
345 |
+
|
346 |
+
<show_in_website>1</show_in_website>
|
347 |
+
|
348 |
+
<show_in_store>1</show_in_store>
|
349 |
+
|
350 |
+
</showmethod>
|
351 |
+
|
352 |
+
<specificerrmsg translate="label">
|
353 |
+
|
354 |
+
<label>Displayed Error Message</label>
|
355 |
+
|
356 |
+
<frontend_type>textarea</frontend_type>
|
357 |
+
|
358 |
+
<sort_order>80</sort_order>
|
359 |
+
|
360 |
+
<show_in_default>1</show_in_default>
|
361 |
+
|
362 |
+
<show_in_website>1</show_in_website>
|
363 |
+
|
364 |
+
<show_in_store>1</show_in_store>
|
365 |
+
|
366 |
+
</specificerrmsg>
|
367 |
+
-->
|
368 |
+
</fields>
|
369 |
+
|
370 |
+
</aramex>
|
371 |
+
</groups>
|
372 |
+
</carriers>
|
373 |
+
</sections>
|
374 |
</config>
|
app/design/adminhtml/default/default/layout/aramex.xml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<adminhtml_sales_order_view>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addItem"><type>skin_js</type><name>aramex/js/jquery.min.js</name></action>
|
6 |
+
<action method="addItem"><type>skin_js</type><name>aramex/js/common.js</name></action>
|
7 |
+
<action method="addItem"><type>skin_css</type><name>aramex/css/aramex.css</name></action>
|
8 |
+
</reference>
|
9 |
+
<reference name="before_body_end">
|
10 |
+
<block type="core/template" name="create_shipment" template="aramex/shipment.phtml" />
|
11 |
+
<block type="core/template" name="calculate_rate" template="aramex/calculate_rate.phtml" />
|
12 |
+
<block type="core/template" name="schedule_puckup" template="aramex/schedule_puckup.phtml" />
|
13 |
+
</reference>
|
14 |
+
<reference name="adminhtml_sales_order_view_tab_history">
|
15 |
+
<action method="setTemplate"><template>aramex/sales/order/view/history.phtml</template></action>
|
16 |
+
</reference>
|
17 |
+
</adminhtml_sales_order_view>
|
18 |
+
<adminhtml_sales_order_shipment_view>
|
19 |
+
<reference name="head">
|
20 |
+
<action method="addItem"><type>skin_js</type><name>aramex/js/jquery.min.js</name></action>
|
21 |
+
<action method="addItem"><type>skin_js</type><name>aramex/js/common.js</name></action>
|
22 |
+
</reference>
|
23 |
+
<reference name="before_body_end">
|
24 |
+
<block type="core/template" name="print_label" template="aramex/print_label.phtml" />
|
25 |
+
</reference>
|
26 |
+
<reference name="order_comments">
|
27 |
+
<action method="setTemplate"><template>aramex/sales/order/comments/view.phtml</template></action>
|
28 |
+
</reference>
|
29 |
+
</adminhtml_sales_order_shipment_view>
|
30 |
+
|
31 |
+
</layout>
|
app/design/adminhtml/default/default/template/aramex/calculate_rate.phtml
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //barry code;?>
|
2 |
+
<?php
|
3 |
+
$_order = Mage::getModel('sales/order')->load($this->getRequest()->getParam('order_id'));
|
4 |
+
?>
|
5 |
+
<?php $shipping = $_order->getShippingAddress(); ?>
|
6 |
+
|
7 |
+
<?php
|
8 |
+
//calculating total weight of current order
|
9 |
+
$state = "";
|
10 |
+
if(($shipping->getData('region_id')) && ($shipping->getCountry() == 'US')){
|
11 |
+
$region = Mage::getModel('directory/region')->load($shipping->getData('region_id'));
|
12 |
+
$state = $region->getName();
|
13 |
+
}
|
14 |
+
else{
|
15 |
+
$state = $shipping->getData('region');
|
16 |
+
}
|
17 |
+
|
18 |
+
$billing_state = "";
|
19 |
+
if($shipping->getData('region_id')){
|
20 |
+
$region = Mage::getModel('directory/region')->load($shipping->getData('region_id'));
|
21 |
+
$billing_state = $region->getName();
|
22 |
+
}
|
23 |
+
else{
|
24 |
+
$billing_state = $shipping->getData('region');
|
25 |
+
}
|
26 |
+
$totalWeight = 0;
|
27 |
+
$itemscount = 0;
|
28 |
+
$itemsv = $_order->getAllVisibleItems();
|
29 |
+
foreach($itemsv as $itemvv){
|
30 |
+
if($itemvv->getQtyOrdered() > $itemvv->getQtyShipped()){
|
31 |
+
$itemscount += $itemvv->getQtyOrdered() - $itemvv->getQtyShipped();
|
32 |
+
}else if($itemvv->getQtyOrdered() == $itemvv->getQtyShipped()){
|
33 |
+
$itemscount += $itemvv->getQtyShipped();
|
34 |
+
}
|
35 |
+
if($itemvv->getWeight() != 0){
|
36 |
+
$weight = $itemvv->getWeight()*$itemvv->getQtyOrdered();
|
37 |
+
} else {
|
38 |
+
$weight = 0.5*$itemvv->getQtyOrdered();
|
39 |
+
}
|
40 |
+
$totalWeight += $weight;
|
41 |
+
}
|
42 |
+
?>
|
43 |
+
<div class="back-over"></div>
|
44 |
+
<div class="cal-rate-part">
|
45 |
+
|
46 |
+
<div class="cal-form">
|
47 |
+
<form method="post" action="<?php echo Mage::helper("adminhtml")->getUrl('aramexshipment/rate/post'); ?>" id="calc-rate-form">
|
48 |
+
|
49 |
+
<FIELDSET>
|
50 |
+
<legend style="font-weight:bold; padding:0 5px;">Calculate Rates</legend>
|
51 |
+
<div class="fields mar-10">
|
52 |
+
<h3>Shipment Origin</h3>
|
53 |
+
<div class="clearfix mar-10">
|
54 |
+
<div class="field fl width-270">
|
55 |
+
<label><span>*</span>Country</label>
|
56 |
+
<?php $_countries = Mage::getResourceModel('directory/country_collection')->loadByStore()->toOptionArray(); ?>
|
57 |
+
<select name="origin_country" id="origin_country">
|
58 |
+
<?php if(count($_countries)>0):?>
|
59 |
+
<?php foreach($_countries as $_country): ?>
|
60 |
+
<option value="<?php echo $_country['value'] ?>" <?php if(Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo (Mage::getStoreConfig('aramexsettings/shipperdetail/country') == $_country['value']) ? 'selected="selected"' : ''; }?>>
|
61 |
+
<?php echo $_country['label'] ?>
|
62 |
+
</option>
|
63 |
+
<?php endforeach; ?>
|
64 |
+
<?php endif;?>
|
65 |
+
</select>
|
66 |
+
</div>
|
67 |
+
<div class="field fl">
|
68 |
+
<label>City</label>
|
69 |
+
<input type="text" name="origin_city" id="origin_city" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/city'); ?>" />
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
<div class="clearfix mar-10">
|
73 |
+
<div class="field fl width-270">
|
74 |
+
<label>Zip code</label>
|
75 |
+
<input type="text" name="origin_zipcode" id="origin_zipcode" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/postalcode'); ?>" />
|
76 |
+
</div>
|
77 |
+
<div class="field fl">
|
78 |
+
<label>State / Province</label>
|
79 |
+
<input type="text" name="origin_state" id="origin_state" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/state'); ?>"/>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
<div class="fields mar-10">
|
84 |
+
<h3>Shipment Destination</h3>
|
85 |
+
<div class="clearfix mar-10">
|
86 |
+
<div class="field fl width-270">
|
87 |
+
<label><span>*</span>Country</label>
|
88 |
+
<select name="destination_country" id="destination_country" >
|
89 |
+
<?php if(count($_countries)>0):?>
|
90 |
+
<?php foreach($_countries as $_country): ?>
|
91 |
+
<option value="<?php echo $_country['value'] ?>" <?php if($shipping){ echo ($shipping->getCountry() == $_country['value']) ? 'selected="selected"' : ''; }?>>
|
92 |
+
<?php echo $_country['label'] ?>
|
93 |
+
</option>
|
94 |
+
<?php endforeach; ?>
|
95 |
+
<?php endif;?>
|
96 |
+
</select>
|
97 |
+
</div>
|
98 |
+
<div class="field fl">
|
99 |
+
<label>City</label>
|
100 |
+
<input type="text" name="destination_city" id="destination_city" value="<?php echo ($shipping) ? $shipping->getData('city') : ''; ?>" />
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
<div class="clearfix mar-10">
|
104 |
+
<div class="field fl width-270">
|
105 |
+
<label>Zip code</label>
|
106 |
+
<input type="text" name="destination_zipcode" id="destination_zipcode" value="<?php echo ($shipping) ? $shipping->getData('postcode') : ''; ?>" />
|
107 |
+
</div>
|
108 |
+
<div class="field fl">
|
109 |
+
<label>State / Province</label>
|
110 |
+
<input type="text" name="destination_state" id="destination_state" value="<?php echo ($shipping) ? $state : ''; ?>" />
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
<div class="fields mar-10">
|
115 |
+
|
116 |
+
<div class="clearfix mar-10">
|
117 |
+
<div class="field fl width-270">
|
118 |
+
<label><span>*</span>Payment Type</label>
|
119 |
+
<select name="payment_type">
|
120 |
+
<option value="P">Prepaid</option>
|
121 |
+
<option value="C">Collect</option>
|
122 |
+
</select>
|
123 |
+
</div>
|
124 |
+
<div class="field fl">
|
125 |
+
<label><span>*</span>Product Type</label>
|
126 |
+
<select name="product_group" id="calc-product-group">
|
127 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="DOM">Domestic</option>
|
128 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="EXP">International Express</option>
|
129 |
+
</select>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
<div class="clearfix mar-10">
|
133 |
+
<div class="field fl width-270">
|
134 |
+
<label><span>*</span>Service Type</label>
|
135 |
+
<select name="service_type" class="fl" id="service_type">
|
136 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="ONP" class="local" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Overnight Parcel</option>
|
137 |
+
<option value="OND" class="local" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Overnight Document</option>
|
138 |
+
<option value="CDA" class="local" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Cash on Delivery</option>
|
139 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="PDX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Document Express</option>
|
140 |
+
<option value="PPX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Parcel Express</option>
|
141 |
+
<option value="PLX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Letter Express</option>
|
142 |
+
<option value="DDX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Deferred Document Express</option>
|
143 |
+
<option value="DPX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Deferred Parcel Express</option>
|
144 |
+
<option value="GDX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Ground Document Express</option>
|
145 |
+
<option value="GPX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Ground Parcel Express</option>
|
146 |
+
</select>
|
147 |
+
</div>
|
148 |
+
<div class="field fl">
|
149 |
+
<label><span>*</span>Weight</label>
|
150 |
+
<div>
|
151 |
+
<input type="text" name="text_weight" class="fl mar-right-10 width-60" value="<?php echo number_format($totalWeight, 2); ?>" />
|
152 |
+
<select name="weight_unit" class="fl width-60">
|
153 |
+
<option value="KG">KG</option>
|
154 |
+
<option value="LB">LB</option>
|
155 |
+
</select>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
<div class="clearfix mar-10">
|
160 |
+
<div class="field fl width-270">
|
161 |
+
<label style="width:270px;"><span>*</span>Number of Pieces:</label>
|
162 |
+
<input type="text" value="<?php echo $itemscount;?>" name="total_count" class="fl" />
|
163 |
+
</div>
|
164 |
+
|
165 |
+
</div>
|
166 |
+
<div class="cal-button-part">
|
167 |
+
<button name="aramex_calc_rate_submit" type="button" id="aramex_calc_rate_submit" onclick="calcRateForm.submit();">Caclculate</button>
|
168 |
+
<button type="button" onclick="myObj.close()">Close</button>
|
169 |
+
<span class="mar-lf-10 red">* are required fields</span>
|
170 |
+
|
171 |
+
<input type="hidden" value="<?php echo $_order->getIncrementId();?>" name="reference" />
|
172 |
+
|
173 |
+
</div>
|
174 |
+
<div class="rate-result mar-10">
|
175 |
+
<h3>Result</h3>
|
176 |
+
<div class="result mar-10"></div>
|
177 |
+
</div>
|
178 |
+
</div>
|
179 |
+
</FIELDSET>
|
180 |
+
|
181 |
+
<script type="text/javascript">
|
182 |
+
//<![CDATA[
|
183 |
+
var calcRateForm = new Validation('calc-rate-form');
|
184 |
+
calcRateForm.submit=function(){
|
185 |
+
if (this.validate()) {
|
186 |
+
myObj.calcRate();
|
187 |
+
}
|
188 |
+
}
|
189 |
+
Event.observe('calc-product-group', 'change', function(){
|
190 |
+
var e=document.getElementById('service_type');
|
191 |
+
if(this.value=='EXP'){
|
192 |
+
e.options[3].selected=true;
|
193 |
+
jQuery('.non-local').show();jQuery('.local').hide(); }
|
194 |
+
else{
|
195 |
+
e.options[0].selected=true;
|
196 |
+
jQuery('.non-local').hide();jQuery('.local').show(); }
|
197 |
+
});
|
198 |
+
<?php $_url=Mage::helper("adminhtml")->getUrl('aramexshipment/shipment/printLabel/order_id/'.$this->getRequest()->getParam('order_id'));?>
|
199 |
+
myObj.printLabelUrl='<?php echo $_url;?>';
|
200 |
+
|
201 |
+
//]]>
|
202 |
+
</script>
|
203 |
+
</form>
|
204 |
+
|
205 |
+
</div>
|
206 |
+
</div>
|
207 |
+
<?php //barry code end;?>
|
app/design/adminhtml/default/default/template/aramex/print_label.phtml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$order_id=$this->getRequest()->getParam('order_id');
|
3 |
+
if(!$order_id){
|
4 |
+
$shipment = Mage::getModel('sales/order_shipment')->load($this->getRequest()->getParam('shipment_id'));
|
5 |
+
$order_id=$shipment->getOrderId();
|
6 |
+
|
7 |
+
}
|
8 |
+
$CurrentUrl = Mage::helper('core/url')->getCurrentUrl();
|
9 |
+
Mage::getSingleton('core/session')->setPreviousUrl($CurrentUrl);
|
10 |
+
?>
|
11 |
+
<script type="text/javascript">
|
12 |
+
//<![CDATA[
|
13 |
+
<?php $_url=Mage::helper("adminhtml")->getUrl('aramexshipment/shipment/printLabel/order_id/'.$order_id);?>
|
14 |
+
myObj.printLabelUrl='<?php echo $_url;?>';
|
15 |
+
//]]>
|
16 |
+
</script>
|
app/design/adminhtml/default/default/template/aramex/sales/order/comments/view.phtml
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 default_default
|
23 |
+
* @copyright Copyright (c) 2011 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 if ($_entity = $this->getEntity()): ?>
|
28 |
+
<div id="comments_block">
|
29 |
+
<span class="field-row">
|
30 |
+
<label class="normal" for="history_comment"><?php echo Mage::helper('sales')->__('Comment Text') ?></label>
|
31 |
+
<textarea name="comment[comment]" rows="3" cols="5" style="height:6em; width:99%;" id="history_comment"></textarea>
|
32 |
+
</span>
|
33 |
+
<div class="f-left">
|
34 |
+
<?php if ($this->canSendCommentEmail()): ?>
|
35 |
+
<input name="comment[is_customer_notified]" type="checkbox" id="history_notify" value="1" />
|
36 |
+
<label class="normal" for="history_notify"><?php echo Mage::helper('sales')->__('Notify Customer by Email') ?></label><br />
|
37 |
+
<?php endif; ?>
|
38 |
+
<input name="comment[is_visible_on_front]" type="checkbox" id="history_visible" value="1" /><label class="normal" for="history_visible"> <?php echo Mage::helper('sales')->__('Visible on Frontend') ?></label>
|
39 |
+
</div>
|
40 |
+
<div class="f-right">
|
41 |
+
<?php echo $this->getChildHtml('submit_button') ?>
|
42 |
+
</div>
|
43 |
+
<div class="clear"></div>
|
44 |
+
<ul class="note-list">
|
45 |
+
<?php foreach ($_entity->getCommentsCollection(true) as $_comment): ?>
|
46 |
+
<li>
|
47 |
+
<strong><?php echo $this->helper('core')->formatDate($_comment->getCreatedAtDate(), 'medium') ?></strong>
|
48 |
+
<?php echo $this->helper('core')->formatTime($_comment->getCreatedAtDate(), 'medium') ?><span class="separator">|</span><small><?php echo $this->helper('sales')->__('Customer') ?>
|
49 |
+
<strong class="subdue">
|
50 |
+
<?php if ($_comment->getIsCustomerNotified()): ?>
|
51 |
+
<?php echo $this->helper('sales')->__('Notified') ?>
|
52 |
+
<img src="<?php echo $this->getSkinUrl('images/ico_success.gif') ?>" width="16" height="16" alt="" />
|
53 |
+
<?php else: ?>
|
54 |
+
<?php echo $this->helper('sales')->__('Not Notified') ?>
|
55 |
+
<?php endif; ?>
|
56 |
+
</strong></small>
|
57 |
+
<br/>
|
58 |
+
|
59 |
+
<?php echo htmlspecialchars_decode($this->escapeHtml($_comment->getComment(), array('b','br','strong','i','u')))?>
|
60 |
+
</li>
|
61 |
+
<?php endforeach; ?>
|
62 |
+
</ul>
|
63 |
+
<script type="text/javascript">
|
64 |
+
function submitComment() {
|
65 |
+
submitAndReloadArea($('comments_block').parentNode, '<?php echo $this->getSubmitUrl() ?>')
|
66 |
+
}
|
67 |
+
|
68 |
+
if ($('submit_comment_button')) {
|
69 |
+
$('submit_comment_button').observe('click', submitComment);
|
70 |
+
}
|
71 |
+
</script>
|
72 |
+
</div>
|
73 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/aramex/sales/order/view/tab/history.phtml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 default_default
|
23 |
+
* @copyright Copyright (c) 2011 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 |
+
<div class="entry-edit">
|
28 |
+
<fieldset>
|
29 |
+
<ul class="note-list">
|
30 |
+
<?php foreach ($this->getFullHistory() as $_item): ?>
|
31 |
+
<li>
|
32 |
+
<strong><?php echo $this->getItemCreatedAt($_item) ?></strong>
|
33 |
+
<?php echo $this->getItemCreatedAt($_item, 'time') ?><span class="separator">|</span>
|
34 |
+
<strong><?php echo $this->getItemTitle($_item) ?></strong>
|
35 |
+
<?php if ($this->isItemNotified($_item, false)): ?>
|
36 |
+
<span class="separator">|</span><small><?php echo $this->helper('sales')->__('Customer') ?>
|
37 |
+
<strong class="subdue">
|
38 |
+
<?php if ($this->isItemNotified($_item)): ?>
|
39 |
+
<?php echo $this->helper('sales')->__('Notified') ?>
|
40 |
+
<img src="<?php echo $this->getSkinUrl('images/ico_success.gif') ?>" width="16px" height="16px" alt="" />
|
41 |
+
<?php else: ?>
|
42 |
+
<?php echo $this->helper('sales')->__('Not Notified') ?>
|
43 |
+
<?php endif; ?>
|
44 |
+
</strong></small>
|
45 |
+
<?php endif; ?>
|
46 |
+
<?php if ($_comment = $this->getItemComment($_item)): ?>
|
47 |
+
<br/><?php echo htmlspecialchars_decode($_comment) ?>
|
48 |
+
<?php endif; ?>
|
49 |
+
</li>
|
50 |
+
<?php endforeach; ?>
|
51 |
+
</ul>
|
52 |
+
</fieldset>
|
53 |
+
</div>
|
app/design/adminhtml/default/default/template/aramex/schedule_puckup.phtml
ADDED
@@ -0,0 +1,336 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //barry code;?>
|
2 |
+
<?php
|
3 |
+
$_order = Mage::getModel('sales/order')->load($this->getRequest()->getParam('order_id'));
|
4 |
+
?>
|
5 |
+
<?php $shipping = $_order->getShippingAddress(); ?>
|
6 |
+
|
7 |
+
<?php
|
8 |
+
//calculating total weight of current order
|
9 |
+
$state = "";
|
10 |
+
if(($shipping->getData('region_id')) && ($shipping->getCountry() == 'US')){
|
11 |
+
$region = Mage::getModel('directory/region')->load($shipping->getData('region_id'));
|
12 |
+
$state = $region->getName();
|
13 |
+
}
|
14 |
+
else{
|
15 |
+
$state = $shipping->getData('region');
|
16 |
+
}
|
17 |
+
|
18 |
+
$billing_state = "";
|
19 |
+
if($shipping->getData('region_id')){
|
20 |
+
$region = Mage::getModel('directory/region')->load($shipping->getData('region_id'));
|
21 |
+
$billing_state = $region->getName();
|
22 |
+
}
|
23 |
+
else{
|
24 |
+
$billing_state = $shipping->getData('region');
|
25 |
+
}
|
26 |
+
$totalWeight = 0;
|
27 |
+
$itemscount = 0;
|
28 |
+
$itemsv = $_order->getAllVisibleItems();
|
29 |
+
foreach($itemsv as $itemvv){
|
30 |
+
if($itemvv->getQtyOrdered() > $itemvv->getQtyShipped()){
|
31 |
+
$itemscount += $itemvv->getQtyOrdered() - $itemvv->getQtyShipped();
|
32 |
+
}else if($itemvv->getQtyOrdered() == $itemvv->getQtyShipped()){
|
33 |
+
$itemscount += $itemvv->getQtyShipped();
|
34 |
+
}
|
35 |
+
if($itemvv->getWeight() != 0){
|
36 |
+
$weight = $itemvv->getWeight()*$itemvv->getQtyOrdered();
|
37 |
+
} else {
|
38 |
+
$weight = 0.5*$itemvv->getQtyOrdered();
|
39 |
+
}
|
40 |
+
$totalWeight += $weight;
|
41 |
+
}
|
42 |
+
?>
|
43 |
+
<div class="schedule-pickup-part">
|
44 |
+
<div class="pickup-form">
|
45 |
+
<form method="post" action="<?php echo Mage::helper("adminhtml")->getUrl('aramexshipment/schedulepickup/post'); ?>" id="pickup-form">
|
46 |
+
<FIELDSET>
|
47 |
+
<legend style="font-weight:bold; padding:0 5px;">Schedule Pickup</legend>
|
48 |
+
<div class="fields mar-5">
|
49 |
+
<h3>Pickup Details</h3>
|
50 |
+
<div class="clearfix mar-5">
|
51 |
+
<div class="field fl width-270">
|
52 |
+
<label>Location:</label>
|
53 |
+
<input type="text" readonly="readonly" name="pickup[location]" id="pickup_location" value="Reception" />
|
54 |
+
</div>
|
55 |
+
<div class="field fl">
|
56 |
+
<label>Vehicle Type:</label>
|
57 |
+
<select name="pickup[vehicle]" id="pickup_vehicle" >
|
58 |
+
<option value="Bike">Small (no specific vehicle required)</option>
|
59 |
+
<option value="Car">Medium (regular car or small van)</option>
|
60 |
+
<option value="Truck">Large (large van or truck required)</option>
|
61 |
+
</select>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
<div class="clearfix mar-5">
|
65 |
+
<div class="field fl width-270">
|
66 |
+
<label><span>*</span>Date:</label>
|
67 |
+
<input type="text" readonly="readonly" name="pickup[date]" id="pickup_date" value="" class="width-150 fl" />
|
68 |
+
<input type="button" value=".." id="pickup_date_button" class="required-entry fl mar-lf-10" style="width:30px;" />
|
69 |
+
</div>
|
70 |
+
<div class="field fl">
|
71 |
+
<label><span>*</span>Ready Time:</label>
|
72 |
+
<select name="pickup[ready_hour]" class="width-60 fl" id="ready_hour">
|
73 |
+
<?php $time=date("H",Mage::app()->getLocale()->storeTimeStamp());?>
|
74 |
+
<?php for($i=7;$i<20;$i++):?>
|
75 |
+
<?php $val=($i<10)?"0{$i}":$i;?>
|
76 |
+
<option value="<?php echo $val;?>" <?php echo ($time==$i)?'selected="selected"':'';?>><?php echo $val;?></option>
|
77 |
+
<?php endfor;?>
|
78 |
+
</select>
|
79 |
+
<select name="pickup[ready_minute]" class="width-60 fl mar-lf-10" id="ready_minute">
|
80 |
+
<?php $time=date("i",Mage::app()->getLocale()->storeTimeStamp());?>
|
81 |
+
<?php for($i=0;$i<=55;$i=$i+5):?>
|
82 |
+
<?php $val=($i<10)?"0{$i}":$i;?>
|
83 |
+
<option value="<?php echo $val;?>" <?php echo ($time==$val)?'selected="selected"':'';?>><?php echo $val;?></option>
|
84 |
+
<?php endfor;?>
|
85 |
+
</select>
|
86 |
+
<div class="clearfix"></div>
|
87 |
+
</div>
|
88 |
+
<div class="field fl mar-lf-10">
|
89 |
+
<label><span>*</span>Closing Time:</label>
|
90 |
+
<select name="pickup[latest_hour]" class="width-60 fl" id="latest_hour">
|
91 |
+
<?php $time=date("H",Mage::app()->getLocale()->storeTimeStamp());?>
|
92 |
+
<?php $time=$time+1;?>
|
93 |
+
<?php for($i=7;$i<20;$i++):?>
|
94 |
+
<?php $val=($i<10)?"0{$i}":$i;?>
|
95 |
+
<option value="<?php echo $val?>" <?php echo ($time==$val)?'selected="selected"':'';?>><?php echo $val;?></option>
|
96 |
+
<?php endfor;?>
|
97 |
+
</select>
|
98 |
+
<select name="pickup[latest_minute]" class="width-60 fl mar-lf-10" id="latest_minute">
|
99 |
+
<?php $time=date("i",Mage::app()->getLocale()->storeTimeStamp());?>
|
100 |
+
<?php for($i=0;$i<=55;$i=$i+5):?>
|
101 |
+
<?php $val=($i<10)?"0{$i}":$i;?>
|
102 |
+
<option value="<?php echo $val;?>" <?php echo ($time==$val)?'selected="selected"':'';?>><?php echo $val;?></option>
|
103 |
+
<?php endfor;?>
|
104 |
+
</select>
|
105 |
+
<div class="clearfix"></div>
|
106 |
+
<script type="text/javascript">// <![CDATA[
|
107 |
+
Calendar.setup({
|
108 |
+
inputField : 'pickup_date',
|
109 |
+
ifFormat : '%m/%e/%Y',
|
110 |
+
button : 'pickup_date_button',
|
111 |
+
align : 'Bl',
|
112 |
+
|
113 |
+
singleClick : true
|
114 |
+
});
|
115 |
+
// ]]></script>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
<div class="clearfix mar-5">
|
119 |
+
<div class="field fl width-270">
|
120 |
+
<label>Reference 1:</label>
|
121 |
+
<input type="text" name="pickup[reference]" id="pickup_reference" value="<?php echo $_order->getIncrementId();?>" />
|
122 |
+
</div>
|
123 |
+
<div class="field fl">
|
124 |
+
<label><span>*</span>Status:</label>
|
125 |
+
<select name="pickup[status]" id="pickup_status" >
|
126 |
+
<option value="Ready">Ready</option>
|
127 |
+
<option value="Pending">Pending</option>
|
128 |
+
</select>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
<div class="clearfix mar-5">
|
132 |
+
<div class="field fl width-270">
|
133 |
+
<label><span>*</span>Product Group:</label>
|
134 |
+
<select name="pickup[product_group]" id="product_group">
|
135 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="DOM">Domestic</option>
|
136 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="EXP">International Express</option>
|
137 |
+
</select>
|
138 |
+
</div>
|
139 |
+
<div class="field fl">
|
140 |
+
<label><span>*</span>Product Type:</label>
|
141 |
+
<select name="pickup[product_type]" class="fl" id="product_type">
|
142 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="ONP" class="local" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Overnight Parcel</option>
|
143 |
+
<option value="OND" class="local" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Overnight Document</option>
|
144 |
+
<option value="CDA" class="local" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Cash on Delivery</option>
|
145 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="PDX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Document Express</option>
|
146 |
+
<option value="PPX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Parcel Express</option>
|
147 |
+
<option value="PLX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Letter Express</option>
|
148 |
+
<option value="DDX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Deferred Document Express</option>
|
149 |
+
<option value="DPX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Deferred Parcel Express</option>
|
150 |
+
<option value="GDX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Ground Document Express</option>
|
151 |
+
<option value="GPX" class="non-local" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Ground Parcel Express</option>
|
152 |
+
</select>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
<div class="clearfix mar-5">
|
156 |
+
<div class="field fl width-270">
|
157 |
+
<label><span>*</span>Payment Type:</label>
|
158 |
+
<select name="pickup[payment_type]">
|
159 |
+
<option value="P">Prepaid</option>
|
160 |
+
<option value="C">Collect</option>
|
161 |
+
</select>
|
162 |
+
</div>
|
163 |
+
<div class="field fl">
|
164 |
+
<label><span>*</span>Weight</label>
|
165 |
+
<div>
|
166 |
+
<input type="text" name="pickup[text_weight]" class="fl mar-right-10 width-60" value="<?php echo number_format($totalWeight, 2); ?>" />
|
167 |
+
<select name="pickup[weight_unit]" class="fl width-60">
|
168 |
+
<option value="KG">KG</option>
|
169 |
+
<option value="LB">LB</option>
|
170 |
+
</select>
|
171 |
+
</div>
|
172 |
+
</div>
|
173 |
+
</div>
|
174 |
+
<div class="clearfix mar-5">
|
175 |
+
<div class="field fl width-270">
|
176 |
+
<label class="width-150"><span>*</span>Number of Pieces:</label>
|
177 |
+
<input type="text" name="pickup[no_pieces]" id="pickup_no_pieces" value="<?php echo $itemscount;?>" />
|
178 |
+
</div>
|
179 |
+
<div class="field fl">
|
180 |
+
<label class="width-150">Number of Shipments:</label>
|
181 |
+
<input type="text" name="pickup[no_shipments]" id="pickup_no_shipments" value="1" />
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
|
185 |
+
</div>
|
186 |
+
<div class="fields mar-10">
|
187 |
+
<h3>Address Information</h3>
|
188 |
+
<div class="clearfix mar-5">
|
189 |
+
<div class="field fl width-270">
|
190 |
+
<label><span>*</span>Company:</label>
|
191 |
+
<input type="text" name="pickup[company]" id="pickup_company" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/company'); ?>" />
|
192 |
+
</div>
|
193 |
+
<div class="field fl">
|
194 |
+
<label><span>*</span>Contact:</label>
|
195 |
+
<input type="text" name="pickup[contact]" id="pickup_contact" value="" />
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
<div class="clearfix mar-5">
|
199 |
+
<div class="field fl width-270">
|
200 |
+
<label><span>*</span>Phone:</label>
|
201 |
+
<input type="text" name="pickup[phone]" id="pickup_phone" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/phone'); ?>" />
|
202 |
+
</div>
|
203 |
+
<div class="field fl">
|
204 |
+
<label>Extension:</label>
|
205 |
+
<input type="text" name="pickup[ext]" id="pickup_ext" value="" />
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
+
<div class="clearfix mar-5">
|
209 |
+
<div class="field">
|
210 |
+
<label><span>*</span>Mobile:</label>
|
211 |
+
<input type="text" name="pickup[mobile]" id="pickup_mobile" value="" class="width-full required-entry" />
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
<div class="clearfix mar-5">
|
215 |
+
<div class="field">
|
216 |
+
<label><span>*</span>Address:</label>
|
217 |
+
<input type="text" name="pickup[address]" id="pickup_address" value="" class="width-full required-entry" />
|
218 |
+
</div>
|
219 |
+
</div>
|
220 |
+
<?php $_countries = Mage::getResourceModel('directory/country_collection')->loadByStore()->toOptionArray(); ?>
|
221 |
+
<div class="clearfix mar-5">
|
222 |
+
<div class="field fl width-270">
|
223 |
+
<label><span>*</span>Country:</label>
|
224 |
+
<select name="pickup[country]" id="pickup_country" >
|
225 |
+
<?php if(count($_countries)>0):?>
|
226 |
+
<?php foreach($_countries as $_country): ?>
|
227 |
+
<option value="<?php echo $_country['value'] ?>" <?php if($shipping){ echo ($shipping->getCountry() == $_country['value']) ? 'selected="selected"' : ''; }?>>
|
228 |
+
<?php echo $_country['label'] ?>
|
229 |
+
</option>
|
230 |
+
<?php endforeach; ?>
|
231 |
+
<?php endif;?>
|
232 |
+
</select>
|
233 |
+
</div>
|
234 |
+
<div class="field fl">
|
235 |
+
<label>State/Prov:</label>
|
236 |
+
<input type="text" name="pickup[state]" id="pickup_state" value="" />
|
237 |
+
</div>
|
238 |
+
</div>
|
239 |
+
<div class="clearfix mar-5">
|
240 |
+
<div class="field fl width-270">
|
241 |
+
<label>City:</label>
|
242 |
+
<input type="text" name="pickup[city]" id="pickup_city" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/city'); ?>" />
|
243 |
+
</div>
|
244 |
+
<div class="field fl">
|
245 |
+
<label>Post Code:</label>
|
246 |
+
<input type="text" name="pickup[zip]" id="pickup_zip" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/postalcode'); ?>" />
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
<div class="clearfix mar-5">
|
250 |
+
<div class="field">
|
251 |
+
<label><span>*</span>Email:</label>
|
252 |
+
<input type="text" name="pickup[email]" id="pickup_email" value="" class="width-full required-entry" />
|
253 |
+
</div>
|
254 |
+
</div>
|
255 |
+
<div class="clearfix mar-5">
|
256 |
+
<div class="field">
|
257 |
+
<label>Comments:</label>
|
258 |
+
<input type="text" name="pickup[comments]" id="pickup_comments" value="" class="width-full" />
|
259 |
+
</div>
|
260 |
+
</div>
|
261 |
+
<div class="cal-button-part">
|
262 |
+
<button name="aramex_pickup_submit" type="button" id="aramex_pickup_submit" onclick="pickupForm.submit();">Submit</button>
|
263 |
+
<button type="button" onclick="myObj.close()">Close</button>
|
264 |
+
<span class="mar-lf-10 red">* are required fields</span>
|
265 |
+
<input type="hidden" value="<?php echo $this->getRequest()->getParam('order_id');?>" name="pickup[order_id]" />
|
266 |
+
</div>
|
267 |
+
<div class="pickup-result mar-10">
|
268 |
+
<h3>Result</h3>
|
269 |
+
<div class="pickup-res mar-10"></div>
|
270 |
+
</div>
|
271 |
+
</div>
|
272 |
+
</FIELDSET>
|
273 |
+
</form>
|
274 |
+
<script type="text/javascript">
|
275 |
+
//<![CDATA[
|
276 |
+
var H='<?php echo date("H",Mage::app()->getLocale()->storeTimeStamp());?>';
|
277 |
+
var M='<?php echo date("i",Mage::app()->getLocale()->storeTimeStamp());?>';
|
278 |
+
var D='<?php echo date("m/d/Y",Mage::app()->getLocale()->storeTimeStamp());?>';
|
279 |
+
var pickupForm = new Validation('pickup-form');
|
280 |
+
pickupForm.submit=function(){
|
281 |
+
var rH=$('ready_hour').value;
|
282 |
+
var lH=$('latest_hour').value;
|
283 |
+
var rM=$('ready_minute').value;
|
284 |
+
var lM=$('latest_minute').value;
|
285 |
+
var error=false;
|
286 |
+
var rDate=$('pickup_date').value;
|
287 |
+
if(rDate=='' || rDate==null){ alert("Pickup Date should not empty"); return; }
|
288 |
+
rDate=rDate.split("/");
|
289 |
+
cDate=D.split("/");
|
290 |
+
var isCheckTime=false;
|
291 |
+
|
292 |
+
if(rDate[2]<cDate[2]){
|
293 |
+
error=true;
|
294 |
+
}else if(rDate[2]==cDate[2]){
|
295 |
+
if(rDate[0]<cDate[0]){
|
296 |
+
error=true;
|
297 |
+
}else if(rDate[0]==cDate[0]){
|
298 |
+
if(rDate[1]<cDate[1]){
|
299 |
+
error=true;
|
300 |
+
}else if(rDate[1]==cDate[1]){
|
301 |
+
if(rH<H){
|
302 |
+
alert("Ready Time should be greater than Current Time");
|
303 |
+
return;
|
304 |
+
}else if(rH==H && rM<M){
|
305 |
+
alert("Ready Time should be greater than Current Time");
|
306 |
+
return;
|
307 |
+
}
|
308 |
+
isCheckTime=true;
|
309 |
+
}
|
310 |
+
}
|
311 |
+
}
|
312 |
+
if(error){
|
313 |
+
alert("Pickup Date should be greater than Current Date");
|
314 |
+
return;
|
315 |
+
}
|
316 |
+
|
317 |
+
if(isCheckTime){
|
318 |
+
if(lH<rH ){
|
319 |
+
error=true;
|
320 |
+
}else if(lH<=rH && lM<=rM){
|
321 |
+
error=true;
|
322 |
+
}
|
323 |
+
if(error){
|
324 |
+
alert("Closing Time always greater than Ready Time");
|
325 |
+
return;
|
326 |
+
}
|
327 |
+
}
|
328 |
+
if (this.validate()) {
|
329 |
+
myObj.schedulePickup();
|
330 |
+
}
|
331 |
+
}
|
332 |
+
//]]>
|
333 |
+
</script>
|
334 |
+
</div>
|
335 |
+
</div>
|
336 |
+
<?php //barry code end;?>
|
app/design/adminhtml/default/default/template/{sales/order/view/tab/info.phtml → aramex/shipment.phtml}
RENAMED
@@ -1,1315 +1,961 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
*
|
4 |
-
*
|
5 |
-
*
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
<?php
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
<?php
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
<?php
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
<
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
<
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
<div class="text_short">
|
466 |
-
<label>
|
467 |
-
</div>
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
?>
|
498 |
-
<
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
document.getElementById('
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
document.getElementById('
|
910 |
-
document.getElementById('
|
911 |
-
document.getElementById('
|
912 |
-
document.getElementById('
|
913 |
-
|
914 |
-
document.getElementById('
|
915 |
-
document.getElementById('
|
916 |
-
document.getElementById('
|
917 |
-
document.getElementById('
|
918 |
-
document.getElementById('
|
919 |
-
document.getElementById('
|
920 |
-
document.getElementById('
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
document.getElementById('aramex_shipment_shipper_name').value = aramex_shipment_shipper_name;
|
964 |
-
document.getElementById('aramex_shipment_shipper_email').value = aramex_shipment_shipper_email;
|
965 |
-
document.getElementById('aramex_shipment_shipper_company').value = aramex_shipment_shipper_company;
|
966 |
-
document.getElementById('aramex_shipment_shipper_street').value = aramex_shipment_shipper_street;
|
967 |
-
document.getElementById('aramex_shipment_shipper_country').value = aramex_shipment_shipper_country;
|
968 |
-
document.getElementById('aramex_shipment_shipper_city').value = aramex_shipment_shipper_city;
|
969 |
-
document.getElementById('aramex_shipment_shipper_postal').value = aramex_shipment_shipper_postal;
|
970 |
-
document.getElementById('aramex_shipment_shipper_state').value = aramex_shipment_shipper_state;
|
971 |
-
document.getElementById('aramex_shipment_shipper_phone').value = aramex_shipment_shipper_phone;
|
972 |
-
|
973 |
-
document.getElementById('aramex_shipment_info_payment_type').value = 'P';
|
974 |
-
|
975 |
-
document.getElementById('ASCC').style.display = 'none';
|
976 |
-
document.getElementById('ARCC').style.display = 'none';
|
977 |
-
|
978 |
-
document.getElementById('CASH').style.display = 'block';
|
979 |
-
document.getElementById('ACCT').style.display = 'block';
|
980 |
-
document.getElementById('PPST').style.display = 'block';
|
981 |
-
document.getElementById('CRDT').style.display = 'block';
|
982 |
-
|
983 |
-
jccc('#aramex_shipment_info_payment_option').val("");
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
}
|
989 |
-
else if(flag = 2){
|
990 |
-
document.getElementById('aramex_shipment_shipper_name').value = aramex_shipment_shipper_name;
|
991 |
-
document.getElementById('aramex_shipment_shipper_email').value = aramex_shipment_shipper_email;
|
992 |
-
document.getElementById('aramex_shipment_shipper_company').value = aramex_shipment_shipper_company;
|
993 |
-
document.getElementById('aramex_shipment_shipper_street').value = aramex_shipment_shipper_street;
|
994 |
-
document.getElementById('aramex_shipment_shipper_country').value = aramex_shipment_shipper_country;
|
995 |
-
document.getElementById('aramex_shipment_shipper_city').value = aramex_shipment_shipper_city;
|
996 |
-
document.getElementById('aramex_shipment_shipper_postal').value = aramex_shipment_shipper_postal;
|
997 |
-
document.getElementById('aramex_shipment_shipper_state').value = aramex_shipment_shipper_state;
|
998 |
-
document.getElementById('aramex_shipment_shipper_phone').value = aramex_shipment_shipper_phone;
|
999 |
-
|
1000 |
-
document.getElementById('aramex_shipment_receiver_name').value = aramex_shipment_receiver_name;
|
1001 |
-
document.getElementById('aramex_shipment_receiver_email').value = aramex_shipment_receiver_email;
|
1002 |
-
document.getElementById('aramex_shipment_receiver_company').value = aramex_shipment_receiver_company;
|
1003 |
-
document.getElementById('aramex_shipment_receiver_street').value = aramex_shipment_receiver_street;
|
1004 |
-
document.getElementById('aramex_shipment_receiver_country').value = aramex_shipment_receiver_country;
|
1005 |
-
document.getElementById('aramex_shipment_receiver_city').value = aramex_shipment_receiver_city;
|
1006 |
-
document.getElementById('aramex_shipment_receiver_postal').value = aramex_shipment_receiver_postal;
|
1007 |
-
document.getElementById('aramex_shipment_receiver_state').value = aramex_shipment_receiver_state;
|
1008 |
-
document.getElementById('aramex_shipment_receiver_phone').value = aramex_shipment_receiver_phone;
|
1009 |
-
|
1010 |
-
document.getElementById('aramex_shipment_info_payment_type').value = 'P';
|
1011 |
-
|
1012 |
-
document.getElementById('ASCC').style.display = 'none';
|
1013 |
-
document.getElementById('ARCC').style.display = 'none';
|
1014 |
-
|
1015 |
-
document.getElementById('CASH').style.display = 'block';
|
1016 |
-
document.getElementById('ACCT').style.display = 'block';
|
1017 |
-
document.getElementById('PPST').style.display = 'block';
|
1018 |
-
document.getElementById('CRDT').style.display = 'block';
|
1019 |
-
|
1020 |
-
jccc('#aramex_shipment_info_payment_option').val("");
|
1021 |
-
|
1022 |
-
|
1023 |
-
}
|
1024 |
-
flag = 0;
|
1025 |
-
}
|
1026 |
-
}
|
1027 |
-
|
1028 |
-
jccc('#aramex_shipment_info_payment_type').change(function(){
|
1029 |
-
//alert('Hello');
|
1030 |
-
if(jccc('#aramex_shipment_info_payment_type').val() == "P"){
|
1031 |
-
document.getElementById('ASCC').style.display = 'none';
|
1032 |
-
document.getElementById('ARCC').style.display = 'none';
|
1033 |
-
|
1034 |
-
document.getElementById('CASH').style.display = 'block';
|
1035 |
-
document.getElementById('ACCT').style.display = 'block';
|
1036 |
-
document.getElementById('PPST').style.display = 'block';
|
1037 |
-
document.getElementById('CRDT').style.display = 'block';
|
1038 |
-
|
1039 |
-
jccc('#aramex_shipment_info_payment_option').val("");
|
1040 |
-
|
1041 |
-
|
1042 |
-
}
|
1043 |
-
else{
|
1044 |
-
document.getElementById('ASCC').style.display = 'block';
|
1045 |
-
document.getElementById('ARCC').style.display = 'block';
|
1046 |
-
|
1047 |
-
document.getElementById('CASH').style.display = 'none';
|
1048 |
-
document.getElementById('ACCT').style.display = 'none';
|
1049 |
-
document.getElementById('PPST').style.display = 'none';
|
1050 |
-
document.getElementById('CRDT').style.display = 'none';
|
1051 |
-
|
1052 |
-
jccc('#aramex_shipment_info_payment_option').val("");
|
1053 |
-
|
1054 |
-
}
|
1055 |
-
});
|
1056 |
-
|
1057 |
-
|
1058 |
-
function togglePickup(){
|
1059 |
-
jccc('#pickup_infromation').toggle('slow');
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
|
1063 |
-
function aramexpop(itemscount)
|
1064 |
-
{
|
1065 |
-
<?php /*if($itemscount > 0){ ?>
|
1066 |
-
jccc("#aramex_overlay").css("display", "block");
|
1067 |
-
jccc("#aramex_shipment_creation").fadeIn(1000);
|
1068 |
-
<?php } else { ?>
|
1069 |
-
alert('Cannot create a shipment, all items have been shipped');
|
1070 |
-
<?php }*/ ?>
|
1071 |
-
|
1072 |
-
|
1073 |
-
if(itemscount > 0){
|
1074 |
-
jccc("#aramex_overlay").css("display", "block");
|
1075 |
-
jccc("#aramex_shipment_creation").fadeIn(1000);
|
1076 |
-
}
|
1077 |
-
else{
|
1078 |
-
alert('Cannot create a shipment, all items have been shipped');
|
1079 |
-
}
|
1080 |
-
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
function aramexclose()
|
1084 |
-
{
|
1085 |
-
jccc("#aramex_overlay").css("display", "none");
|
1086 |
-
jccc("#aramex_shipment_creation").fadeOut(500);
|
1087 |
-
}
|
1088 |
-
|
1089 |
-
function aramexhide(aramexid, item_price, order_total_weight)
|
1090 |
-
{
|
1091 |
-
|
1092 |
-
//alert((parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val())-parseFloat(item_price)).toFixed(2));
|
1093 |
-
|
1094 |
-
if(jccc(".aramex_item_tobe_shipped").length > 1){
|
1095 |
-
//jccc("input[name=aramex_shipment_info_items_subtotal]").val(parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val())-parseFloat(item_price));
|
1096 |
-
|
1097 |
-
//alert(parseFloat(jccc("#order-total-weight").html()) - parseFloat(order_total_weight));
|
1098 |
-
jccc("#order-total-weight").html((parseFloat(jccc("#order-total-weight").html()) - parseFloat(order_total_weight)).toFixed(2));
|
1099 |
-
jccc("#order_weight").val((parseFloat(jccc("#order-total-weight").html()) - parseFloat(order_total_weight)).toFixed(2));
|
1100 |
-
|
1101 |
-
jccc("input[name=aramex_shipment_info_items_subtotal]").val((parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val())-parseFloat(item_price)).toFixed(2));
|
1102 |
-
|
1103 |
-
//new
|
1104 |
-
jccc('#aramex_shipment_info_cod_amount').val((parseFloat(jccc('#aramex_shipment_info_cod_amount').val()) - parseFloat(parseInt(jccc("input[name="+ aramexid +"]").val()) * parseFloat(jccc('#aramex_items_base_price_'+aramexid).val()))).toFixed(2));
|
1105 |
-
|
1106 |
-
jccc("#item"+aramexid).css('background', '#F2C2C8');
|
1107 |
-
jccc("#item"+aramexid).fadeOut(500);
|
1108 |
-
jccc("#item"+aramexid+" input").val(0);
|
1109 |
-
jccc("#item"+aramexid).remove();
|
1110 |
-
jccc("#"+aramexid).remove();
|
1111 |
-
jccc("textarea[name=aramex_shipment_description]").text(jccc("#aramex_shipment_description_div").text());
|
1112 |
-
get_tobe_shipped_items_number();
|
1113 |
-
} else {
|
1114 |
-
alert('At least one item is needed to create a shipment.');
|
1115 |
-
}
|
1116 |
-
}
|
1117 |
-
|
1118 |
-
function get_tobe_shipped_items_number()
|
1119 |
-
{
|
1120 |
-
items_tobe_shipped_number = 0;
|
1121 |
-
jccc("#aramex_items_table .aramex_input_items_qty").each(function(qty_index){
|
1122 |
-
items_tobe_shipped_number += parseFloat(jccc(this).val());
|
1123 |
-
});
|
1124 |
-
//items_tobe_shipped_number = jccc(".aramex_item_tobe_shipped").length;
|
1125 |
-
jccc("#items_tobe_shipped_number").html(items_tobe_shipped_number);
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
var codTotal = jccc("#aramex_shipment_info_cod_amount").val();
|
1129 |
-
|
1130 |
-
jccc(".aramex_input_items_qty").keyup(function(){
|
1131 |
-
var the_id = jccc(this).attr('name');
|
1132 |
-
var items_price = 0;
|
1133 |
-
|
1134 |
-
var itemWeight = 0;
|
1135 |
-
var itemTotalPrice = 0;
|
1136 |
-
|
1137 |
-
jccc("#aramex_items_"+the_id).val(jccc(this).val());
|
1138 |
-
jccc(".aramex_input_items_qty").each(function(price_index){
|
1139 |
-
var the_id_qty = jccc(this).attr('name');//alert(the_id_qty);
|
1140 |
-
items_price += jccc(this).val() * jccc("#aramex_items_base_price_"+the_id_qty).val();
|
1141 |
-
|
1142 |
-
itemWeight += jccc(this).val() * jccc("#aramex_items_base_weight_"+the_id_qty).val();
|
1143 |
-
itemTotalPrice += (parseInt(jccc("#aramex_items_total_"+the_id_qty).val()) - parseInt(jccc(this).val())) * jccc("#aramex_items_base_price_"+the_id_qty).val();
|
1144 |
-
|
1145 |
-
});
|
1146 |
-
|
1147 |
-
//jccc("input[name=aramex_shipment_info_items_subtotal]").val(items_price);
|
1148 |
-
|
1149 |
-
jccc("input[name=aramex_shipment_info_items_subtotal]").val(items_price.toFixed(2));
|
1150 |
-
jccc("#order-total-weight").html(itemWeight.toFixed(2));
|
1151 |
-
|
1152 |
-
if(itemTotalPrice){
|
1153 |
-
jccc("#aramex_shipment_info_cod_amount").val((parseFloat('<?php echo round($_order->getData('grand_total'), 2) ?>') - parseFloat(itemTotalPrice)).toFixed(2));
|
1154 |
-
}
|
1155 |
-
else if(itemTotalPrice == 0){
|
1156 |
-
jccc("#aramex_shipment_info_cod_amount").val(codTotal);
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
jccc("input[name=aramex_shipment_info_cod_value]").val(parseFloat(items_price) + parseFloat(jccc("input[name=aramex_shipment_info_shipping_charges]").val()));
|
1160 |
-
get_tobe_shipped_items_number();
|
1161 |
-
});
|
1162 |
-
|
1163 |
-
var messages_content;
|
1164 |
-
<?php
|
1165 |
-
if(Mage::app()->getRequest()->getParam('aramexpopup') == 'show'){
|
1166 |
-
?>
|
1167 |
-
//aramexpop();
|
1168 |
-
jccc("#messages").ready(function(){
|
1169 |
-
jccc("#aramex_messages").html(jccc("#messages").html());
|
1170 |
-
});
|
1171 |
-
<?php
|
1172 |
-
}
|
1173 |
-
?>
|
1174 |
-
|
1175 |
-
jccc("input[name=aramex_shipment_info_shipping_charges]").change(function(){
|
1176 |
-
var cod_value = parseFloat(jccc("input[name=aramex_shipment_info_shipping_charges]").val()) + parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val());
|
1177 |
-
jccc("input[name=aramex_shipment_info_cod_value]").val(cod_value);
|
1178 |
-
});
|
1179 |
-
|
1180 |
-
jccc(".aramex_countries").change(function(){
|
1181 |
-
if(jccc("select[name=aramex_shipment_shipper_country]").val() != jccc("select[name=aramex_shipment_receiver_country]").val()){
|
1182 |
-
jccc("select[name=aramex_shipment_info_product_group]").val('EXP');
|
1183 |
-
//jccc("select[name=aramex_shipment_info_service_type]").val('EPX');
|
1184 |
-
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1185 |
-
jccc("select[name=aramex_shipment_info_additional_services] .express_service").attr("selected", "selected");
|
1186 |
-
|
1187 |
-
document.getElementById('aramex_shipment_info_product_type').value = 'PDX';
|
1188 |
-
document.getElementById('ONP').style.display = 'none';
|
1189 |
-
document.getElementById('OND').style.display = 'none';
|
1190 |
-
document.getElementById('CDA').style.display = 'none';
|
1191 |
-
|
1192 |
-
document.getElementById('PDX').style.display = 'block';
|
1193 |
-
document.getElementById('PPX').style.display = 'block';
|
1194 |
-
document.getElementById('PLX').style.display = 'block';
|
1195 |
-
document.getElementById('DDX').style.display = 'block';
|
1196 |
-
document.getElementById('DPX').style.display = 'block';
|
1197 |
-
document.getElementById('GDX').style.display = 'block';
|
1198 |
-
document.getElementById('GPX').style.display = 'block';
|
1199 |
-
|
1200 |
-
} else {
|
1201 |
-
jccc("select[name=aramex_shipment_info_product_group]").val('DOM');
|
1202 |
-
//jccc("select[name=aramex_shipment_info_service_type]").val('ONP');
|
1203 |
-
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1204 |
-
jccc("select[name=aramex_shipment_info_additional_services] .domestic_service").attr("selected", "selected");
|
1205 |
-
|
1206 |
-
document.getElementById('aramex_shipment_info_product_type').value = 'ONP';
|
1207 |
-
document.getElementById('ONP').style.display = 'block';
|
1208 |
-
document.getElementById('OND').style.display = 'block';
|
1209 |
-
document.getElementById('CDA').style.display = 'block';
|
1210 |
-
|
1211 |
-
document.getElementById('PDX').style.display = 'none';
|
1212 |
-
document.getElementById('PPX').style.display = 'none';
|
1213 |
-
document.getElementById('PLX').style.display = 'none';
|
1214 |
-
document.getElementById('DDX').style.display = 'none';
|
1215 |
-
document.getElementById('DPX').style.display = 'none';
|
1216 |
-
document.getElementById('GDX').style.display = 'none';
|
1217 |
-
document.getElementById('GPX').style.display = 'none';
|
1218 |
-
}
|
1219 |
-
|
1220 |
-
jccc("#aramex_shipment_info_product_group_div").html(jccc("select[name=aramex_shipment_info_product_group] option:selected").text());
|
1221 |
-
jccc("#aramex_shipment_info_service_type_div").html(jccc("select[name=aramex_shipment_info_service_type] option:selected").text());
|
1222 |
-
jccc("#aramex_shipment_info_additional_services_div").html(jccc("select[name=aramex_shipment_info_additional_services] option:selected").text());
|
1223 |
-
});
|
1224 |
-
|
1225 |
-
jccc(".aramex_all_options").change(function(){
|
1226 |
-
// if(jccc("select[name=aramex_shipment_shipper_country]").val() != jccc("select[name=aramex_shipment_receiver_country]").val()){
|
1227 |
-
// jccc("select[name=aramex_shipment_info_product_group]").val('EXP');
|
1228 |
-
// //jccc("select[name=aramex_shipment_info_service_type]").val('EPX');
|
1229 |
-
// jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1230 |
-
// jccc("select[name=aramex_shipment_info_additional_services] .express_service").attr("selected", "selected");
|
1231 |
-
// } else {
|
1232 |
-
// jccc("select[name=aramex_shipment_info_product_group]").val('DOM');
|
1233 |
-
// //jccc("select[name=aramex_shipment_info_service_type]").val('ONP');
|
1234 |
-
// jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1235 |
-
// jccc("select[name=aramex_shipment_info_additional_services] .domestic_service").attr("selected", "selected");
|
1236 |
-
// }
|
1237 |
-
|
1238 |
-
});
|
1239 |
-
jccc("#aramex_shipment_info_product_group").change(function(){
|
1240 |
-
if(jccc("select[name=aramex_shipment_info_product_group]").val()=='EXP'){
|
1241 |
-
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1242 |
-
jccc("select[name=aramex_shipment_info_additional_services] .express_service").attr("selected", "selected");
|
1243 |
-
|
1244 |
-
document.getElementById('aramex_shipment_info_product_type').value = 'PDX';
|
1245 |
-
document.getElementById('ONP').style.display = 'none';
|
1246 |
-
document.getElementById('OND').style.display = 'none';
|
1247 |
-
document.getElementById('CDA').style.display = 'none';
|
1248 |
-
|
1249 |
-
document.getElementById('PDX').style.display = 'block';
|
1250 |
-
document.getElementById('PPX').style.display = 'block';
|
1251 |
-
document.getElementById('PLX').style.display = 'block';
|
1252 |
-
document.getElementById('DDX').style.display = 'block';
|
1253 |
-
document.getElementById('DPX').style.display = 'block';
|
1254 |
-
document.getElementById('GDX').style.display = 'block';
|
1255 |
-
document.getElementById('GPX').style.display = 'block';
|
1256 |
-
|
1257 |
-
}else if(jccc("select[name=aramex_shipment_info_product_group]").val()=='DOM'){
|
1258 |
-
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1259 |
-
jccc("select[name=aramex_shipment_info_additional_services] .domestic_service").attr("selected", "selected");
|
1260 |
-
|
1261 |
-
document.getElementById('aramex_shipment_info_product_type').value = 'ONP';
|
1262 |
-
document.getElementById('ONP').style.display = 'block';
|
1263 |
-
document.getElementById('OND').style.display = 'block';
|
1264 |
-
document.getElementById('CDA').style.display = 'block';
|
1265 |
-
|
1266 |
-
document.getElementById('PDX').style.display = 'none';
|
1267 |
-
document.getElementById('PPX').style.display = 'none';
|
1268 |
-
document.getElementById('PLX').style.display = 'none';
|
1269 |
-
document.getElementById('DDX').style.display = 'none';
|
1270 |
-
document.getElementById('DPX').style.display = 'none';
|
1271 |
-
document.getElementById('GDX').style.display = 'none';
|
1272 |
-
document.getElementById('GPX').style.display = 'none';
|
1273 |
-
|
1274 |
-
}
|
1275 |
-
// jccc("#aramex_shipment_info_product_group_div").html(jccc("select[name=aramex_shipment_info_product_group] option:selected").text());
|
1276 |
-
jccc("#aramex_shipment_info_service_type_div").html(jccc("select[name=aramex_shipment_info_service_type] option:selected").text());
|
1277 |
-
jccc("#aramex_shipment_info_additional_services_div").html(jccc("select[name=aramex_shipment_info_additional_services] option:selected").text());
|
1278 |
-
|
1279 |
-
});
|
1280 |
-
jccc("#aramex_shipment_info_product_group_div").html(jccc("select[name=aramex_shipment_info_product_group] option:selected").text());
|
1281 |
-
jccc("#aramex_shipment_info_service_type_div").html(jccc("select[name=aramex_shipment_info_service_type] option:selected").text());
|
1282 |
-
jccc("#aramex_shipment_info_additional_services_div").html(jccc("select[name=aramex_shipment_info_additional_services] option:selected").text());
|
1283 |
-
|
1284 |
-
//jccc("#aramex_shipment").validate();
|
1285 |
-
|
1286 |
-
jccc(document).ready(function(){
|
1287 |
-
if((jccc('#aramex_messages').html() != "") && (jccc('.error-msg'))){
|
1288 |
-
jccc("#aramex_overlay").css("display", "block");
|
1289 |
-
jccc("#aramex_shipment_creation").fadeIn(1000);
|
1290 |
-
}
|
1291 |
-
|
1292 |
-
jccc(function() {
|
1293 |
-
//jccc( "#datepicker" ).datepicker();
|
1294 |
-
jccc( "#aramex_shipment_info_pickup_date" ).datepicker({ dateFormat: "yy-mm-dd" });
|
1295 |
-
jccc( "#aramex_shipment_info_ready_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
1296 |
-
jccc( "#aramex_shipment_info_last_pickup_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
1297 |
-
jccc( "#aramex_shipment_info_closing_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
1298 |
-
});
|
1299 |
-
|
1300 |
-
jccc('#filereset').click(function(){
|
1301 |
-
jccc("#file1_div").html(jccc("#file1_div").html());
|
1302 |
-
});
|
1303 |
-
jccc('#file2reset').click(function(){
|
1304 |
-
jccc("#file2_div").html(jccc("#file2_div").html());
|
1305 |
-
});
|
1306 |
-
jccc('#file3reset').click(function(){
|
1307 |
-
jccc("#file3_div").html(jccc("#file3_div").html());
|
1308 |
-
});
|
1309 |
-
jccc("#aramex_shipment").validate();
|
1310 |
-
|
1311 |
-
});
|
1312 |
-
|
1313 |
-
</script><?php /* ?>
|
1314 |
-
<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/aramexgeo_adminhtml.js') ?>"></script>
|
1315 |
-
<?php */ ?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ADDITIONAL HTML for Local-Extension Aramex_Shipment.
|
4 |
+
* (Load html for shipment creation)
|
5 |
+
* popup
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_order = Mage::getModel('sales/order')->load($this->getRequest()->getParam('order_id'));
|
10 |
+
$shipping = $_order->getShippingAddress();
|
11 |
+
$customerId = $_order->getCustomerId();
|
12 |
+
$customer = Mage::getModel('customer/customer')->load($customerId);
|
13 |
+
$countryCollection = Mage::getModel('directory/country_api')->items();
|
14 |
+
$payment = $_order->getPayment();
|
15 |
+
|
16 |
+
//calculating total weight of current order
|
17 |
+
$totalWeight = 0;
|
18 |
+
$itemscount = 0;
|
19 |
+
$isShipped=false;
|
20 |
+
$itemsv = $_order->getAllVisibleItems();
|
21 |
+
foreach($itemsv as $itemvv){
|
22 |
+
if($itemvv->getWeight() != 0){
|
23 |
+
$weight = $itemvv->getWeight()*$itemvv->getQtyOrdered();
|
24 |
+
} else {
|
25 |
+
$weight = 0.5*$itemvv->getQtyOrdered();
|
26 |
+
}
|
27 |
+
$totalWeight += $weight;
|
28 |
+
if($itemvv->getQtyOrdered() > $itemvv->getQtyShipped()){
|
29 |
+
$itemscount += $itemvv->getQtyOrdered() - $itemvv->getQtyShipped();
|
30 |
+
}else if($itemvv->getQtyOrdered()==$itemvv->getQtyShipped()){
|
31 |
+
$isShipped=true;
|
32 |
+
$itemscount+=$itemvv->getQtyOrdered();
|
33 |
+
}
|
34 |
+
}
|
35 |
+
$state = "";
|
36 |
+
if(($shipping->getData('region_id')) && ($shipping->getCountry() == 'US')){
|
37 |
+
$region = Mage::getModel('directory/region')->load($shipping->getData('region_id'));
|
38 |
+
$state = $region->getName();
|
39 |
+
}
|
40 |
+
else{
|
41 |
+
$state = $shipping->getData('region');
|
42 |
+
}
|
43 |
+
|
44 |
+
$billing_state = "";
|
45 |
+
if($shipping->getData('region_id')){
|
46 |
+
$region = Mage::getModel('directory/region')->load($shipping->getData('region_id'));
|
47 |
+
$billing_state = $region->getName();
|
48 |
+
}
|
49 |
+
else{
|
50 |
+
$billing_state = $shipping->getData('region');
|
51 |
+
}
|
52 |
+
$formSession=Mage::getSingleton('adminhtml/session');
|
53 |
+
$formData=$formSession->getData('form_data');
|
54 |
+
$session=false;
|
55 |
+
Mage::getSingleton('core/session')->setPreviousUrl($this->helper('core/url')->getCurrentUrl());
|
56 |
+
if(count($formData)>0){ $session=true; }
|
57 |
+
|
58 |
+
?>
|
59 |
+
|
60 |
+
<!-- aramex popup starts -->
|
61 |
+
|
62 |
+
<div id="aramex_overlay">
|
63 |
+
<div id="aramex_shipment_creation">
|
64 |
+
|
65 |
+
<form id="aramex_shipment" method="post" action="<?php echo $this->getUrl('aramexshipment/shipment/post'); ?>" enctype="multipart/form-data">
|
66 |
+
<input type="hidden" name="aramex_shipment_referer" value="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" />
|
67 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
68 |
+
<input name="aramex_shipment_shipper_account" type="hidden" value="<?php echo Mage::getStoreConfig('aramexsettings/settings/account_number'); ?>" />
|
69 |
+
<input name="aramex_shipment_original_reference" type="hidden" value="<?php echo $_order->getIncrementId() ?>" />
|
70 |
+
<FIELDSET class="aramex_shipment_creation_fieldset_big" id="aramex_shipment_creation_general_info">
|
71 |
+
<legend>Billing Account</legend>
|
72 |
+
<div id="general_details" class="aramex_shipment_creation_part">
|
73 |
+
<div class="text_short">
|
74 |
+
<label>Account</label><input type="text" name="aramex_shipment_shipper_account_show" disabled="disabled" value="<?php echo Mage::getStoreConfig('aramexsettings/settings/account_number'); ?>"/>
|
75 |
+
<div class="little_description">Taken from Aramex Global Settings</div>
|
76 |
+
<div class="aramex_clearer"></div>
|
77 |
+
</div>
|
78 |
+
<div id="aramex_shipment_creation_logo"><img src="https://nahel.com/skin/frontend/default/nahel_ccc/images/aramex-red-trans.png" /></div>
|
79 |
+
</div>
|
80 |
+
|
81 |
+
<div class="text_short">
|
82 |
+
<label>Payment</label>
|
83 |
+
<select class="aramex_all_options" name="aramex_shipment_info_billing_account" onchange="resetShipperDetail(this);">
|
84 |
+
<?php if(!$isShipped or true):?>
|
85 |
+
<option value="1" <?php echo ($session and $formData['aramex_shipment_info_billing_account']=='1')?'selected="selected"':''?>>Shipper Account</option>
|
86 |
+
<?php endif;?>
|
87 |
+
<option value="2" <?php echo ($session and $formData['aramex_shipment_info_billing_account']=='2')?'selected="selected"':''?>>Consignee Account</option>
|
88 |
+
<option value="3" <?php echo ($session and $formData['aramex_shipment_info_billing_account']=='3')?'selected="selected"':''?>>Third Party</option>
|
89 |
+
|
90 |
+
</select>
|
91 |
+
<div id="aramex_shipment_info_service_type_div" style="display: none;"></div>
|
92 |
+
</div>
|
93 |
+
|
94 |
+
<?php //barry code;?>
|
95 |
+
<div class="cal-rate-button" style="float:right;">
|
96 |
+
<button name="aramex_rate_calculate" type="button" id="aramex_rate_calculate" onclick="myObj.openCalc();">Calculate Rate</button>
|
97 |
+
<button name="aramex_schedule_pickup" type="button" id="aramex_schedule_pickup" onclick="myObj.openPickup();">Schedule Pickup</button>
|
98 |
+
</div>
|
99 |
+
|
100 |
+
<?php //barry code end;?>
|
101 |
+
|
102 |
+
</FIELDSET>
|
103 |
+
<div id="aramex_messages"></div>
|
104 |
+
<FIELDSET class="aramex_shipment_creation_fieldset">
|
105 |
+
<legend>Shipper Details</legend>
|
106 |
+
<div id="shipper_details" class="aramex_shipment_creation_part">
|
107 |
+
<div class="text_short">
|
108 |
+
<label>Reference</label><input class="number" type="text" name="aramex_shipment_shipper_reference" value="<?php echo $_order->getIncrementId() ?>"/>
|
109 |
+
</div>
|
110 |
+
<div class="text_short">
|
111 |
+
<?php $_name=($session)?$formData['aramex_shipment_shipper_name']:Mage::getStoreConfig('aramexsettings/shipperdetail/name');?>
|
112 |
+
<label>Name</label><input type="text" class="required" id="aramex_shipment_shipper_name" name="aramex_shipment_shipper_name" value="<?php echo $_name; ?>"/>
|
113 |
+
</div>
|
114 |
+
<div class="text_short">
|
115 |
+
<?php $_email=($session)?$formData['aramex_shipment_shipper_email']:Mage::getStoreConfig('aramexsettings/shipperdetail/email');?>
|
116 |
+
<label>Email</label><input type="text" class="required email" id="aramex_shipment_shipper_email" name="aramex_shipment_shipper_email" value="<?php echo $_email; ?>"/>
|
117 |
+
</div>
|
118 |
+
<div class="text_short">
|
119 |
+
|
120 |
+
<?php $company_name = ($billing) ? $billing->getData('company') : '';?>
|
121 |
+
<?php $_company=($session)?$formData['aramex_shipment_shipper_company']:Mage::getStoreConfig('aramexsettings/shipperdetail/company');?>
|
122 |
+
<label>Company</label><input type="text" id="aramex_shipment_shipper_company" name="aramex_shipment_shipper_company" value="<?php echo $_company; ?>"/>
|
123 |
+
</div>
|
124 |
+
<div class="text_short">
|
125 |
+
<?php $_street=($session)?$formData['aramex_shipment_shipper_street']:Mage::getStoreConfig('aramexsettings/shipperdetail/address');?>
|
126 |
+
<label>Address</label><textarea rows="4" class="required" cols="26" type="text" id="aramex_shipment_shipper_street" name="aramex_shipment_shipper_street"><?php echo $_street; ?></textarea>
|
127 |
+
</div>
|
128 |
+
<div class="text_short">
|
129 |
+
<label>Country</label>
|
130 |
+
<?php $_country=($session)?$formData['aramex_shipment_shipper_country']:Mage::getStoreConfig('aramexsettings/shipperdetail/country');?>
|
131 |
+
<select class="aramex_countries validate-select" id="aramex_shipment_shipper_country" name="aramex_shipment_shipper_country">
|
132 |
+
<?php
|
133 |
+
foreach($countryCollection as $country) {
|
134 |
+
?>
|
135 |
+
<option value="<?php echo $country['country_id'] ?>" <?php if($_country){ echo ($_country == $country['country_id']) ? 'selected="selected"' : ''; }?> ><?php echo $country['name'] ?></option>
|
136 |
+
<?php
|
137 |
+
}
|
138 |
+
?>
|
139 |
+
</select>
|
140 |
+
</div>
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
<div class="text_short">
|
145 |
+
<?php $_city=($session)?$formData['aramex_shipment_shipper_city']:Mage::getStoreConfig('aramexsettings/shipperdetail/city');?>
|
146 |
+
<label>City</label><input class="" type="text" id="aramex_shipment_shipper_city" name="aramex_shipment_shipper_city" value="<?php echo $_city; ?>"/>
|
147 |
+
</div>
|
148 |
+
<div class="text_short">
|
149 |
+
<?php $_postalcode=($session)?$formData['aramex_shipment_shipper_postal']:Mage::getStoreConfig('aramexsettings/shipperdetail/postalcode');?>
|
150 |
+
<label>Postal Code</label><input class="" type="text" id="aramex_shipment_shipper_postal" name="aramex_shipment_shipper_postal" value="<?php echo $_postalcode; ?>"/>
|
151 |
+
</div>
|
152 |
+
<div class="text_short">
|
153 |
+
<?php $_state=($session)?$formData['aramex_shipment_shipper_state']:Mage::getStoreConfig('aramexsettings/shipperdetail/state');?>
|
154 |
+
<label>State</label><input type="text" id="aramex_shipment_shipper_state" name="aramex_shipment_shipper_state" value="<?php echo $_state; ?>" />
|
155 |
+
</div>
|
156 |
+
<div class="text_short">
|
157 |
+
<?php $_phone=($session)?$formData['aramex_shipment_shipper_phone']:Mage::getStoreConfig('aramexsettings/shipperdetail/phone');?>
|
158 |
+
<label>Phone</label><input class="required" type="text" id="aramex_shipment_shipper_phone" name="aramex_shipment_shipper_phone" value="<?php echo $_phone; ?>" />
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
</FIELDSET>
|
162 |
+
<FIELDSET class="aramex_shipment_creation_fieldset">
|
163 |
+
<legend>Receiver Details</legend>
|
164 |
+
<div id="receiver_details" class="aramex_shipment_creation_part">
|
165 |
+
<div class="text_short">
|
166 |
+
<label>Reference</label><input class="number" type="text" id="aramex_shipment_receiver_reference" name="aramex_shipment_receiver_reference" value="<?php echo $_order->getIncrementId() ?>"/>
|
167 |
+
</div>
|
168 |
+
<div class="text_short">
|
169 |
+
<?php $_name=($shipping) ? $shipping->getName():'';?>
|
170 |
+
<?php $_name=($session)?$formData['aramex_shipment_receiver_name']:$_name;?>
|
171 |
+
<label>Name</label><input class="required" type="text" id="aramex_shipment_receiver_name" name="aramex_shipment_receiver_name" value="<?php echo $_name; ?>"/>
|
172 |
+
</div>
|
173 |
+
<div class="text_short">
|
174 |
+
<?php $_email=($customer->getEmail()) ? $customer->getEmail():$_order->getData('customer_email');?>
|
175 |
+
<?php $_email=($session)?$formData['aramex_shipment_receiver_email']:$_email;?>
|
176 |
+
<label>Email</label><input class="email required" type="text" id="aramex_shipment_receiver_email" name="aramex_shipment_receiver_email" value="<?php echo $_email; ?>"/>
|
177 |
+
</div>
|
178 |
+
<div class="text_short">
|
179 |
+
<?php $company_name=($company_name) ? $company_name:'';?>
|
180 |
+
<?php $company_name=(empty($company_name) and $shipping) ?$shipping->getName() :$company_name;?>
|
181 |
+
<?php $company_name=($session)?$formData['aramex_shipment_receiver_company']:$company_name;?>
|
182 |
+
<?php $company_name = ($shipping) ? $shipping->getData('company') : '';?>
|
183 |
+
<label>Company</label><input type="text" id="aramex_shipment_receiver_company" name="aramex_shipment_receiver_company" value="<?php echo $company_name ?>"/>
|
184 |
+
</div>
|
185 |
+
<div class="text_short">
|
186 |
+
<?php $street=($shipping) ? $shipping->getData('street'):'';?>
|
187 |
+
<?php $street=($session)?$formData['aramex_shipment_receiver_name']:$street;?>
|
188 |
+
<label>Address</label><textarea class="required" rows="4" cols="26" type="text" id="aramex_shipment_receiver_street" name="aramex_shipment_receiver_street"><?php echo $street; ?></textarea>
|
189 |
+
</div>
|
190 |
+
<div class="text_short">
|
191 |
+
<label>Country</label>
|
192 |
+
<?php $_country=($shipping) ? $shipping->getCountry():'';?>
|
193 |
+
<?php $_country=($session)?$formData['aramex_shipment_receiver_country']:$_country;?>
|
194 |
+
<select class="aramex_countries" id="aramex_shipment_receiver_country" name="aramex_shipment_receiver_country">
|
195 |
+
<?php
|
196 |
+
foreach($countryCollection as $country) {
|
197 |
+
?>
|
198 |
+
<option value="<?php echo $country['country_id'] ?>" <?php echo ($_country == $country['country_id']) ? 'selected="selected"' : '';?> ><?php echo $country['name'] ?></option>
|
199 |
+
<?php
|
200 |
+
}
|
201 |
+
?>
|
202 |
+
</select>
|
203 |
+
</div>
|
204 |
+
<div class="text_short">
|
205 |
+
<?php $_city=($shipping) ? $shipping->getData('city'):'';?>
|
206 |
+
<?php $_city=($session)?$formData['aramex_shipment_receiver_city']:$_city;?>
|
207 |
+
<label>City</label><input class="" type="text" id="aramex_shipment_receiver_city" name="aramex_shipment_receiver_city" value="<?php echo $_city; ?>" />
|
208 |
+
</div>
|
209 |
+
<div class="text_short">
|
210 |
+
<?php $_postcode=($shipping) ? $shipping->getData('postcode'):'';?>
|
211 |
+
<?php $_postcode=($session)?$formData['aramex_shipment_receiver_postal']:$_postcode;?>
|
212 |
+
<label>Postal Code</label><input type="text" class="" id="aramex_shipment_receiver_postal" name="aramex_shipment_receiver_postal" value="<?php echo $_postcode; ?>" />
|
213 |
+
</div>
|
214 |
+
<div class="text_short">
|
215 |
+
<?php $_state=($shipping) ? $state:'';?>
|
216 |
+
<?php $_state=($session)?$formData['aramex_shipment_receiver_state']:$_state;?>
|
217 |
+
<label>State</label><input type="text" id="aramex_shipment_receiver_state" name="aramex_shipment_receiver_state" value="<?php echo $_state; ?>" />
|
218 |
+
</div>
|
219 |
+
<div class="text_short">
|
220 |
+
<?php $_phone=($shipping) ? $shipping->getData('telephone'):'';?>
|
221 |
+
<?php $_phone=($session)?$formData['aramex_shipment_receiver_phone']:$_phone;?>
|
222 |
+
<label>Phone</label><input class="required" type="text" id="aramex_shipment_receiver_phone" name="aramex_shipment_receiver_phone" value="<?php echo $_phone; ?>"/>
|
223 |
+
</div>
|
224 |
+
</div>
|
225 |
+
</FIELDSET>
|
226 |
+
<div class="aramex_clearer"></div>
|
227 |
+
<FIELDSET class="aramex_shipment_creation_fieldset_big">
|
228 |
+
<legend>Shipment Information</legend>
|
229 |
+
<div id="shipment_infromation" class="aramex_shipment_creation_part">
|
230 |
+
<div class="text_short" style="display:none">Total weight: <span id="order-total-weight"><?php echo number_format($totalWeight, 2); ?></span> KG</div>
|
231 |
+
<div class="text_short">
|
232 |
+
<?php $_weight=($session)?$formData['order_weight']:$totalWeight;?>
|
233 |
+
<?php $_weightUnit=($session)?$formData['weight_unit']:'KG';?>
|
234 |
+
<label>Total weight:</label>
|
235 |
+
<input type="text" name="order_weight" value="<?php echo $_weight; ?>" class="fl width-60 mar-right-10" />
|
236 |
+
<select name="weight_unit" class="fl width-60">
|
237 |
+
<option value="KG" <?php echo ($_weightUnit=='KG')?'selected="selected"':'';?> >KG</option>
|
238 |
+
<option value="LB" <?php echo ($_weightUnit=='LB')?'selected="selected"':'';?>>LB</option>
|
239 |
+
</select>
|
240 |
+
</div>
|
241 |
+
<div class="text_short">
|
242 |
+
<label>Reference</label><input type="text" id="aramex_shipment_info_reference" name="aramex_shipment_info_reference" value="<?php echo $_order->getIncrementId() ?>"/>
|
243 |
+
</div>
|
244 |
+
<div class="text_short">
|
245 |
+
<label>Product Group</label>
|
246 |
+
<?php $_country=($shipping) ? $shipping->getCountry():'';?>
|
247 |
+
<?php $_group=($session)?$formData['aramex_shipment_info_product_group']:'';?>
|
248 |
+
<?php
|
249 |
+
$checkCountry=false;
|
250 |
+
if($_group==''){
|
251 |
+
$checkCountry=($_country == Mage::getStoreConfig('aramexsettings/shipperdetail/country'))?true:false;
|
252 |
+
}
|
253 |
+
?>
|
254 |
+
<select class="aramex_all_options" id="aramex_shipment_info_product_group" name="aramex_shipment_info_product_group" >
|
255 |
+
|
256 |
+
<option <?php echo ($_group =='DOM' or $checkCountry) ? 'selected="selected"' : ''; ?> value="DOM">Domestic</option>
|
257 |
+
<option <?php echo ($_group =='EXP' or ($_group=='' and !$checkCountry)) ? 'selected="selected"' : ''; ?> value="EXP">International Express</option>
|
258 |
+
|
259 |
+
</select>
|
260 |
+
<div id="aramex_shipment_info_product_group_div" style="display: none;"></div>
|
261 |
+
</div>
|
262 |
+
<div class="text_short">
|
263 |
+
<label>Service Type</label>
|
264 |
+
<?php $_country=($shipping) ? $shipping->getCountry():'';?>
|
265 |
+
<?php $_type=($session)?$formData['aramex_shipment_info_product_type']:'';?>
|
266 |
+
<?php $notHide='';
|
267 |
+
if($_country != Mage::getStoreConfig('aramexsettings/shipperdetail/country') and $_type==''){ $notHide='display: none'; }
|
268 |
+
$checkCountry=false;
|
269 |
+
if($_type==''){
|
270 |
+
$checkCountry=($_country == Mage::getStoreConfig('aramexsettings/shipperdetail/country'))?true:false;
|
271 |
+
}
|
272 |
+
?>
|
273 |
+
<select class="aramex_all_options" id="aramex_shipment_info_product_type" name="aramex_shipment_info_product_type">
|
274 |
+
|
275 |
+
<option <?php echo ($_type =='ONP' or $checkCountry) ? 'selected="selected"' : ''; ?> value="ONP" id="ONP" style="<?php echo ($_group!='DOM')?'display: none':''; ?>" >Overnight Parcel</option>
|
276 |
+
<option value="OND" id="OND" style="<?php echo ($_group!='DOM')?'display: none':''; ?>" <?php echo ($_type =='OND') ? 'selected="selected"' : ''; ?>>Overnight Document</option>
|
277 |
+
<option value="CDA" id="CDA" style="<?php echo ($_group!='DOM')?'display: none':''; ?>" <?php echo ($_type =='CDA') ? 'selected="selected"' : ''; ?>>Cash on Delivery</option>
|
278 |
+
<option <?php echo ($_type=='PDX' or (!$checkCountry and $_type=='')) ? 'selected="selected"' : ''; ?> value="PDX" id="PDX" style="<?php if($checkCountry or $_group=='DOM'){ echo 'display: none'; } ?>" >Priority Document Express</option>
|
279 |
+
<option value="PPX" id="PPX" style="<?php if($checkCountry or $_group=='DOM'){ echo 'display: none'; } ?>" <?php echo ($_type =='PPX') ? 'selected="selected"' : ''; ?> >Priority Parcel Express</option>
|
280 |
+
<option value="PLX" id="PLX" style="<?php if($checkCountry or $_group=='DOM'){ echo 'display: none'; } ?>" <?php echo ($_type =='PLX') ? 'selected="selected"' : ''; ?> >Priority Letter Express</option>
|
281 |
+
<option value="DDX" id="DDX" style="<?php if($checkCountry or $_group=='DOM'){ echo 'display: none'; } ?>" <?php echo ($_type =='DDX') ? 'selected="selected"' : ''; ?> >Deferred Document Express</option>
|
282 |
+
<option value="DPX" id="DPX" style="<?php if($checkCountry or $_group=='DOM'){ echo 'display: none'; } ?>" <?php echo ($_type =='DPX') ? 'selected="selected"' : ''; ?> >Deferred Parcel Express</option>
|
283 |
+
<option value="GDX" id="GDX" style="<?php if($checkCountry or $_group=='DOM'){ echo 'display: none'; } ?>" <?php echo ($_type =='GDX') ? 'selected="selected"' : ''; ?> >Ground Document Express</option>
|
284 |
+
<option value="GPX" id="GPX" style="<?php if($checkCountry or $_group=='DOM'){ echo 'display: none'; } ?>" <?php echo ($_type =='GPX') ? 'selected="selected"' : ''; ?> >Ground Parcel Express</option>
|
285 |
+
|
286 |
+
</select>
|
287 |
+
<div id="aramex_shipment_info_service_type_div" style="display: none;"></div>
|
288 |
+
</div>
|
289 |
+
|
290 |
+
|
291 |
+
<div class="text_short">
|
292 |
+
<label>Additional Services</label>
|
293 |
+
<?php $_type=$_order->getPayment()->getMethodInstance()->getCode();?>
|
294 |
+
<?php $_type=($session)?$formData['aramex_shipment_info_service_type']:$_type;?>
|
295 |
+
<select class="aramex_all_options" id="aramex_shipment_info_service_type" name="aramex_shipment_info_service_type">
|
296 |
+
|
297 |
+
<option value=""></option>
|
298 |
+
<option value="CODS" <?php if($_type == 'ccsave' or $_type=='CODS'){ echo 'selected="selected"'; } ?>>Cash on Delivery</option>
|
299 |
+
<option value="FIRST" <?php if($_type=='FIRST'){ echo 'selected="selected"'; } ?>>First Delivery</option>
|
300 |
+
<option value="FRDOM" <?php if($_type=='FRDOM'){ echo 'selected="selected"'; } ?>>Free Domicile</option>
|
301 |
+
<option value="HFPU" <?php if($_type=='HFPU'){ echo 'selected="selected"'; } ?>>Hold for pick up</option>
|
302 |
+
<option value="NOON" <?php if($_type=='NOON'){ echo 'selected="selected"'; } ?>>Noon Delivery</option>
|
303 |
+
<option value="SIG" <?php if($_type=='SIG'){ echo 'selected="selected"'; } ?>>Signature Required</option>
|
304 |
+
|
305 |
+
</select>
|
306 |
+
|
307 |
+
</div>
|
308 |
+
|
309 |
+
<div class="text_short">
|
310 |
+
<label>Payment Type</label>
|
311 |
+
<?php $_type=($session)?$formData['aramex_shipment_info_payment_type']:'';?>
|
312 |
+
<select class="aramex_all_options" id="aramex_shipment_info_payment_type" name="aramex_shipment_info_payment_type">
|
313 |
+
|
314 |
+
<option value="P" <?php if($_type=='P'){ echo 'selected="selected"'; } ?>>Prepaid</option>
|
315 |
+
<option value="C" <?php if($_type=='C'){ echo 'selected="selected"'; } ?>>Collect</option>
|
316 |
+
<option value="3" <?php if($_type=='3'){ echo 'selected="selected"'; } ?>>Third Party</option>
|
317 |
+
|
318 |
+
</select>
|
319 |
+
<div id="aramex_shipment_info_service_type_div" style="display: none;"></div>
|
320 |
+
</div>
|
321 |
+
<div class="text_short">
|
322 |
+
<label>Payment Option</label>
|
323 |
+
<?php $_option=($session)?$formData['aramex_shipment_info_payment_option']:'';?>
|
324 |
+
<select class="" id="aramex_shipment_info_payment_option" name="aramex_shipment_info_payment_option">
|
325 |
+
|
326 |
+
<option value=""></option>
|
327 |
+
<option id="ASCC" value="ASCC" style="display: none;">Needs Shipper Account Number to be filled</option>
|
328 |
+
<option id="ARCC" value="ARCC" style="display: none;">Needs Consignee Account Number to be filled</option>
|
329 |
+
|
330 |
+
<option id="CASH" value="CASH" <?php if($_option=='CASH'){ echo 'selected="selected"'; } ?>>Cash</option>
|
331 |
+
<option id="ACCT" value="ACCT" <?php if($_option=='ACCT'){ echo 'selected="selected"'; } ?>>Account</option>
|
332 |
+
<option id="PPST" value="PPST" <?php if($_option=='PPST'){ echo 'selected="selected"'; } ?>>Prepaid Stock</option>
|
333 |
+
<option id="CRDT" value="CRDT" <?php if($_option=='CRDT'){ echo 'selected="selected"'; } ?>>Credit</option>
|
334 |
+
|
335 |
+
</select>
|
336 |
+
|
337 |
+
</div>
|
338 |
+
<div class="text_short">
|
339 |
+
<?php $_amount=($_order->getPayment()->getMethodInstance()->getCode() != 'ccsave')?round($_order->getData('grand_total'), 2):'';?>
|
340 |
+
<?php $_amount=($session)?$formData['aramex_shipment_info_cod_amount']:$_amount;?>
|
341 |
+
<label>COD Amount</label><input class="" type="text" id="aramex_shipment_info_cod_amount" name="aramex_shipment_info_cod_amount" value="<?php echo $_amount; ?>"/>
|
342 |
+
</div>
|
343 |
+
|
344 |
+
<div class="text_short">
|
345 |
+
<?php $_amount=($session)?$formData['aramex_shipment_info_custom_amount']:'';?>
|
346 |
+
<label>Custom Amount</label><input class="" type="text" id="aramex_shipment_info_custom_amount" name="aramex_shipment_info_custom_amount" value="<?php echo $_amount;?>"/>
|
347 |
+
</div>
|
348 |
+
|
349 |
+
<div class="text_short">
|
350 |
+
<?php $_code=($session)?$formData['aramex_shipment_currency_code']:'';?>
|
351 |
+
<label>Currency</label><input type="text" class="" id="aramex_shipment_currency_code" name="aramex_shipment_currency_code" value="<?php echo $_code;?>"/>
|
352 |
+
</div>
|
353 |
+
|
354 |
+
<div class="text_short">
|
355 |
+
<?php $_comment=($session)?$formData['aramex_shipment_info_comment']:'';?>
|
356 |
+
<label>Comment</label><textarea rows="4" cols="<?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox')){ ?>29 <?php }else{ ?>35<?php } ?>" type="text" id="aramex_shipment_info_comment" name="aramex_shipment_info_comment"><?php echo $_comment; ?></textarea>
|
357 |
+
</div>
|
358 |
+
|
359 |
+
<div class="text_short">
|
360 |
+
<?php $_foreignhawb=($session)?$formData['aramex_shipment_info_foreignhawb']:'';?>
|
361 |
+
<label>Foreign Shipment No</label><input class="" type="text" id="aramex_shipment_info_foreignhawb" name="aramex_shipment_info_foreignhawb" value="<?php echo $_foreignhawb;?>"/>
|
362 |
+
</div>
|
363 |
+
<?php ?>
|
364 |
+
<div class="text_short">
|
365 |
+
<label for="file1">Filename 1:</label>
|
366 |
+
<div id="file1_div" style="float: left;width: 145px;">
|
367 |
+
<input type="file" name="file1" id="file1" size="7">
|
368 |
+
</div>
|
369 |
+
<div style="float: right;">
|
370 |
+
<input type="button" name="filereset" id="filereset" value="Reset" style="width: 60px;height: 24px;"/>
|
371 |
+
</div>
|
372 |
+
</div>
|
373 |
+
<div class="text_short">
|
374 |
+
<label for="file2">Filename 2:</label>
|
375 |
+
<div id="file2_div" style="float: left;width: 145px;">
|
376 |
+
<input type="file" name="file2" id="file2" size="7">
|
377 |
+
</div>
|
378 |
+
<div style="float: right;">
|
379 |
+
<input type="button" name="file2reset" id="file2reset" value="Reset" style="width: 60px;height: 24px;"/>
|
380 |
+
</div>
|
381 |
+
</div>
|
382 |
+
<div class="text_short">
|
383 |
+
<label for="file">Filename 3:</label>
|
384 |
+
<div id="file3_div" style="float: left;width: 145px;">
|
385 |
+
<input type="file" name="file3" id="file3" size="7">
|
386 |
+
</div>
|
387 |
+
<div style="float: right;">
|
388 |
+
<input type="button" name="file3reset" id="file3reset" value="Reset" style="width: 60px;height: 24px;"/>
|
389 |
+
</div>
|
390 |
+
</div>
|
391 |
+
<?php ?>
|
392 |
+
<div class="text_short">
|
393 |
+
<label>Description</label><textarea rows="4" cols="31" type="text" id="aramex_shipment_description" name="aramex_shipment_description" style="display: none;"><?php
|
394 |
+
$itemsnamecounter = 1;
|
395 |
+
$item_supplier_id='';
|
396 |
+
foreach($_order->getAllVisibleItems() as $itemname){
|
397 |
+
if($itemname->getQtyOrdered() > $itemname->getQtyShipped()){
|
398 |
+
echo $itemname->getId().' - '. trim($itemname->getName());
|
399 |
+
}
|
400 |
+
$itemsnamecounter++;
|
401 |
+
$supplier_different = false;
|
402 |
+
$atleast_item_shipped = false;
|
403 |
+
if(!$item_supplier_id){
|
404 |
+
$item_supplier_id = $itemname->getUdropshipVendor();
|
405 |
+
} else {
|
406 |
+
if($item_supplier_id != $itemname->getUdropshipVendor()){
|
407 |
+
if(!$supplier_different){
|
408 |
+
$supplier_different = true;
|
409 |
+
}
|
410 |
+
}
|
411 |
+
}
|
412 |
+
|
413 |
+
if($itemname->getQtyOrdered() == $itemname->getQtyShipped()){
|
414 |
+
if(!$atleast_item_shipped){
|
415 |
+
$atleast_item_shipped = true;
|
416 |
+
}
|
417 |
+
}
|
418 |
+
}
|
419 |
+
|
420 |
+
|
421 |
+
?>
|
422 |
+
</textarea>
|
423 |
+
<div id="aramex_shipment_description_div" style=" float: left;
|
424 |
+
font-size: 11px;
|
425 |
+
margin-bottom: 5px;
|
426 |
+
margin-top: 2px;
|
427 |
+
width: 202px;">
|
428 |
+
<?php
|
429 |
+
$itemsnamecounter1 = 1;
|
430 |
+
foreach($_order->getAllVisibleItems() as $itemname1){
|
431 |
+
//echo $itemsnamecounter1;
|
432 |
+
if($itemname1->getQtyOrdered() > $itemname1->getQtyShipped()){
|
433 |
+
echo '<p id="'.$itemname1->getId().'">' . trim($itemname1->getName()) . '</p>';
|
434 |
+
}
|
435 |
+
$itemsnamecounter1++;
|
436 |
+
}
|
437 |
+
?>
|
438 |
+
</div>
|
439 |
+
</div>
|
440 |
+
<div class="text_short">
|
441 |
+
<label>Items Price</label><input type="text" id="aramex_shipment_info_items_subtotal" name="aramex_shipment_info_items_subtotal" disabled="disabled" style="width: 165px; float: left;" value="<?php echo $_order->getBaseSubtotal(); ?>" /><div style="float: left; padding-left: 5px;"><?php echo $_order->getData('base_currency_code'); ?></div>
|
442 |
+
</div>
|
443 |
+
<?php if($payment->getData('method') == 'ig_cashondelivery'){ ?>
|
444 |
+
<?php if($supplier_different){ ?>
|
445 |
+
<div class="text_short">
|
446 |
+
<label>Shipping Charges</label><input type="text" id="aramex_shipment_info_shipping_charges" name="aramex_shipment_info_shipping_charges" style="width: 165px; float: left;" value="" /><div style="float: left; padding-left: 5px;"><?php echo $_order->getData('base_currency_code'); ?></div>
|
447 |
+
</div>
|
448 |
+
<?php
|
449 |
+
} else {
|
450 |
+
if($atleast_item_shipped){
|
451 |
+
?>
|
452 |
+
<div class="text_short">
|
453 |
+
<label>Shipping Charges</label><input type="text" id="aramex_shipment_info_shipping_charges" name="aramex_shipment_info_shipping_charges" style="width: 165px; float: left;" value="" /><div style="float: left; padding-left: 5px;"><?php echo $_order->getData('base_currency_code'); ?></div>
|
454 |
+
</div>
|
455 |
+
<?php
|
456 |
+
} else {
|
457 |
+
?>
|
458 |
+
<div class="text_short">
|
459 |
+
<label>Shipping Charges</label><input type="text" id="aramex_shipment_info_shipping_charges" name="aramex_shipment_info_shipping_charges" style="width: 165px; float: left;" value="<?php echo $_order->getData('base_shipping_amount'); ?>" /><div style="float: left; padding-left: 5px;"><?php echo $_order->getData('base_currency_code'); ?></div>
|
460 |
+
</div>
|
461 |
+
<?php
|
462 |
+
}
|
463 |
+
}
|
464 |
+
?>
|
465 |
+
<div class="text_short">
|
466 |
+
<label>COD Value</label><input type="text" id="aramex_shipment_info_cod_value" name="aramex_shipment_info_cod_value" style="width: 165px; float: left;" value="<?php echo $_order->getData('base_shipping_amount')+$_order->getBaseSubtotal(); ?>" /><div style="float: left; padding-left: 5px;"><?php echo $_order->getData('base_currency_code'); ?></div>
|
467 |
+
</div>
|
468 |
+
<?php } ?>
|
469 |
+
</div>
|
470 |
+
<div id="shipment_infromation2" class="aramex_shipment_creation_part">
|
471 |
+
<div class="text_short" id="aramex_shipment_info_items">
|
472 |
+
<div >
|
473 |
+
<?php if($itemscount != 0){?>
|
474 |
+
<div style="margin-bottom: -15px;">Items not shipped yet</div>
|
475 |
+
<br />
|
476 |
+
<table id="aramex_items_table">
|
477 |
+
<tr>
|
478 |
+
<th class="aramex_item_options">Action</th>
|
479 |
+
<th class="aramex_item_name">Name</th>
|
480 |
+
<th class="aramex_item_qty">Qty</th>
|
481 |
+
</tr>
|
482 |
+
<?php
|
483 |
+
foreach($itemsv as $item){
|
484 |
+
if($item->getQtyOrdered() > $item->getQtyShipped() or $isShipped){
|
485 |
+
?>
|
486 |
+
<tr id="item<?php echo $item->getId(); ?>" class="aramex_item_tobe_shipped">
|
487 |
+
<td class="aramex_item_options">
|
488 |
+
<a href="javascript:aramexhide('<?php echo $item->getId(); ?>', '<?php echo $item->getBasePrice() * $item->getQtyOrdered(); ?>', '<?php echo ($item->getWeight() * $item->getQtyOrdered()) ?>');">Remove</a>
|
489 |
+
</td>
|
490 |
+
<?php
|
491 |
+
$_qty=abs($item->getQtyOrdered() - $item->getQtyShipped());
|
492 |
+
if($_qty==0 and $isShipped){
|
493 |
+
$_qty=intval($item->getQtyShipped());
|
494 |
+
}
|
495 |
+
?>
|
496 |
+
<td class="aramex_item_name">
|
497 |
+
<span title="<?php echo $item->getName(); ?>"><?php echo substr($item->getName(), 0, 21); ?> ...</span>
|
498 |
+
<input type="hidden" id="aramex_items_<?php echo $item->getId(); ?>" name="aramex_items[<?php echo $item->getId(); ?>]" value="<?php echo $_qty; ?>" />
|
499 |
+
</td>
|
500 |
+
<td class="aramex_item_qty">
|
501 |
+
<input class="aramex_input_items_qty" type="text" name="<?php echo $item->getId(); ?>" value="<?php echo $_qty; ?>" />
|
502 |
+
|
503 |
+
<input type="hidden" id="aramex_items_base_price_<?php echo $item->getId(); ?>" name="aramex_items_base_price_<?php echo $item->getId(); ?>" value="<?php echo $item->getBasePrice() ?>" />
|
504 |
+
<input type="hidden" id="aramex_items_base_weight_<?php echo $item->getId(); ?>" name="aramex_items_base_weight_<?php echo $item->getId(); ?>" value="<?php echo $item->getWeight() ?>" />
|
505 |
+
<input type="hidden" id="aramex_items_total_<?php echo $item->getId(); ?>" name="aramex_items_total_<?php echo $item->getId(); ?>" value="<?php echo $_qty; ?>" />
|
506 |
+
|
507 |
+
</td>
|
508 |
+
</tr>
|
509 |
+
<?php
|
510 |
+
}
|
511 |
+
}
|
512 |
+
?>
|
513 |
+
<tr>
|
514 |
+
<td colspan="2" style="font-weight: bold;background: none repeat scroll 0% 0% rgb(224, 224, 224);">Number of items to be shipped:</td>
|
515 |
+
<td>
|
516 |
+
<span id="items_tobe_shipped_number">
|
517 |
+
<?php echo $itemscount; ?>
|
518 |
+
</span>
|
519 |
+
</td>
|
520 |
+
</tr>
|
521 |
+
</table>
|
522 |
+
<?php } else { ?>
|
523 |
+
<div style="color: green; width: 200px; margin: 0pt auto;">All items have been shipped</div>
|
524 |
+
<?php } ?>
|
525 |
+
</div>
|
526 |
+
</div>
|
527 |
+
</div>
|
528 |
+
<div class="aramex_clearer"></div>
|
529 |
+
</FIELDSET>
|
530 |
+
<div class="aramex_clearer"></div>
|
531 |
+
|
532 |
+
<div style="float: right; width: 100%; width: 30px;"><div style="float: right;font-size: 11px;height: 30px;margin-bottom: 6px;width: 184px;"><input style="float: left; width: 30px;" type="checkbox" name="aramex_email_customer" value="yes" /> <span style="float: left; margin-top: -2px;">Notify customer by email</span></div></div>
|
533 |
+
<div class="aramex_clearer"></div>
|
534 |
+
<div style="float: right;margin-bottom: 20px;margin-top: -11px;">
|
535 |
+
<button id="aramex_shipment_creation_submit_id" type="submit" name="aramex_shipment_creation_submit" >Create Shipment</button>
|
536 |
+
<button onclick="aramexclose()" type="button">Close</button>
|
537 |
+
</div>
|
538 |
+
</form>
|
539 |
+
</div>
|
540 |
+
</div>
|
541 |
+
|
542 |
+
<script src="https://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
|
543 |
+
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
|
544 |
+
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js"></script>
|
545 |
+
<script>
|
546 |
+
var jccc = jQuery.noConflict();
|
547 |
+
|
548 |
+
var aramex_shipment_shipper_name = document.getElementById('aramex_shipment_shipper_name').value;
|
549 |
+
var aramex_shipment_shipper_email = document.getElementById('aramex_shipment_shipper_email').value;
|
550 |
+
var aramex_shipment_shipper_company = document.getElementById('aramex_shipment_shipper_company').value;
|
551 |
+
var aramex_shipment_shipper_street = document.getElementById('aramex_shipment_shipper_street').value;
|
552 |
+
var aramex_shipment_shipper_country = document.getElementById('aramex_shipment_shipper_country').value;
|
553 |
+
var aramex_shipment_shipper_city = document.getElementById('aramex_shipment_shipper_city').value;
|
554 |
+
var aramex_shipment_shipper_postal = document.getElementById('aramex_shipment_shipper_postal').value;
|
555 |
+
var aramex_shipment_shipper_state = document.getElementById('aramex_shipment_shipper_state').value;
|
556 |
+
var aramex_shipment_shipper_phone = document.getElementById('aramex_shipment_shipper_phone').value;
|
557 |
+
|
558 |
+
var aramex_shipment_receiver_name = document.getElementById('aramex_shipment_receiver_name').value;
|
559 |
+
var aramex_shipment_receiver_email = document.getElementById('aramex_shipment_receiver_email').value;
|
560 |
+
var aramex_shipment_receiver_company = document.getElementById('aramex_shipment_receiver_company').value;
|
561 |
+
var aramex_shipment_receiver_street = document.getElementById('aramex_shipment_receiver_street').value;
|
562 |
+
var aramex_shipment_receiver_country = document.getElementById('aramex_shipment_receiver_country').value;
|
563 |
+
var aramex_shipment_receiver_city = document.getElementById('aramex_shipment_receiver_city').value;
|
564 |
+
var aramex_shipment_receiver_postal = document.getElementById('aramex_shipment_receiver_postal').value;
|
565 |
+
var aramex_shipment_receiver_state = document.getElementById('aramex_shipment_receiver_state').value;
|
566 |
+
var aramex_shipment_receiver_phone = document.getElementById('aramex_shipment_receiver_phone').value;
|
567 |
+
|
568 |
+
function resetShipperDetail(el){
|
569 |
+
//alert(el.value);
|
570 |
+
var elValue = el.value;
|
571 |
+
var flag = 0;
|
572 |
+
|
573 |
+
|
574 |
+
if(elValue == 2){
|
575 |
+
document.getElementById('aramex_shipment_shipper_name').value = aramex_shipment_receiver_name;
|
576 |
+
document.getElementById('aramex_shipment_shipper_email').value = aramex_shipment_receiver_email;
|
577 |
+
document.getElementById('aramex_shipment_shipper_company').value = aramex_shipment_receiver_company;
|
578 |
+
document.getElementById('aramex_shipment_shipper_street').value = aramex_shipment_receiver_street;
|
579 |
+
document.getElementById('aramex_shipment_shipper_country').value = aramex_shipment_receiver_country;
|
580 |
+
document.getElementById('aramex_shipment_shipper_city').value = aramex_shipment_receiver_city;
|
581 |
+
document.getElementById('aramex_shipment_shipper_postal').value = aramex_shipment_receiver_postal;
|
582 |
+
document.getElementById('aramex_shipment_shipper_state').value = aramex_shipment_receiver_state;
|
583 |
+
document.getElementById('aramex_shipment_shipper_phone').value = aramex_shipment_receiver_phone;
|
584 |
+
document.getElementById('aramex_shipment_receiver_name').value = aramex_shipment_shipper_name;
|
585 |
+
document.getElementById('aramex_shipment_receiver_email').value = aramex_shipment_shipper_email;
|
586 |
+
document.getElementById('aramex_shipment_receiver_company').value = aramex_shipment_shipper_company;
|
587 |
+
document.getElementById('aramex_shipment_receiver_street').value = aramex_shipment_shipper_street;
|
588 |
+
document.getElementById('aramex_shipment_receiver_country').value = aramex_shipment_shipper_country;
|
589 |
+
document.getElementById('aramex_shipment_receiver_city').value = aramex_shipment_shipper_city;
|
590 |
+
document.getElementById('aramex_shipment_receiver_postal').value = aramex_shipment_shipper_postal;
|
591 |
+
document.getElementById('aramex_shipment_receiver_state').value = aramex_shipment_shipper_state;
|
592 |
+
document.getElementById('aramex_shipment_receiver_phone').value = aramex_shipment_shipper_phone;
|
593 |
+
flag = 1;
|
594 |
+
}
|
595 |
+
else if(elValue == 3){
|
596 |
+
document.getElementById('aramex_shipment_shipper_name').value = "";
|
597 |
+
document.getElementById('aramex_shipment_shipper_email').value = "";
|
598 |
+
document.getElementById('aramex_shipment_shipper_company').value = "";
|
599 |
+
document.getElementById('aramex_shipment_shipper_street').value = "";
|
600 |
+
document.getElementById('aramex_shipment_shipper_country').value = "";
|
601 |
+
document.getElementById('aramex_shipment_shipper_city').value = "";
|
602 |
+
document.getElementById('aramex_shipment_shipper_postal').value = "";
|
603 |
+
document.getElementById('aramex_shipment_shipper_state').value = "";
|
604 |
+
document.getElementById('aramex_shipment_shipper_phone').value = "";
|
605 |
+
|
606 |
+
document.getElementById('aramex_shipment_info_payment_type').value = '3';
|
607 |
+
|
608 |
+
document.getElementById('ASCC').style.display = 'block';
|
609 |
+
document.getElementById('ARCC').style.display = 'block';
|
610 |
+
|
611 |
+
document.getElementById('CASH').style.display = 'none';
|
612 |
+
document.getElementById('ACCT').style.display = 'none';
|
613 |
+
document.getElementById('PPST').style.display = 'none';
|
614 |
+
document.getElementById('CRDT').style.display = 'none';
|
615 |
+
|
616 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
617 |
+
|
618 |
+
|
619 |
+
|
620 |
+
flag = 2;
|
621 |
+
}
|
622 |
+
else{
|
623 |
+
if(flag = 1){
|
624 |
+
document.getElementById('aramex_shipment_receiver_name').value = aramex_shipment_receiver_name;
|
625 |
+
document.getElementById('aramex_shipment_receiver_email').value = aramex_shipment_receiver_email;
|
626 |
+
document.getElementById('aramex_shipment_receiver_company').value = aramex_shipment_receiver_company;
|
627 |
+
document.getElementById('aramex_shipment_receiver_street').value = aramex_shipment_receiver_street;
|
628 |
+
document.getElementById('aramex_shipment_receiver_country').value = aramex_shipment_receiver_country;
|
629 |
+
document.getElementById('aramex_shipment_receiver_city').value = aramex_shipment_receiver_city;
|
630 |
+
document.getElementById('aramex_shipment_receiver_postal').value = aramex_shipment_receiver_postal;
|
631 |
+
document.getElementById('aramex_shipment_receiver_state').value = aramex_shipment_receiver_state;
|
632 |
+
document.getElementById('aramex_shipment_receiver_phone').value = aramex_shipment_receiver_phone;
|
633 |
+
|
634 |
+
|
635 |
+
document.getElementById('aramex_shipment_shipper_name').value = aramex_shipment_shipper_name;
|
636 |
+
document.getElementById('aramex_shipment_shipper_email').value = aramex_shipment_shipper_email;
|
637 |
+
document.getElementById('aramex_shipment_shipper_company').value = aramex_shipment_shipper_company;
|
638 |
+
document.getElementById('aramex_shipment_shipper_street').value = aramex_shipment_shipper_street;
|
639 |
+
document.getElementById('aramex_shipment_shipper_country').value = aramex_shipment_shipper_country;
|
640 |
+
document.getElementById('aramex_shipment_shipper_city').value = aramex_shipment_shipper_city;
|
641 |
+
document.getElementById('aramex_shipment_shipper_postal').value = aramex_shipment_shipper_postal;
|
642 |
+
document.getElementById('aramex_shipment_shipper_state').value = aramex_shipment_shipper_state;
|
643 |
+
document.getElementById('aramex_shipment_shipper_phone').value = aramex_shipment_shipper_phone;
|
644 |
+
|
645 |
+
document.getElementById('aramex_shipment_info_payment_type').value = 'P';
|
646 |
+
|
647 |
+
document.getElementById('ASCC').style.display = 'none';
|
648 |
+
document.getElementById('ARCC').style.display = 'none';
|
649 |
+
|
650 |
+
document.getElementById('CASH').style.display = 'block';
|
651 |
+
document.getElementById('ACCT').style.display = 'block';
|
652 |
+
document.getElementById('PPST').style.display = 'block';
|
653 |
+
document.getElementById('CRDT').style.display = 'block';
|
654 |
+
|
655 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
656 |
+
|
657 |
+
|
658 |
+
|
659 |
+
|
660 |
+
}
|
661 |
+
else if(flag = 2){
|
662 |
+
document.getElementById('aramex_shipment_shipper_name').value = aramex_shipment_shipper_name;
|
663 |
+
document.getElementById('aramex_shipment_shipper_email').value = aramex_shipment_shipper_email;
|
664 |
+
document.getElementById('aramex_shipment_shipper_company').value = aramex_shipment_shipper_company;
|
665 |
+
document.getElementById('aramex_shipment_shipper_street').value = aramex_shipment_shipper_street;
|
666 |
+
document.getElementById('aramex_shipment_shipper_country').value = aramex_shipment_shipper_country;
|
667 |
+
document.getElementById('aramex_shipment_shipper_city').value = aramex_shipment_shipper_city;
|
668 |
+
document.getElementById('aramex_shipment_shipper_postal').value = aramex_shipment_shipper_postal;
|
669 |
+
document.getElementById('aramex_shipment_shipper_state').value = aramex_shipment_shipper_state;
|
670 |
+
document.getElementById('aramex_shipment_shipper_phone').value = aramex_shipment_shipper_phone;
|
671 |
+
|
672 |
+
document.getElementById('aramex_shipment_receiver_name').value = aramex_shipment_receiver_name;
|
673 |
+
document.getElementById('aramex_shipment_receiver_email').value = aramex_shipment_receiver_email;
|
674 |
+
document.getElementById('aramex_shipment_receiver_company').value = aramex_shipment_receiver_company;
|
675 |
+
document.getElementById('aramex_shipment_receiver_street').value = aramex_shipment_receiver_street;
|
676 |
+
document.getElementById('aramex_shipment_receiver_country').value = aramex_shipment_receiver_country;
|
677 |
+
document.getElementById('aramex_shipment_receiver_city').value = aramex_shipment_receiver_city;
|
678 |
+
document.getElementById('aramex_shipment_receiver_postal').value = aramex_shipment_receiver_postal;
|
679 |
+
document.getElementById('aramex_shipment_receiver_state').value = aramex_shipment_receiver_state;
|
680 |
+
document.getElementById('aramex_shipment_receiver_phone').value = aramex_shipment_receiver_phone;
|
681 |
+
|
682 |
+
document.getElementById('aramex_shipment_info_payment_type').value = 'P';
|
683 |
+
|
684 |
+
document.getElementById('ASCC').style.display = 'none';
|
685 |
+
document.getElementById('ARCC').style.display = 'none';
|
686 |
+
|
687 |
+
document.getElementById('CASH').style.display = 'block';
|
688 |
+
document.getElementById('ACCT').style.display = 'block';
|
689 |
+
document.getElementById('PPST').style.display = 'block';
|
690 |
+
document.getElementById('CRDT').style.display = 'block';
|
691 |
+
|
692 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
693 |
+
|
694 |
+
|
695 |
+
}
|
696 |
+
flag = 0;
|
697 |
+
}
|
698 |
+
}
|
699 |
+
|
700 |
+
jccc('#aramex_shipment_info_payment_type').change(function(){
|
701 |
+
//alert('Hello');
|
702 |
+
if(jccc('#aramex_shipment_info_payment_type').val() == "P"){
|
703 |
+
document.getElementById('ASCC').style.display = 'none';
|
704 |
+
document.getElementById('ARCC').style.display = 'none';
|
705 |
+
|
706 |
+
document.getElementById('CASH').style.display = 'block';
|
707 |
+
document.getElementById('ACCT').style.display = 'block';
|
708 |
+
document.getElementById('PPST').style.display = 'block';
|
709 |
+
document.getElementById('CRDT').style.display = 'block';
|
710 |
+
|
711 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
712 |
+
|
713 |
+
|
714 |
+
}
|
715 |
+
else{
|
716 |
+
document.getElementById('ASCC').style.display = 'block';
|
717 |
+
document.getElementById('ARCC').style.display = 'block';
|
718 |
+
|
719 |
+
document.getElementById('CASH').style.display = 'none';
|
720 |
+
document.getElementById('ACCT').style.display = 'none';
|
721 |
+
document.getElementById('PPST').style.display = 'none';
|
722 |
+
document.getElementById('CRDT').style.display = 'none';
|
723 |
+
|
724 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
725 |
+
|
726 |
+
}
|
727 |
+
});
|
728 |
+
|
729 |
+
|
730 |
+
function togglePickup(){
|
731 |
+
jccc('#pickup_infromation').toggle('slow');
|
732 |
+
}
|
733 |
+
|
734 |
+
|
735 |
+
function aramexpop(itemscount)
|
736 |
+
{
|
737 |
+
if(itemscount >= 0){
|
738 |
+
jccc("#aramex_overlay").css("display", "block");
|
739 |
+
jccc("#aramex_shipment_creation").fadeIn(1000);
|
740 |
+
}
|
741 |
+
else{
|
742 |
+
alert('Cannot create a shipment, all items have been shipped');
|
743 |
+
}
|
744 |
+
|
745 |
+
}
|
746 |
+
|
747 |
+
function aramexclose()
|
748 |
+
{
|
749 |
+
jccc("#aramex_overlay").css("display", "none");
|
750 |
+
jccc("#aramex_shipment_creation").fadeOut(500);
|
751 |
+
}
|
752 |
+
|
753 |
+
function aramexhide(aramexid, item_price, order_total_weight)
|
754 |
+
{
|
755 |
+
|
756 |
+
if(jccc(".aramex_item_tobe_shipped").length > 1){
|
757 |
+
jccc("#order-total-weight").html((parseFloat(jccc("#order-total-weight").html()) - parseFloat(order_total_weight)).toFixed(2));
|
758 |
+
jccc("#order_weight").val((parseFloat(jccc("#order-total-weight").html()) - parseFloat(order_total_weight)).toFixed(2));
|
759 |
+
|
760 |
+
jccc("input[name=aramex_shipment_info_items_subtotal]").val((parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val())-parseFloat(item_price)).toFixed(2));
|
761 |
+
|
762 |
+
//new
|
763 |
+
jccc('#aramex_shipment_info_cod_amount').val((parseFloat(jccc('#aramex_shipment_info_cod_amount').val()) - parseFloat(parseInt(jccc("input[name="+ aramexid +"]").val()) * parseFloat(jccc('#aramex_items_base_price_'+aramexid).val()))).toFixed(2));
|
764 |
+
|
765 |
+
jccc("#item"+aramexid).css('background', '#F2C2C8');
|
766 |
+
jccc("#item"+aramexid).fadeOut(500);
|
767 |
+
jccc("#item"+aramexid+" input").val(0);
|
768 |
+
jccc("#item"+aramexid).remove();
|
769 |
+
jccc("#"+aramexid).remove();
|
770 |
+
jccc("textarea[name=aramex_shipment_description]").text(jccc("#aramex_shipment_description_div").text());
|
771 |
+
get_tobe_shipped_items_number();
|
772 |
+
} else {
|
773 |
+
alert('At least one item is needed to create a shipment.');
|
774 |
+
}
|
775 |
+
}
|
776 |
+
|
777 |
+
function get_tobe_shipped_items_number()
|
778 |
+
{
|
779 |
+
items_tobe_shipped_number = 0;
|
780 |
+
jccc("#aramex_items_table .aramex_input_items_qty").each(function(qty_index){
|
781 |
+
items_tobe_shipped_number += parseFloat(jccc(this).val());
|
782 |
+
});
|
783 |
+
//items_tobe_shipped_number = jccc(".aramex_item_tobe_shipped").length;
|
784 |
+
jccc("#items_tobe_shipped_number").html(items_tobe_shipped_number);
|
785 |
+
}
|
786 |
+
|
787 |
+
var codTotal = jccc("#aramex_shipment_info_cod_amount").val();
|
788 |
+
|
789 |
+
jccc(".aramex_input_items_qty").keyup(function(){
|
790 |
+
var the_id = jccc(this).attr('name');
|
791 |
+
var items_price = 0;
|
792 |
+
|
793 |
+
var itemWeight = 0;
|
794 |
+
var itemTotalPrice = 0;
|
795 |
+
|
796 |
+
jccc("#aramex_items_"+the_id).val(jccc(this).val());
|
797 |
+
jccc(".aramex_input_items_qty").each(function(price_index){
|
798 |
+
var the_id_qty = jccc(this).attr('name');//alert(the_id_qty);
|
799 |
+
items_price += jccc(this).val() * jccc("#aramex_items_base_price_"+the_id_qty).val();
|
800 |
+
|
801 |
+
itemWeight += jccc(this).val() * jccc("#aramex_items_base_weight_"+the_id_qty).val();
|
802 |
+
itemTotalPrice += (parseInt(jccc("#aramex_items_total_"+the_id_qty).val()) - parseInt(jccc(this).val())) * jccc("#aramex_items_base_price_"+the_id_qty).val();
|
803 |
+
|
804 |
+
});
|
805 |
+
|
806 |
+
//jccc("input[name=aramex_shipment_info_items_subtotal]").val(items_price);
|
807 |
+
|
808 |
+
jccc("input[name=aramex_shipment_info_items_subtotal]").val(items_price.toFixed(2));
|
809 |
+
jccc("#order-total-weight").html(itemWeight.toFixed(2));
|
810 |
+
|
811 |
+
if(itemTotalPrice){
|
812 |
+
jccc("#aramex_shipment_info_cod_amount").val((parseFloat('<?php echo round($_order->getData('grand_total'), 2) ?>') - parseFloat(itemTotalPrice)).toFixed(2));
|
813 |
+
}
|
814 |
+
else if(itemTotalPrice == 0){
|
815 |
+
jccc("#aramex_shipment_info_cod_amount").val(codTotal);
|
816 |
+
}
|
817 |
+
|
818 |
+
jccc("input[name=aramex_shipment_info_cod_value]").val(parseFloat(items_price) + parseFloat(jccc("input[name=aramex_shipment_info_shipping_charges]").val()));
|
819 |
+
get_tobe_shipped_items_number();
|
820 |
+
});
|
821 |
+
|
822 |
+
var messages_content;
|
823 |
+
<?php
|
824 |
+
if(Mage::app()->getRequest()->getParam('aramexpopup') == 'show'){
|
825 |
+
?>
|
826 |
+
aramexpop(1);
|
827 |
+
jccc("#messages").ready(function(){
|
828 |
+
jccc("#aramex_messages").html(jccc("#messages").html());
|
829 |
+
});
|
830 |
+
<?php
|
831 |
+
}
|
832 |
+
?>
|
833 |
+
|
834 |
+
jccc("input[name=aramex_shipment_info_shipping_charges]").change(function(){
|
835 |
+
var cod_value = parseFloat(jccc("input[name=aramex_shipment_info_shipping_charges]").val()) + parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val());
|
836 |
+
jccc("input[name=aramex_shipment_info_cod_value]").val(cod_value);
|
837 |
+
});
|
838 |
+
|
839 |
+
jccc(".aramex_countries").change(function(){
|
840 |
+
if(jccc("select[name=aramex_shipment_shipper_country]").val() != jccc("select[name=aramex_shipment_receiver_country]").val()){
|
841 |
+
jccc("select[name=aramex_shipment_info_product_group]").val('EXP');
|
842 |
+
//jccc("select[name=aramex_shipment_info_service_type]").val('EPX');
|
843 |
+
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
844 |
+
jccc("select[name=aramex_shipment_info_additional_services] .express_service").attr("selected", "selected");
|
845 |
+
|
846 |
+
document.getElementById('aramex_shipment_info_product_type').value = 'PDX';
|
847 |
+
document.getElementById('ONP').style.display = 'none';
|
848 |
+
document.getElementById('OND').style.display = 'none';
|
849 |
+
document.getElementById('CDA').style.display = 'none';
|
850 |
+
|
851 |
+
document.getElementById('PDX').style.display = 'block';
|
852 |
+
document.getElementById('PPX').style.display = 'block';
|
853 |
+
document.getElementById('PLX').style.display = 'block';
|
854 |
+
document.getElementById('DDX').style.display = 'block';
|
855 |
+
document.getElementById('DPX').style.display = 'block';
|
856 |
+
document.getElementById('GDX').style.display = 'block';
|
857 |
+
document.getElementById('GPX').style.display = 'block';
|
858 |
+
|
859 |
+
} else {
|
860 |
+
jccc("select[name=aramex_shipment_info_product_group]").val('DOM');
|
861 |
+
//jccc("select[name=aramex_shipment_info_service_type]").val('ONP');
|
862 |
+
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
863 |
+
jccc("select[name=aramex_shipment_info_additional_services] .domestic_service").attr("selected", "selected");
|
864 |
+
|
865 |
+
document.getElementById('aramex_shipment_info_product_type').value = 'ONP';
|
866 |
+
document.getElementById('ONP').style.display = 'block';
|
867 |
+
document.getElementById('OND').style.display = 'block';
|
868 |
+
document.getElementById('CDA').style.display = 'block';
|
869 |
+
|
870 |
+
document.getElementById('PDX').style.display = 'none';
|
871 |
+
document.getElementById('PPX').style.display = 'none';
|
872 |
+
document.getElementById('PLX').style.display = 'none';
|
873 |
+
document.getElementById('DDX').style.display = 'none';
|
874 |
+
document.getElementById('DPX').style.display = 'none';
|
875 |
+
document.getElementById('GDX').style.display = 'none';
|
876 |
+
document.getElementById('GPX').style.display = 'none';
|
877 |
+
}
|
878 |
+
|
879 |
+
jccc("#aramex_shipment_info_product_group_div").html(jccc("select[name=aramex_shipment_info_product_group] option:selected").text());
|
880 |
+
jccc("#aramex_shipment_info_service_type_div").html(jccc("select[name=aramex_shipment_info_service_type] option:selected").text());
|
881 |
+
jccc("#aramex_shipment_info_additional_services_div").html(jccc("select[name=aramex_shipment_info_additional_services] option:selected").text());
|
882 |
+
});
|
883 |
+
|
884 |
+
jccc(".aramex_all_options").change(function(){
|
885 |
+
|
886 |
+
});
|
887 |
+
jccc("#aramex_shipment_info_product_group").change(function(){
|
888 |
+
if(jccc("select[name=aramex_shipment_info_product_group]").val()=='EXP'){
|
889 |
+
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
890 |
+
jccc("select[name=aramex_shipment_info_additional_services] .express_service").attr("selected", "selected");
|
891 |
+
|
892 |
+
document.getElementById('aramex_shipment_info_product_type').value = 'PDX';
|
893 |
+
document.getElementById('ONP').style.display = 'none';
|
894 |
+
document.getElementById('OND').style.display = 'none';
|
895 |
+
document.getElementById('CDA').style.display = 'none';
|
896 |
+
|
897 |
+
document.getElementById('PDX').style.display = 'block';
|
898 |
+
document.getElementById('PPX').style.display = 'block';
|
899 |
+
document.getElementById('PLX').style.display = 'block';
|
900 |
+
document.getElementById('DDX').style.display = 'block';
|
901 |
+
document.getElementById('DPX').style.display = 'block';
|
902 |
+
document.getElementById('GDX').style.display = 'block';
|
903 |
+
document.getElementById('GPX').style.display = 'block';
|
904 |
+
|
905 |
+
}else if(jccc("select[name=aramex_shipment_info_product_group]").val()=='DOM'){
|
906 |
+
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
907 |
+
jccc("select[name=aramex_shipment_info_additional_services] .domestic_service").attr("selected", "selected");
|
908 |
+
|
909 |
+
document.getElementById('aramex_shipment_info_product_type').value = 'ONP';
|
910 |
+
document.getElementById('ONP').style.display = 'block';
|
911 |
+
document.getElementById('OND').style.display = 'block';
|
912 |
+
document.getElementById('CDA').style.display = 'block';
|
913 |
+
|
914 |
+
document.getElementById('PDX').style.display = 'none';
|
915 |
+
document.getElementById('PPX').style.display = 'none';
|
916 |
+
document.getElementById('PLX').style.display = 'none';
|
917 |
+
document.getElementById('DDX').style.display = 'none';
|
918 |
+
document.getElementById('DPX').style.display = 'none';
|
919 |
+
document.getElementById('GDX').style.display = 'none';
|
920 |
+
document.getElementById('GPX').style.display = 'none';
|
921 |
+
|
922 |
+
}
|
923 |
+
jccc("#aramex_shipment_info_service_type_div").html(jccc("select[name=aramex_shipment_info_service_type] option:selected").text());
|
924 |
+
jccc("#aramex_shipment_info_additional_services_div").html(jccc("select[name=aramex_shipment_info_additional_services] option:selected").text());
|
925 |
+
|
926 |
+
});
|
927 |
+
jccc("#aramex_shipment_info_product_group_div").html(jccc("select[name=aramex_shipment_info_product_group] option:selected").text());
|
928 |
+
jccc("#aramex_shipment_info_service_type_div").html(jccc("select[name=aramex_shipment_info_service_type] option:selected").text());
|
929 |
+
jccc("#aramex_shipment_info_additional_services_div").html(jccc("select[name=aramex_shipment_info_additional_services] option:selected").text());
|
930 |
+
|
931 |
+
//jccc("#aramex_shipment").validate();
|
932 |
+
|
933 |
+
jccc(document).ready(function(){
|
934 |
+
if((jccc('#aramex_messages').html() != "") && (jccc('.error-msg'))){
|
935 |
+
jccc("#aramex_overlay").css("display", "block");
|
936 |
+
jccc("#aramex_shipment_creation").fadeIn(1000);
|
937 |
+
}
|
938 |
+
|
939 |
+
jccc(function() {
|
940 |
+
//jccc( "#datepicker" ).datepicker();
|
941 |
+
jccc( "#aramex_shipment_info_pickup_date" ).datepicker({ dateFormat: "yy-mm-dd" });
|
942 |
+
jccc( "#aramex_shipment_info_ready_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
943 |
+
jccc( "#aramex_shipment_info_last_pickup_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
944 |
+
jccc( "#aramex_shipment_info_closing_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
945 |
+
});
|
946 |
+
|
947 |
+
jccc('#filereset').click(function(){
|
948 |
+
jccc("#file1_div").html(jccc("#file1_div").html());
|
949 |
+
});
|
950 |
+
jccc('#file2reset').click(function(){
|
951 |
+
jccc("#file2_div").html(jccc("#file2_div").html());
|
952 |
+
});
|
953 |
+
jccc('#file3reset').click(function(){
|
954 |
+
jccc("#file3_div").html(jccc("#file3_div").html());
|
955 |
+
});
|
956 |
+
jccc("#aramex_shipment").validate();
|
957 |
+
|
958 |
+
});
|
959 |
+
|
960 |
+
</script>
|
961 |
+
<?php $formSession->unsetData('form_data')?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Aramex_Adminhtml.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Aramex_Adminhtml>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Aramex_Adminhtml>
|
8 |
+
|
9 |
+
</modules>
|
10 |
+
</config>
|
app/etc/modules/Aramex_Core.xml
CHANGED
@@ -1,28 +1,9 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Aramex_Core>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
</Aramex_Core>
|
8 |
-
|
9 |
-
|
10 |
-
<active>true</active>
|
11 |
-
<codePool>community</codePool>
|
12 |
-
<depends>Aramex_Core</depends>
|
13 |
-
</Aramex_Tracking>
|
14 |
-
|
15 |
-
<Aramex_Calculator>
|
16 |
-
<active>true</active>
|
17 |
-
<codePool>community</codePool>
|
18 |
-
<depends>Aramex_Core</depends>
|
19 |
-
</Aramex_Calculator>
|
20 |
-
|
21 |
-
<Aramex_Shipping>
|
22 |
-
<active>true</active>
|
23 |
-
<codePool>community</codePool>
|
24 |
-
<depends>Aramex_Core</depends>
|
25 |
-
</Aramex_Shipping>
|
26 |
-
-->
|
27 |
-
</modules>
|
28 |
-
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Aramex_Core>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Aramex_Core>
|
8 |
+
</modules>
|
9 |
+
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Aramex_Shipment.xml
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?xml version="1.0" ?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Aramex_Shipment>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
</Aramex_Shipment>
|
8 |
-
</modules>
|
9 |
</config>
|
1 |
+
<?xml version="1.0" ?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Aramex_Shipment>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Aramex_Shipment>
|
8 |
+
</modules>
|
9 |
</config>
|
aramex/desktop.ini
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
[ViewState]
|
2 |
-
Mode=
|
3 |
-
Vid=
|
4 |
-
FolderType=Generic
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Aramex_Shipping_Tracking_API</name>
|
4 |
-
<version>
|
5 |
<stability>stable</stability>
|
6 |
-
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>Aramex Shipping
|
11 |
-
<notes>
|
12 |
-
<authors><author><name>Aramex</name><user>
|
13 |
-
<date>2013-
|
14 |
-
<time>
|
15 |
-
<contents><target name="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Aramex_Shipping_Tracking_API</name>
|
4 |
+
<version>2.0.0</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Aramex Shipping Extension for magento</summary>
|
10 |
+
<description>Aramex Shipping Extension for magento</description>
|
11 |
+
<notes>version 2.0.0</notes>
|
12 |
+
<authors><author><name>Aramex</name><user>aramexdev</user><email>portalsthirdparty@aramex.com</email></author></authors>
|
13 |
+
<date>2013-12-21</date>
|
14 |
+
<time>05:22:22</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Aramex"><dir name="Adminhtml"><dir name="controllers"><dir name="Sales"><file name="OrderController.php" hash="d897c576f9b082f60b85e62770586145"/></dir></dir><dir name="etc"><file name="config.xml" hash="8551ea941ec563a3d87f7db474f2eeb5"/></dir></dir><dir name="Core"><dir name="Helper"><file name="Data.php" hash="9cdee7109e98a64d9b796cd57bdf5e82"/></dir><dir name="etc"><file name="config.xml" hash="941ddfc4bda79d56a843500038acc3f2"/><file name="system.xml" hash="4e8e395381e61b4a1181e48630a9e278"/></dir></dir><dir name="Shipment"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="View.php" hash="923a4bc9e8e53c912b894f9f30a9d24b"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="169ce609224658e762e5c07df2de8342"/></dir><dir name="Model"><dir name="Carrier"><dir name="Aramex"><dir name="Source"><file name="Dropoff.php" hash="e707cd809c802f3efb698d0e36721e05"/><file name="Freemethod.php" hash="6579a3c5c0cbf8828c2752b6e0d108ee"/><file name="Method.php" hash="db122d66069148186f5c224dd943d059"/><file name="Packaging.php" hash="50e551b6e52a190f47f969ae70dc7b22"/></dir></dir><file name="Aramex.php" hash="2d4847f66a4fb7a3232d520e9a978d12"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="e3a6cdad35fe8d49fec3ad36d0c5f5cf"/><file name="RateController.php" hash="ed30e5328fb6bc5d34a7ccd44ee295ae"/><file name="SchedulepickupController.php" hash="2788b9013887295bcc9cb84799440057"/><file name="ShipmentController.php" hash="8bf796cb3ce84662fc5cfdaf5867fd55"/></dir><dir name="etc"><file name="config.xml" hash="227cffe70c4cc075c8e10da17861662b"/><dir name="wsdl"><dir name="Aramex"><file name="Tracking.wsdl" hash="d0a3decaa902f3f2b6d463c790071da8"/><file name="aramex-rates-calculator-wsdl.wsdl" hash="efd091f022ea4b28fc41eae0b156f9fc"/><file name="shipping.wsdl" hash="3d13e21363413243d5c70f171ef9b121"/></dir></dir></dir></dir><dir name="Shipping"><dir name="Model"><dir name="Carrier"><dir name="Aramex"><dir name="Source"><file name="Dropoff.php" hash="e707cd809c802f3efb698d0e36721e05"/><file name="Freemethod.php" hash="6579a3c5c0cbf8828c2752b6e0d108ee"/><file name="Method.php" hash="db122d66069148186f5c224dd943d059"/><file name="Packaging.php" hash="50e551b6e52a190f47f969ae70dc7b22"/></dir></dir><file name="Aramex.php" hash="8f776c5e6700c04b7be175acc1e5e458"/></dir></dir><dir name="etc"><file name="config.xml" hash="987cf2182f827cebe8865c14b21b922e"/><file name="system.xml" hash="35b6412240e0cd6e2f5fecf6eaf05cc0"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="aramex"><file name="calculate_rate.phtml" hash="94ae86d7e8580bf848f5cbe3887d400a"/><file name="print_label.phtml" hash="61de8abf8aa383cbdc7f7b64a8be4ae2"/><dir name="sales"><dir name="order"><dir name="comments"><file name="view.phtml" hash="7e2e3243c12ef7fafead569c5918d130"/></dir><dir name="view"><dir name="tab"><file name="history.phtml" hash="35e4f4f8ab3d7c00993f8c3ccd5a81f2"/></dir></dir></dir></dir><file name="schedule_puckup.phtml" hash="9b1fb85b928bcbb97673a1c9257a1fae"/><file name="shipment.phtml" hash="2def23ff86ef398332fb20e3643a1b49"/></dir></dir><dir name="layout"><file name="aramex.xml" hash="49460aae3f0f7d7d470dfafe0c104f94"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Aramex_Adminhtml.xml" hash="d7d6bae0800edb5ad632ffb9a73ee78d"/><file name="Aramex_Core.xml" hash="f3ef092ca056636b4d6bedad36dabaf7"/><file name="Aramex_Shipment.xml" hash="44273c772ecb4ad2ceade7e5f0e49775"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="aramex"><dir name="css"><file name="aramex.css" hash="e44b92da4fe65b7a8eec5635d792cdfe"/></dir><dir name="js"><file name="common.js" hash="8e744a69845908527041314cc75b8ff1"/><file name="jquery.min.js" hash="b8d64d0bc142b3f670cc0611b0aebcae"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.0.1</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6</min><max>1.8.1</max></package></required></dependencies>
|
18 |
</package>
|
skin/adminhtml/default/default/aramex/css/aramex.css
ADDED
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#aramex_shipment_creation legend {
|
2 |
+
display: block;
|
3 |
+
font-weight: bold;
|
4 |
+
margin-left: 4px;
|
5 |
+
padding-left: 5px;
|
6 |
+
padding-right: 5px;
|
7 |
+
}
|
8 |
+
|
9 |
+
.aramex_shipment_creation_fieldset {
|
10 |
+
float: left;
|
11 |
+
margin-bottom: 10px;
|
12 |
+
margin-left: 4px;
|
13 |
+
margin-right: 2px;
|
14 |
+
min-height: 250px;
|
15 |
+
width: 310px;
|
16 |
+
}
|
17 |
+
|
18 |
+
#aramex_shipment_creation {
|
19 |
+
width: 700px;
|
20 |
+
font-family: verdana;
|
21 |
+
font-size: 12px;
|
22 |
+
margin: 0 auto;
|
23 |
+
z-index: 401;
|
24 |
+
display: none;
|
25 |
+
opacity: 1;
|
26 |
+
background: #fff;
|
27 |
+
padding: 15px;
|
28 |
+
margin-top: 10px;
|
29 |
+
}
|
30 |
+
|
31 |
+
#aramex_shipment_creation_header {
|
32 |
+
margin-bottom: 20px;
|
33 |
+
}
|
34 |
+
|
35 |
+
#aramex_shipment_creation_logo {
|
36 |
+
float: right;
|
37 |
+
}
|
38 |
+
|
39 |
+
#aramex_shipment_creation_title {
|
40 |
+
float: left;
|
41 |
+
margin-left: 15px;
|
42 |
+
margin-top: 15px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.aramex_clearer {
|
46 |
+
clear: both;
|
47 |
+
}
|
48 |
+
|
49 |
+
.aramex_shipment_creation_part {
|
50 |
+
padding: 5px;
|
51 |
+
margin-bottom: 10px;
|
52 |
+
}
|
53 |
+
|
54 |
+
#aramex_shipment label {
|
55 |
+
display: block;
|
56 |
+
float: left;
|
57 |
+
font-size: 11px;
|
58 |
+
padding: 2px;
|
59 |
+
width: 90px;
|
60 |
+
}
|
61 |
+
|
62 |
+
#aramex_shipment_creation input, select{
|
63 |
+
padding: 2px;
|
64 |
+
display: block;
|
65 |
+
width: 190px;
|
66 |
+
}
|
67 |
+
|
68 |
+
#aramex_shipment .text_short {
|
69 |
+
clear: both;
|
70 |
+
margin-bottom: 5px;
|
71 |
+
min-height: 28px;
|
72 |
+
width: 300px;
|
73 |
+
}
|
74 |
+
|
75 |
+
#shipment_infromation .text_short {
|
76 |
+
min-height: 35px;
|
77 |
+
}
|
78 |
+
|
79 |
+
#aramex_shipment_creation .little_description {
|
80 |
+
font-size: 9px;
|
81 |
+
color: #555;
|
82 |
+
float: right;
|
83 |
+
padding-right: 20px;
|
84 |
+
margin-bottom: 5px;
|
85 |
+
margin-top: 3px;
|
86 |
+
}
|
87 |
+
|
88 |
+
#general_details {
|
89 |
+
margin-bottom: -10px;
|
90 |
+
}
|
91 |
+
|
92 |
+
.aramex_shipment_creation_fieldset_big {
|
93 |
+
margin-bottom: 10px;
|
94 |
+
}
|
95 |
+
|
96 |
+
#aramex_shipment_creation_general_info {
|
97 |
+
background: #FFFFCC;
|
98 |
+
}
|
99 |
+
|
100 |
+
#shipment_infromation, #shipment_infromation2 {
|
101 |
+
float: left;
|
102 |
+
}
|
103 |
+
|
104 |
+
#general_details .text_short, #general_details textarea {
|
105 |
+
width: 300px;
|
106 |
+
float: left;
|
107 |
+
color: #000;
|
108 |
+
}
|
109 |
+
|
110 |
+
#aramex_overlay {
|
111 |
+
z-index: 400;
|
112 |
+
position: absolute;
|
113 |
+
width: 100%;
|
114 |
+
height: 100%;
|
115 |
+
display: none;
|
116 |
+
top: 0;
|
117 |
+
left: 0;
|
118 |
+
}
|
119 |
+
|
120 |
+
#aramex_items_table {
|
121 |
+
text-align: left;
|
122 |
+
border-collapse: collapse;
|
123 |
+
}
|
124 |
+
|
125 |
+
#aramex_items_table th {
|
126 |
+
text-align: left;
|
127 |
+
background: #ccc;
|
128 |
+
}
|
129 |
+
|
130 |
+
#aramex_items_table td, #aramex_items_table th {
|
131 |
+
border: 0 none;
|
132 |
+
padding: 1px 15px 3px 3px;
|
133 |
+
};
|
134 |
+
|
135 |
+
#aramex_items_table .aramex_item_qty
|
136 |
+
{
|
137 |
+
width: 20px;
|
138 |
+
}
|
139 |
+
|
140 |
+
#aramex_items_table .aramex_item_name
|
141 |
+
{
|
142 |
+
width: 180px;
|
143 |
+
}
|
144 |
+
|
145 |
+
#aramex_items_table .aramex_item_options
|
146 |
+
{
|
147 |
+
width: 20px;
|
148 |
+
}
|
149 |
+
|
150 |
+
#aramex_items_table .aramex_item_tobe_shipped {
|
151 |
+
padding-top: 3px;
|
152 |
+
padding-bottom: 3px;
|
153 |
+
}
|
154 |
+
|
155 |
+
#aramex_shipment label.error {
|
156 |
+
display: inline-block;
|
157 |
+
float: none;
|
158 |
+
margin-left: 17px;
|
159 |
+
padding-left: 58px;
|
160 |
+
width: 200px;
|
161 |
+
}
|
162 |
+
|
163 |
+
#aramex_shipment a.error span,
|
164 |
+
#aramex_shipment .required,
|
165 |
+
#aramex_shipment .validation-advice {
|
166 |
+
color: #000000 !important;
|
167 |
+
font-weight: normal !important;
|
168 |
+
}
|
169 |
+
|
170 |
+
#aramex_shipment .error {
|
171 |
+
color: red !important;
|
172 |
+
}
|
173 |
+
|
174 |
+
#shipper_details textarea, #receiver_details textarea, #shipment_infromation textarea {
|
175 |
+
width: 190px;
|
176 |
+
}
|
177 |
+
|
178 |
+
#aramex_shipment_creation .aramex_input_items_qty {
|
179 |
+
width: 25px;
|
180 |
+
}
|
181 |
+
|
182 |
+
legend {
|
183 |
+
display: block !important;
|
184 |
+
height: 0;
|
185 |
+
line-height: 0;
|
186 |
+
margin: 0;
|
187 |
+
overflow: visible;
|
188 |
+
visibility: visible;
|
189 |
+
padding: 0;
|
190 |
+
width: auto;
|
191 |
+
}
|
192 |
+
#aramex_shipment_creation fieldset, .cal-form fieldset{border: 1px solid #D6D6D6; margin-bottom: 15px;
|
193 |
+
padding: 10px 15px;}
|
194 |
+
.back-over{position:fixed; left:0; top:0;background:#000; opacity:0.7; z-index:420; display:none; width:100%; height:100%;}
|
195 |
+
.cal-rate-part, .schedule-pickup-part{ position:absolute; display:none; z-index:500; background:#fff; height:400px; width:700px; left:calc( 50% - 350px); top:calc(50% - 200px);overflow:auto;}
|
196 |
+
.cal-form fieldset, .pickup-form fieldset{ background: none repeat scroll 0 0 #FAFAFA; border: 1px solid #D6D6D6;margin-bottom: 15px;padding: 10px 15px;}
|
197 |
+
.cal-form, .pickup-form {padding:15px; }
|
198 |
+
.fl{ float:left;}
|
199 |
+
.fr{ float:right;}
|
200 |
+
.clearfix:after {
|
201 |
+
content: ".";
|
202 |
+
display: block;
|
203 |
+
height: 0;
|
204 |
+
clear: both;
|
205 |
+
visibility: hidden;
|
206 |
+
}
|
207 |
+
.cal-form legend, .pickup-form legand{ font-size:16px;}
|
208 |
+
.mar-10{ margin:10px 0;}
|
209 |
+
.mar-5{ margin:5px 0;}
|
210 |
+
.mar-30{ margin:30px 0;}
|
211 |
+
.fields{ }
|
212 |
+
.fields h3{ font-size:14px; }
|
213 |
+
.field label span, .red{ color:red; }
|
214 |
+
.field input,.field select{ width:250px; height:25px; }
|
215 |
+
.field label{ width:100px; display:block; }
|
216 |
+
.width-60{ width:60px !important; }
|
217 |
+
.width-150{ width:150px !important;}
|
218 |
+
.width-270{ width:270px;}
|
219 |
+
.width-full{ width:519px !important}
|
220 |
+
.mar-right-10{ margin-right:10px;}
|
221 |
+
.mar-lf-10{ margin-left:10px;}
|
222 |
+
.rate-result, .pickup-result{ display:none; padding:0 10px; border:1px solid #ccc; }
|
223 |
+
.result .error, .pickup-res .error{ color:red; }
|
224 |
+
.result .amount{ font-weight:bold; font-size:14px; }
|
225 |
+
.calendar{ z-index:10000; left:30% !important;}
|
skin/adminhtml/default/default/aramex/js/common.js
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery.noConflict();
|
2 |
+
myObj={
|
3 |
+
printLabelUrl:'',
|
4 |
+
wh:jQuery(window).height(),
|
5 |
+
ww:jQuery(window).width(),
|
6 |
+
shipperCountry:'',
|
7 |
+
shipperCity:'',
|
8 |
+
shipperZip:'',
|
9 |
+
shipperState:'',
|
10 |
+
recieverCountry:'',
|
11 |
+
recieverCity:'',
|
12 |
+
recieverZip:'',
|
13 |
+
recieverState:'',
|
14 |
+
openWindow:function(param1,param2){
|
15 |
+
jQuery(param1).css({'visibility':'hidden','display':'block'});
|
16 |
+
var h=jQuery(param2).height();
|
17 |
+
var w=jQuery(param2).width();
|
18 |
+
var wh=this.wh;
|
19 |
+
var ww=this.ww;
|
20 |
+
if(h>=wh){ h=wh-20; jQuery(param2).css({'height':(h-30)}); }
|
21 |
+
else{ h=h+30; }
|
22 |
+
jQuery('.back-over').fadeIn(200);
|
23 |
+
var t=wh-h;
|
24 |
+
t=t/2;
|
25 |
+
var l=ww-w
|
26 |
+
l=l/2;
|
27 |
+
jQuery(param1).css({'visibility':'visible','left':l+'px','display':'none','height':h,'top':t+'px'}).fadeIn(500);
|
28 |
+
|
29 |
+
},
|
30 |
+
openCalc:function(){
|
31 |
+
this.cropValues();
|
32 |
+
this.openWindow('.cal-rate-part','.cal-form');
|
33 |
+
},
|
34 |
+
defaultVal:function(){
|
35 |
+
this.shipperCountry=$('aramex_shipment_shipper_country').value;
|
36 |
+
this.shipperCity=$('aramex_shipment_shipper_city').value;
|
37 |
+
this.shipperZip=$('aramex_shipment_shipper_postal').value;
|
38 |
+
this.shipperState=$('aramex_shipment_shipper_state').value;
|
39 |
+
|
40 |
+
this.recieverCountry=$('aramex_shipment_receiver_country').value;
|
41 |
+
this.recieverCity=$('aramex_shipment_receiver_city').value;
|
42 |
+
this.recieverZip=$('aramex_shipment_receiver_postal').value;
|
43 |
+
this.recieverState=$('aramex_shipment_receiver_state').value;
|
44 |
+
},
|
45 |
+
cropValues:function(){
|
46 |
+
this.defaultVal();
|
47 |
+
var orginCountry=this.getId('origin_country');
|
48 |
+
this.setSelectedValue(orginCountry,this.shipperCountry);
|
49 |
+
$('origin_city').value=this.shipperCity;
|
50 |
+
$('origin_zipcode').value=this.shipperZip;
|
51 |
+
$('origin_state').value=this.shipperState;
|
52 |
+
|
53 |
+
var desCountry=this.getId('destination_country');
|
54 |
+
this.setSelectedValue(desCountry,this.recieverCountry);
|
55 |
+
$('destination_city').value=this.recieverCity;
|
56 |
+
$('destination_zipcode').value=this.recieverZip;
|
57 |
+
$('destination_state').value=this.recieverState;
|
58 |
+
},
|
59 |
+
getId:function(id){
|
60 |
+
return document.getElementById(id);
|
61 |
+
},
|
62 |
+
setSelectedValue:function(selectObj, valueToSet) {
|
63 |
+
for (var i = 0; i < selectObj.options.length; i++) {
|
64 |
+
if (selectObj.options[i].value== valueToSet) {
|
65 |
+
selectObj.options[i].selected = true;
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
},
|
70 |
+
openPickup:function(){
|
71 |
+
this.defaultVal();
|
72 |
+
var pickupCountry=this.getId('pickup_country');
|
73 |
+
this.setSelectedValue(pickupCountry,this.shipperCountry);
|
74 |
+
$('pickup_city').value=this.shipperCity;
|
75 |
+
$('pickup_zip').value=this.shipperZip;
|
76 |
+
$('pickup_state').value=this.shipperState;
|
77 |
+
$('pickup_address').value=$('aramex_shipment_shipper_street').value;
|
78 |
+
$('pickup_company').value=$('aramex_shipment_shipper_company').value;
|
79 |
+
$('pickup_contact').value=$('aramex_shipment_shipper_name').value;
|
80 |
+
$('pickup_email').value=$('aramex_shipment_shipper_email').value;
|
81 |
+
this.openWindow('.schedule-pickup-part','.pickup-form');
|
82 |
+
},
|
83 |
+
close:function(){
|
84 |
+
jQuery('.back-over').fadeOut(500);
|
85 |
+
jQuery('.cal-rate-part, .schedule-pickup-part').fadeOut(200);
|
86 |
+
},
|
87 |
+
calcRate:function(){
|
88 |
+
this.ajax('calc-rate-form','.result','.rate-result');
|
89 |
+
},
|
90 |
+
schedulePickup:function(){
|
91 |
+
this.ajax('pickup-form','.pickup-res','.pickup-result');
|
92 |
+
|
93 |
+
},
|
94 |
+
ajax:function(formId,result1,result2){
|
95 |
+
jQuery('#loading-mask').css({'z-index':'1000'});
|
96 |
+
$(formId).request({
|
97 |
+
method: 'post',
|
98 |
+
parameters:$(formId).serialize(),
|
99 |
+
onSuccess: function(transport){
|
100 |
+
json = transport.responseText.evalJSON();
|
101 |
+
if(json.type=='success'){
|
102 |
+
jQuery(result1).html(json.html);
|
103 |
+
}else{
|
104 |
+
var error="<div class='error'>"+json.error+"</div>";
|
105 |
+
jQuery(result1).html(error).show();
|
106 |
+
}
|
107 |
+
jQuery(result2).show();
|
108 |
+
}
|
109 |
+
});
|
110 |
+
},
|
111 |
+
printLabel:function(){
|
112 |
+
setLocation(this.printLabelUrl);
|
113 |
+
}
|
114 |
+
}
|
skin/adminhtml/default/default/aramex/js/jquery.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
|
2 |
+
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
|
3 |
+
a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
|
4 |
+
.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
|