Version Notes
stable
Download this release
Release Info
Developer | Aramex |
Extension | Aramex_Shipping_Tracking_API |
Version | 1.0.1 |
Comparing to | |
See all releases |
Version 1.0.1
- app/code/community/Aramex/.DS_Store +0 -0
- app/code/community/Aramex/Core/.DS_Store +0 -0
- app/code/community/Aramex/Core/Aramex_Core.xml +28 -0
- app/code/community/Aramex/Core/Helper/Data.php +5 -0
- app/code/community/Aramex/Core/Model/Settings.php +0 -0
- app/code/community/Aramex/Core/etc/config.xml +41 -0
- app/code/community/Aramex/Core/etc/system.xml +81 -0
- app/code/community/Aramex/Core/etc/system.xml-15-Jan-2013 +81 -0
- app/code/community/Aramex/Core/etc/system.xml-7-Jan-2013 +82 -0
- app/code/community/Aramex/Shipment/.DS_Store +0 -0
- app/code/community/Aramex/Shipment/Aramex_Shipment.xml +9 -0
- app/code/community/Aramex/Shipment/Block/Sales/Order/View.php +15 -0
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex.php +329 -0
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Dropoff.php +39 -0
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Freemethod.php +36 -0
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Method.php +39 -0
- app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Packaging.php +39 -0
- 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/IndexController.php +1 -0
- app/code/community/Aramex/Shipment/controllers/ShipmentController.php +455 -0
- app/code/community/Aramex/Shipment/etc/config.xml +112 -0
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex.php +329 -0
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Dropoff.php +39 -0
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Freemethod.php +36 -0
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Method.php +39 -0
- app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Packaging.php +39 -0
- app/code/community/Aramex/Shipping/etc/config.xml +78 -0
- app/code/community/Aramex/Shipping/etc/system.xml +374 -0
- app/design/adminhtml/default/default/template/sales/order/view/tab/info.phtml +1273 -0
- app/etc/modules/Aramex_Core.xml +28 -0
- aramex/desktop.ini +4 -0
- aramex/shipping.wsdl +494 -0
- package.xml +18 -0
- wsdl/Tracking.wsdl +176 -0
app/code/community/Aramex/.DS_Store
ADDED
Binary file
|
app/code/community/Aramex/Core/.DS_Store
ADDED
Binary file
|
app/code/community/Aramex/Core/Aramex_Core.xml
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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
ADDED
@@ -0,0 +1,5 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
class Aramex_Core_Helper_Data
|
3 |
+
{
|
4 |
+
public function __(){}
|
5 |
+
}
|
app/code/community/Aramex/Core/Model/Settings.php
ADDED
File without changes
|
app/code/community/Aramex/Core/etc/config.xml
ADDED
@@ -0,0 +1,41 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 |
+
<models>
|
10 |
+
<aramex_core>
|
11 |
+
<class>Aramex_Core_Model</class>
|
12 |
+
</aramex_core>
|
13 |
+
</models>
|
14 |
+
<helpers>
|
15 |
+
<aramex_core>
|
16 |
+
<class>Aramex_Core_Helper</class>
|
17 |
+
</aramex_core>
|
18 |
+
</helpers>
|
19 |
+
</global>
|
20 |
+
<adminhtml>
|
21 |
+
<acl>
|
22 |
+
<resources>
|
23 |
+
<admin>
|
24 |
+
<children>
|
25 |
+
<system>
|
26 |
+
<children>
|
27 |
+
<config>
|
28 |
+
<children>
|
29 |
+
<aramexsettings module="aramex_core">
|
30 |
+
<title>aramex</title>
|
31 |
+
</aramexsettings>
|
32 |
+
</children>
|
33 |
+
</config>
|
34 |
+
</children>
|
35 |
+
</system>
|
36 |
+
</children>
|
37 |
+
</admin>
|
38 |
+
</resources>
|
39 |
+
</acl>
|
40 |
+
</adminhtml>
|
41 |
+
</config>
|
app/code/community/Aramex/Core/etc/system.xml
ADDED
@@ -0,0 +1,81 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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>Email</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 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>
|
79 |
+
</aramexsettings>
|
80 |
+
</sections>
|
81 |
+
</config>
|
app/code/community/Aramex/Core/etc/system.xml-15-Jan-2013
ADDED
@@ -0,0 +1,81 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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
ADDED
@@ -0,0 +1,82 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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
ADDED
Binary file
|
app/code/community/Aramex/Shipment/Aramex_Shipment.xml
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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
ADDED
@@ -0,0 +1,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 |
+
|
12 |
+
parent::__construct();
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex.php
ADDED
@@ -0,0 +1,329 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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
ADDED
@@ -0,0 +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 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Freemethod.php
ADDED
@@ -0,0 +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 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Method.php
ADDED
@@ -0,0 +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 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/Aramex/Source/Packaging.php
ADDED
@@ -0,0 +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 |
+
}
|
app/code/community/Aramex/Shipment/Model/Carrier/~$Aramex.php
ADDED
Binary file
|
app/code/community/Aramex/Shipment/controllers/.DS_Store
ADDED
Binary file
|
app/code/community/Aramex/Shipment/controllers/IndexController.php
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
<?php class Aramex_Shipment_IndexController extends Mage_Adminhtml_Controller_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } }?>
|
app/code/community/Aramex/Shipment/controllers/ShipmentController.php
ADDED
@@ -0,0 +1,455 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
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action
|
3 |
+
{
|
4 |
+
|
5 |
+
public function postAction()
|
6 |
+
{
|
7 |
+
|
8 |
+
//removing index.php from base url to include wsdl file
|
9 |
+
$baseUrl = str_replace("index.php/", "", Mage::getUrl());
|
10 |
+
|
11 |
+
//SOAP object
|
12 |
+
$soapClient = new SoapClient($baseUrl . 'aramex/shipping.wsdl');
|
13 |
+
|
14 |
+
|
15 |
+
$aramex_errors = false;
|
16 |
+
$post = $this->getRequest()->getPost();
|
17 |
+
|
18 |
+
$flag = true;
|
19 |
+
$error = "";
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
try {
|
24 |
+
if (empty($post)) {
|
25 |
+
Mage::throwException($this->__('Invalid form data.'));
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
/* here's your form processing */
|
32 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($post['aramex_shipment_original_reference']);
|
33 |
+
$payment = $order->getPayment();
|
34 |
+
|
35 |
+
$totalWeight = 0;
|
36 |
+
$totalItems = 0;
|
37 |
+
|
38 |
+
$items = $order->getAllItems();
|
39 |
+
|
40 |
+
$aramex_items_counter = 0;
|
41 |
+
foreach($post['aramex_items'] as $key => $value){
|
42 |
+
$aramex_items_counter++;
|
43 |
+
if($value != 0){
|
44 |
+
//itrating order items
|
45 |
+
foreach($items as $item){
|
46 |
+
if($item->getId() == $key){
|
47 |
+
//get weight
|
48 |
+
if($item->getWeight() != 0){
|
49 |
+
$weight = $item->getWeight()*$item->getQtyOrdered();
|
50 |
+
} else {
|
51 |
+
$weight = 0.5*$item->getQtyOrdered();
|
52 |
+
}
|
53 |
+
|
54 |
+
// collect items for aramex
|
55 |
+
$aramex_items[] = array(
|
56 |
+
'PackageType' => 'Box',
|
57 |
+
'Quantity' => $post[$item->getId()],
|
58 |
+
'Weight' => array(
|
59 |
+
'Value' => $weight,
|
60 |
+
'Unit' => 'Kg'
|
61 |
+
),
|
62 |
+
'Comments' => $item->getName(), //'',
|
63 |
+
'Reference' => ''
|
64 |
+
);
|
65 |
+
|
66 |
+
$totalWeight += $weight;
|
67 |
+
$totalItems += $post[$item->getId()];
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
$aramex_atachments=array();
|
74 |
+
//attachment
|
75 |
+
for($i=1;$i<=3;$i++){
|
76 |
+
$fileName = $_FILES['file'.$i]['name'];
|
77 |
+
if(isset($fileName)){
|
78 |
+
$fileName = explode('.', $fileName);
|
79 |
+
$fileName = $fileName[0]; //filename without extension
|
80 |
+
$fileData = file_get_contents($_FILES['file'.$i]['tmp_name']);
|
81 |
+
//$fileData = base64_encode($fileData); //base64binary encode
|
82 |
+
$ext = pathinfo($_FILES['file'.$i]['name'], PATHINFO_EXTENSION); //file extension
|
83 |
+
if($fileName&&$ext&&$fileData)
|
84 |
+
$aramex_atachments[] = array(
|
85 |
+
'FileName' => $fileName,
|
86 |
+
'FileExtension' => $ext,
|
87 |
+
'FileContents' => $fileData
|
88 |
+
);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
$totalWeight = $post['order_weight'];
|
97 |
+
//$totalItems += $post[$item->getId()];
|
98 |
+
|
99 |
+
$params = array();
|
100 |
+
|
101 |
+
//shipper parameters
|
102 |
+
$params['Shipper'] = array(
|
103 |
+
'Reference1' => $post['aramex_shipment_shipper_reference'], //'ref11111',
|
104 |
+
'Reference2' => '',
|
105 |
+
'AccountNumber' => ($post['aramex_shipment_info_billing_account'] == 1) ? $post['aramex_shipment_shipper_account'] : '', //'43871',
|
106 |
+
|
107 |
+
//Party Address
|
108 |
+
'PartyAddress' => array(
|
109 |
+
'Line1' => mysql_escape_string($post['aramex_shipment_shipper_street']), //'13 Mecca St',
|
110 |
+
'Line2' => '',
|
111 |
+
'Line3' => '',
|
112 |
+
'City' => $post['aramex_shipment_shipper_city'], //'Dubai',
|
113 |
+
'StateOrProvinceCode' => $post['aramex_shipment_shipper_state'], //'',
|
114 |
+
'PostCode' => $post['aramex_shipment_shipper_postal'],
|
115 |
+
'CountryCode' => $post['aramex_shipment_shipper_country'], //'AE'
|
116 |
+
),
|
117 |
+
|
118 |
+
//Contact Info
|
119 |
+
'Contact' => array(
|
120 |
+
'Department' => '',
|
121 |
+
'PersonName' => $post['aramex_shipment_shipper_name'], //'Suheir',
|
122 |
+
'Title' => '',
|
123 |
+
'CompanyName' => $post['aramex_shipment_shipper_company'], //'Aramex',
|
124 |
+
'PhoneNumber1' => $post['aramex_shipment_shipper_phone'], //'55555555',
|
125 |
+
'PhoneNumber1Ext' => '',
|
126 |
+
'PhoneNumber2' => '',
|
127 |
+
'PhoneNumber2Ext' => '',
|
128 |
+
'FaxNumber' => '',
|
129 |
+
'CellPhone' => $post['aramex_shipment_shipper_phone'],
|
130 |
+
'EmailAddress' => $post['aramex_shipment_shipper_email'], //'',
|
131 |
+
'Type' => ''
|
132 |
+
),
|
133 |
+
);
|
134 |
+
|
135 |
+
//consinee parameters
|
136 |
+
$params['Consignee'] = array(
|
137 |
+
'Reference1' => $post['aramex_shipment_receiver_reference'], //'',
|
138 |
+
'Reference2' => '',
|
139 |
+
'AccountNumber' => ($post['aramex_shipment_info_billing_account'] == 2) ? $post['aramex_shipment_shipper_account'] : '',
|
140 |
+
|
141 |
+
//Party Address
|
142 |
+
'PartyAddress' => array(
|
143 |
+
'Line1' => $post['aramex_shipment_receiver_street'], //'15 ABC St',
|
144 |
+
'Line2' => '',
|
145 |
+
'Line3' => '',
|
146 |
+
'City' => $post['aramex_shipment_receiver_city'], //'Amman',
|
147 |
+
'StateOrProvinceCode' => '',
|
148 |
+
'PostCode' => $post['aramex_shipment_receiver_postal'],
|
149 |
+
'CountryCode' => $post['aramex_shipment_receiver_country'], //'JO'
|
150 |
+
),
|
151 |
+
|
152 |
+
//Contact Info
|
153 |
+
'Contact' => array(
|
154 |
+
'Department' => '',
|
155 |
+
'PersonName' => $post['aramex_shipment_receiver_name'], //'Mazen',
|
156 |
+
'Title' => '',
|
157 |
+
'CompanyName' => $post['aramex_shipment_receiver_company'], //'Aramex',
|
158 |
+
'PhoneNumber1' => $post['aramex_shipment_receiver_phone'], //'6666666',
|
159 |
+
'PhoneNumber1Ext' => '',
|
160 |
+
'PhoneNumber2' => '',
|
161 |
+
'PhoneNumber2Ext' => '',
|
162 |
+
'FaxNumber' => '',
|
163 |
+
'CellPhone' => $post['aramex_shipment_receiver_phone'],
|
164 |
+
'EmailAddress' => $post['aramex_shipment_receiver_email'], //'mazen@aramex.com',
|
165 |
+
'Type' => ''
|
166 |
+
)
|
167 |
+
);
|
168 |
+
|
169 |
+
//new
|
170 |
+
|
171 |
+
if($post['aramex_shipment_info_billing_account'] == 3){
|
172 |
+
$params['ThirdParty'] = array(
|
173 |
+
'Reference1' => $post['aramex_shipment_shipper_reference'], //'ref11111',
|
174 |
+
'Reference2' => '',
|
175 |
+
'AccountNumber' => $post['aramex_shipment_shipper_account'], //'43871',
|
176 |
+
|
177 |
+
//Party Address
|
178 |
+
'PartyAddress' => array(
|
179 |
+
'Line1' => mysql_escape_string(Mage::getStoreConfig('aramexsettings/shipperdetail/address')), //'13 Mecca St',
|
180 |
+
'Line2' => '',
|
181 |
+
'Line3' => '',
|
182 |
+
'City' => Mage::getStoreConfig('aramexsettings/shipperdetail/city'), //'Dubai',
|
183 |
+
'StateOrProvinceCode' => Mage::getStoreConfig('aramexsettings/shipperdetail/state'), //'',
|
184 |
+
'PostCode' => Mage::getStoreConfig('aramexsettings/shipperdetail/postalcode'),
|
185 |
+
'CountryCode' => Mage::getStoreConfig('aramexsettings/shipperdetail/country'), //'AE'
|
186 |
+
),
|
187 |
+
|
188 |
+
//Contact Info
|
189 |
+
'Contact' => array(
|
190 |
+
'Department' => '',
|
191 |
+
'PersonName' => Mage::getStoreConfig('aramexsettings/shipperdetail/name'), //'Suheir',
|
192 |
+
'Title' => '',
|
193 |
+
'CompanyName' => Mage::getStoreConfig('aramexsettings/shipperdetail/company'), //'Aramex',
|
194 |
+
'PhoneNumber1' => Mage::getStoreConfig('aramexsettings/shipperdetail/phone'), //'55555555',
|
195 |
+
'PhoneNumber1Ext' => '',
|
196 |
+
'PhoneNumber2' => '',
|
197 |
+
'PhoneNumber2Ext' => '',
|
198 |
+
'FaxNumber' => '',
|
199 |
+
'CellPhone' => Mage::getStoreConfig('aramexsettings/shipperdetail/phone'),
|
200 |
+
'EmailAddress' => Mage::getStoreConfig('aramexsettings/shipperdetail/email'), //'',
|
201 |
+
'Type' => ''
|
202 |
+
),
|
203 |
+
);
|
204 |
+
|
205 |
+
}
|
206 |
+
|
207 |
+
|
208 |
+
|
209 |
+
// Other Main Shipment Parameters
|
210 |
+
|
211 |
+
$params['Reference1'] = $post['aramex_shipment_info_reference']; //'Shpt0001';
|
212 |
+
$params['Reference2'] = '';
|
213 |
+
$params['Reference3'] = '';
|
214 |
+
$params['ForeignHAWB'] = $post['aramex_shipment_info_foreignhawb'];
|
215 |
+
|
216 |
+
$params['TransportType'] = 0;
|
217 |
+
$params['ShippingDateTime'] = time(); //date('m/d/Y g:i:sA');
|
218 |
+
$params['DueDate'] = time() + (7 * 24 * 60 * 60); //date('m/d/Y g:i:sA');
|
219 |
+
$params['PickupLocation'] = 'Reception';
|
220 |
+
$params['PickupGUID'] = '';
|
221 |
+
/*if($post['aramex_shipment_shipper_country'] == $post['aramex_shipment_receiver_country']){
|
222 |
+
$cod_currency_value = $post['aramex_shipment_info_cod_value'];
|
223 |
+
$cod_currency = $order->getData('base_currency_code');
|
224 |
+
} else {
|
225 |
+
|
226 |
+
//TODO (dynamic base currency)
|
227 |
+
|
228 |
+
$cod_currency_value = round(Mage::helper('directory')->currencyConvert($post['aramex_shipment_info_cod_value'], 'INR', 'USD'), 2);
|
229 |
+
$cod_currency = 'USD';
|
230 |
+
}
|
231 |
+
|
232 |
+
if($payment->getData('method') == 'ig_cashondelivery'){
|
233 |
+
$payment_comment = 'Please collect COD amount '.$cod_currency_value.' '.$cod_currency;
|
234 |
+
} else {
|
235 |
+
$payment_comment = 'Paid online by credit card';
|
236 |
+
}
|
237 |
+
*/
|
238 |
+
$params['Comments'] = $post['aramex_shipment_info_comment'];
|
239 |
+
$params['AccountingInstrcutions'] = '';
|
240 |
+
$params['OperationsInstructions'] = '';
|
241 |
+
|
242 |
+
|
243 |
+
$params['Details'] = array(
|
244 |
+
'Dimensions' => array(
|
245 |
+
'Length' => '0',
|
246 |
+
'Width' => '0',
|
247 |
+
'Height' => '0',
|
248 |
+
'Unit' => 'cm'
|
249 |
+
),
|
250 |
+
|
251 |
+
'ActualWeight' => array(
|
252 |
+
'Value' => $totalWeight,
|
253 |
+
'Unit' => 'Kg'
|
254 |
+
),
|
255 |
+
|
256 |
+
'ProductGroup' => $post['aramex_shipment_info_product_group'], //'EXP',
|
257 |
+
'ProductType' => $post['aramex_shipment_info_product_type'], //,'PDX'
|
258 |
+
|
259 |
+
|
260 |
+
'PaymentType' => $post['aramex_shipment_info_payment_type'],
|
261 |
+
|
262 |
+
|
263 |
+
'PaymentOptions' => $post['aramex_shipment_info_payment_option'], //$post['aramex_shipment_info_payment_option']
|
264 |
+
|
265 |
+
|
266 |
+
'Services' => $post['aramex_shipment_info_service_type'],
|
267 |
+
|
268 |
+
'NumberOfPieces' => $totalItems,
|
269 |
+
'DescriptionOfGoods' => $post['aramex_shipment_description'],
|
270 |
+
'GoodsOriginCountry' => $post['aramex_shipment_shipper_country'], //'JO',
|
271 |
+
'Items' => $aramex_items,
|
272 |
+
);
|
273 |
+
if(count($aramex_atachments)){
|
274 |
+
$params['Attachments'] = $aramex_atachments;
|
275 |
+
}
|
276 |
+
//print_r($params);exit;
|
277 |
+
//if($payment->getData('method') == 'ig_cashondelivery'){
|
278 |
+
if($post['aramex_shipment_info_product_type'] == 'CDA'){
|
279 |
+
/*if($post['aramex_shipment_shipper_country'] == $post['aramex_shipment_receiver_country']){
|
280 |
+
$params['Details']['CashOnDeliveryAmount'] = array(
|
281 |
+
'Value' => $post['aramex_shipment_info_cod_amount'], //$payment->getData('amount_authorized'),
|
282 |
+
'CurrencyCode' => $order->getData('base_currency_code')
|
283 |
+
);
|
284 |
+
} else {
|
285 |
+
$aramex_amount = round(Mage::helper('directory')->currencyConvert($post['aramex_shipment_info_cod_amount'], $order->getData('base_currency_code'), 'USD'), 2);
|
286 |
+
if($aramex_amount > 500){
|
287 |
+
Mage::getSingleton('adminhtml/session')->addError('Aramex: shipment COD amount is over 500$');
|
288 |
+
} else {
|
289 |
+
$params['Details']['CashOnDeliveryAmount'] = array(
|
290 |
+
'Value' => round(Mage::helper('directory')->currencyConvert($post['aramex_shipment_info_cod_amount'], $order->getData('base_currency_code'), 'USD'), 2),
|
291 |
+
'CurrencyCode' => 'USD'
|
292 |
+
);
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
$params['Details']['CashOnDeliveryAmount'] = array(
|
298 |
+
'Value' => $post['aramex_shipment_info_cod_amount'], //$payment->getData('amount_authorized'),
|
299 |
+
'CurrencyCode' => $post['aramex_shipment_currency_code']
|
300 |
+
);
|
301 |
+
*/
|
302 |
+
|
303 |
+
}
|
304 |
+
|
305 |
+
$params['Details']['CashOnDeliveryAmount'] = array(
|
306 |
+
'Value' => $post['aramex_shipment_info_cod_amount'], //$payment->getData('amount_authorized'),
|
307 |
+
'CurrencyCode' => $post['aramex_shipment_currency_code']
|
308 |
+
);
|
309 |
+
|
310 |
+
$params['Details']['CustomsValueAmount'] = array(
|
311 |
+
'Value' => $post['aramex_shipment_info_custom_amount'], //$payment->getData('amount_authorized'),
|
312 |
+
'CurrencyCode' => $post['aramex_shipment_currency_code']
|
313 |
+
);
|
314 |
+
|
315 |
+
$major_par['Shipments'][] = $params;
|
316 |
+
|
317 |
+
$major_par['ClientInfo'] = array(
|
318 |
+
'AccountCountryCode' => Mage::getStoreConfig('aramexsettings/settings/account_country_code',Mage::app()->getStore()),
|
319 |
+
'AccountEntity' => Mage::getStoreConfig('aramexsettings/settings/account_entity',Mage::app()->getStore()),
|
320 |
+
'AccountNumber' => Mage::getStoreConfig('aramexsettings/settings/account_number',Mage::app()->getStore()),
|
321 |
+
'AccountPin' => Mage::getStoreConfig('aramexsettings/settings/account_pin',Mage::app()->getStore()),
|
322 |
+
'UserName' => Mage::getStoreConfig('aramexsettings/settings/user_name',Mage::app()->getStore()),
|
323 |
+
'Password' => Mage::getStoreConfig('aramexsettings/settings/password',Mage::app()->getStore()),
|
324 |
+
'Version' => '1.0'
|
325 |
+
);
|
326 |
+
|
327 |
+
$major_par['LabelInfo'] = array(
|
328 |
+
'ReportID' => 9729, //'9201',
|
329 |
+
'ReportType' => 'URL'
|
330 |
+
);
|
331 |
+
|
332 |
+
//print_r($major_par);exit;
|
333 |
+
|
334 |
+
//print_r($major_par);exit;
|
335 |
+
|
336 |
+
$_SESSION['form_data'] = $_POST;
|
337 |
+
|
338 |
+
//print_r($params['Attachment']);die;
|
339 |
+
|
340 |
+
|
341 |
+
|
342 |
+
try {
|
343 |
+
//create shipment call
|
344 |
+
$auth_call = $soapClient->CreateShipments($major_par);
|
345 |
+
|
346 |
+
|
347 |
+
|
348 |
+
if($auth_call->HasErrors){
|
349 |
+
if(empty($auth_call->Shipments)){
|
350 |
+
if(count($auth_call->Notifications->Notification) > 1){
|
351 |
+
foreach($auth_call->Notifications->Notification as $notify_error){
|
352 |
+
Mage::throwException($this->__('Aramex: ' . $notify_error->Code .' - '. $notify_error->Message));
|
353 |
+
}
|
354 |
+
} else {
|
355 |
+
Mage::throwException($this->__('Aramex: ' . $auth_call->Notifications->Notification->Code . ' - '. $auth_call->Notifications->Notification->Message));
|
356 |
+
}
|
357 |
+
} else {
|
358 |
+
if(count($auth_call->Shipments->ProcessedShipment->Notifications->Notification) > 1){
|
359 |
+
$notification_string = '';
|
360 |
+
foreach($auth_call->Shipments->ProcessedShipment->Notifications->Notification as $notification_error){
|
361 |
+
$notification_string .= $notification_error->Code .' - '. $notification_error->Message . ' <br />';
|
362 |
+
}
|
363 |
+
Mage::throwException($notification_string);
|
364 |
+
} else {
|
365 |
+
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));
|
366 |
+
}
|
367 |
+
}
|
368 |
+
} else {
|
369 |
+
if($order->canShip()) {
|
370 |
+
|
371 |
+
//Create shipment in magento
|
372 |
+
$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." - " .$auth_call->Shipments->ProcessedShipment->ShipmentLabel->LabelURL);
|
373 |
+
|
374 |
+
|
375 |
+
|
376 |
+
//Add tracking information
|
377 |
+
$ship = true;
|
378 |
+
|
379 |
+
//$ship = Mage::getModel('sales/order_shipment_api')->addTrack($shipmentid, 'aramex', 'Aramex', $auth_call->Shipments->ProcessedShipment->ID);
|
380 |
+
|
381 |
+
//sending mail
|
382 |
+
if($ship){
|
383 |
+
// if($post['aramex_email_customer'] == 'yes'){
|
384 |
+
|
385 |
+
|
386 |
+
$fromEmail = $post['aramex_shipment_shipper_email']; // sender email address
|
387 |
+
$fromName = $post['aramex_shipment_shipper_name']; // sender name
|
388 |
+
|
389 |
+
$toEmail = $post['aramex_shipment_receiver_email']; // recipient email address
|
390 |
+
$toName = $post['aramex_shipment_receiver_name']; // recipient name
|
391 |
+
|
392 |
+
$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
|
393 |
+
$subject = "Aramex Shipment"; // subject text
|
394 |
+
|
395 |
+
// $mail = new Zend_Mail();
|
396 |
+
//
|
397 |
+
// $mail->setBodyText($body);
|
398 |
+
//
|
399 |
+
// $mail->setFrom($fromEmail, $fromName);
|
400 |
+
//
|
401 |
+
// $mail->addTo($toEmail, $toName);
|
402 |
+
//
|
403 |
+
// $mail->setSubject($subject);
|
404 |
+
//
|
405 |
+
// try {
|
406 |
+
// $mail->send();
|
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 |
+
?>
|
app/code/community/Aramex/Shipment/etc/config.xml
ADDED
@@ -0,0 +1,112 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 |
+
</global>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<aramexshipment>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>Aramex_Shipment</module>
|
32 |
+
<frontName>aramexshipment</frontName>
|
33 |
+
</args>
|
34 |
+
</aramexshipment>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
|
38 |
+
<sales>
|
39 |
+
<shipping>
|
40 |
+
<carriers>
|
41 |
+
<aramex>
|
42 |
+
<class>Aramex_Shipment_Model_Carrier_Aramex</class>
|
43 |
+
</aramex>
|
44 |
+
</carriers>
|
45 |
+
</shipping>
|
46 |
+
</sales>
|
47 |
+
|
48 |
+
<default>
|
49 |
+
<carriers>
|
50 |
+
<!-- Use group alias -->
|
51 |
+
<aramex>
|
52 |
+
<active>1</active>
|
53 |
+
<sallowspecific>0</sallowspecific>
|
54 |
+
<!--model>shipping/carrier_aramex</model-->
|
55 |
+
<!--model>newmodule/carrier_newmodule</model-->
|
56 |
+
|
57 |
+
<model>Aramex_Shipping_Model_Carrier_Aramex</model>
|
58 |
+
<name>aramex</name>
|
59 |
+
<gateway_url>wsdl/Tracking.wsdl</gateway_url>
|
60 |
+
<price>10.00</price>
|
61 |
+
<title>aramex</title>
|
62 |
+
<specificerrmsg>
|
63 |
+
This shipping method is currently unavailable.If you would like to ship using this shipping method, please contact us.
|
64 |
+
</specificerrmsg>
|
65 |
+
<handling_type>F</handling_type>
|
66 |
+
</aramex>
|
67 |
+
</carriers>
|
68 |
+
</default>
|
69 |
+
|
70 |
+
<modules>
|
71 |
+
<!-- declare module's version information -->
|
72 |
+
<!-- Use module name_Shipping -->
|
73 |
+
<Aramex_Shipping>
|
74 |
+
<!-- this version number will be used for database upgrades -->
|
75 |
+
<version>0.6.0</version>
|
76 |
+
<!-- Use module name_Shipping -->
|
77 |
+
</Aramex_Shipping>
|
78 |
+
</modules>
|
79 |
+
|
80 |
+
<global>
|
81 |
+
<!-- declare model group for new module -->
|
82 |
+
<models>
|
83 |
+
<!-- model group alias to be used in Mage::getModel() -->
|
84 |
+
<!-- Use group alias -->
|
85 |
+
<aramex>
|
86 |
+
<!-- base class name for the model group -->
|
87 |
+
<!-- Use module name_Shipping_Model -->
|
88 |
+
<class>Aramex_Shipping_Model</class>
|
89 |
+
<!-- Use group alias -->
|
90 |
+
</aramex>
|
91 |
+
</models>
|
92 |
+
<!-- declare resource setup for new module -->
|
93 |
+
<resources>
|
94 |
+
<!-- resource identifier -->
|
95 |
+
<!-- Use group alias_setup -->
|
96 |
+
<aramex_setup>
|
97 |
+
<!-- specify that this resource is a setup resource and used for upgrades -->
|
98 |
+
<setup>
|
99 |
+
<!-- which module to look for install/upgrade files in -->
|
100 |
+
<!-- Use module name_Shipping_Model -->
|
101 |
+
<module>Aramex_Shipping</module>
|
102 |
+
</setup>
|
103 |
+
<!-- specify database connection for this resource -->
|
104 |
+
<connection>
|
105 |
+
<!-- do not create new connection, use predefined core setup connection -->
|
106 |
+
<use>core_setup</use>
|
107 |
+
</connection>
|
108 |
+
<!-- Use group alias_setup -->
|
109 |
+
</aramex_setup>
|
110 |
+
</resources>
|
111 |
+
</global>
|
112 |
+
</config>
|
app/code/community/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
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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/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
ADDED
@@ -0,0 +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 |
+
}
|
app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Freemethod.php
ADDED
@@ -0,0 +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 |
+
}
|
app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Method.php
ADDED
@@ -0,0 +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 |
+
}
|
app/code/community/Aramex/Shipping/Model/Carrier/Aramex/Source/Packaging.php
ADDED
@@ -0,0 +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 |
+
}
|
app/code/community/Aramex/Shipping/etc/config.xml
ADDED
@@ -0,0 +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>wsdl/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
ADDED
@@ -0,0 +1,374 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|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
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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/template/sales/order/view/tab/info.phtml
ADDED
@@ -0,0 +1,1273 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|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
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
?>
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
<?php $_order = $this->getOrder() ?>
|
32 |
+
<?php $shipping = $_order->getShippingAddress(); ?>
|
33 |
+
|
34 |
+
<?php $billing = $_order->getBillingAddress(); ?>
|
35 |
+
|
36 |
+
<?php
|
37 |
+
$customerId = $_order->getCustomerId();
|
38 |
+
$customer = Mage::getModel('customer/customer')->load($customerId);
|
39 |
+
?>
|
40 |
+
<?php
|
41 |
+
$countryCollection = Mage::getModel('directory/country_api')->items();
|
42 |
+
$payment = $_order->getPayment();
|
43 |
+
?>
|
44 |
+
<div>
|
45 |
+
<div id="order-messages">
|
46 |
+
<?php echo $this->getChildHtml('order_messages') ?>
|
47 |
+
</div>
|
48 |
+
<?php echo $this->getChildHtml('order_info') ?>
|
49 |
+
<input type="hidden" name="order_id" value="<?php echo $_order->getId() ?>"/>
|
50 |
+
<?php if ($_order->getIsVirtual()): ?>
|
51 |
+
<div class="box-right">
|
52 |
+
<?php else: ?>
|
53 |
+
<div class="box-left">
|
54 |
+
<?php endif; ?>
|
55 |
+
<!--Payment Method-->
|
56 |
+
<div class="entry-edit">
|
57 |
+
<div class="entry-edit-head">
|
58 |
+
<h4 class="icon-head head-payment-method"><?php echo Mage::helper('sales')->__('Payment Information') ?></h4>
|
59 |
+
</div>
|
60 |
+
<fieldset>
|
61 |
+
<?php echo $this->getPaymentHtml() ?>
|
62 |
+
<div><?php echo Mage::helper('sales')->__('Order was placed using %s', $_order->getOrderCurrencyCode()) ?></div>
|
63 |
+
</fieldset>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
67 |
+
<div class="box-right">
|
68 |
+
<!--Shipping Method-->
|
69 |
+
<div class="entry-edit">
|
70 |
+
<div class="entry-edit-head">
|
71 |
+
<h4 class="icon-head head-shipping-method"><?php echo Mage::helper('sales')->__('Shipping & Handling Information') ?></h4>
|
72 |
+
</div>
|
73 |
+
<fieldset>
|
74 |
+
<?php if ($_order->getTracksCollection()->count()) : ?>
|
75 |
+
<a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopupUrlBySalesModel($_order) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track order') ?>"><?php echo $this->__('Track order') ?></a>
|
76 |
+
<br/>
|
77 |
+
<?php endif; ?>
|
78 |
+
<?php if ($_order->getShippingDescription()): ?>
|
79 |
+
<strong><?php echo $_order->getShippingDescription() ?></strong>
|
80 |
+
|
81 |
+
<?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
|
82 |
+
<?php $_excl = $this->displayShippingPriceInclTax($_order); ?>
|
83 |
+
<?php else: ?>
|
84 |
+
<?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
|
85 |
+
<?php endif; ?>
|
86 |
+
<?php $_incl = $this->displayShippingPriceInclTax($_order); ?>
|
87 |
+
|
88 |
+
<?php echo $_excl; ?>
|
89 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
90 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
91 |
+
<?php endif; ?>
|
92 |
+
<?php else: ?>
|
93 |
+
<?php echo $this->helper('sales')->__('No shipping information available'); ?>
|
94 |
+
<?php endif; ?>
|
95 |
+
</fieldset>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
<?php endif; ?>
|
99 |
+
|
100 |
+
<?php
|
101 |
+
/**
|
102 |
+
* START ADDITIONAL HTML for Community-Extension Biebersdorf_CustomerOrderComment.
|
103 |
+
* (Show the Customer-Comment for the Order)
|
104 |
+
*/
|
105 |
+
?>
|
106 |
+
<div class="clear"></div>
|
107 |
+
<div class="entry-edit">
|
108 |
+
<div class="entry-edit-head">
|
109 |
+
<h4 class="icon-head head-shipping-method"><?php echo $this->helper('sales')->__('Customer Order CommentS') ?></h4>
|
110 |
+
</div>
|
111 |
+
<fieldset>
|
112 |
+
<?php echo nl2br($this->helper('sales')->htmlEscape($_order->getBiebersdorfCustomerordercomment())) ?>
|
113 |
+
</fieldset>
|
114 |
+
</div>
|
115 |
+
<?php
|
116 |
+
/**
|
117 |
+
* END ADDITIONAL HTML for Community-Extension Biebersdorf_CustomerOrderComment.
|
118 |
+
* (Show the Customer-Comment for the Order)
|
119 |
+
*/
|
120 |
+
?>
|
121 |
+
|
122 |
+
<div class="clear"></div>
|
123 |
+
|
124 |
+
<?php echo $this->getGiftmessageHtml() ?>
|
125 |
+
|
126 |
+
<div class="clear"></div>
|
127 |
+
<div class="entry-edit">
|
128 |
+
<div class="entry-edit-head">
|
129 |
+
<h4 class="icon-head head-products"><?php echo Mage::helper('sales')->__('Items Ordered') ?></h4>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
<?php echo $this->getItemsHtml() ?>
|
133 |
+
<div class="clear"></div>
|
134 |
+
|
135 |
+
<div class="box-left">
|
136 |
+
<div class="entry-edit">
|
137 |
+
<div class="entry-edit-head">
|
138 |
+
<h4><?php echo Mage::helper('sales')->__('Comments History') ?></h4>
|
139 |
+
</div>
|
140 |
+
<fieldset><?php echo $this->getChildHtml('order_history') ?></fieldset>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
<div class="box-right entry-edit">
|
144 |
+
<div class="entry-edit-head"><h4><?php echo Mage::helper('sales')->__('Order Totals') ?></h4></div>
|
145 |
+
<div class="order-totals"><?php echo $this->getChildHtml('order_totals') ?></div>
|
146 |
+
</div>
|
147 |
+
<div class="clear"></div>
|
148 |
+
</div>
|
149 |
+
|
150 |
+
<?php
|
151 |
+
/**
|
152 |
+
* ADDITIONAL HTML for Local-Extension Aramex_Shipment.
|
153 |
+
* (Load html for shipment creation)
|
154 |
+
* popup
|
155 |
+
*/
|
156 |
+
?>
|
157 |
+
|
158 |
+
<!-- css for aramex popup -->
|
159 |
+
|
160 |
+
<style>
|
161 |
+
#aramex_shipment_creation legend {
|
162 |
+
display: block;
|
163 |
+
font-weight: bold;
|
164 |
+
margin-left: 4px;
|
165 |
+
padding-left: 5px;
|
166 |
+
padding-right: 5px;
|
167 |
+
}
|
168 |
+
|
169 |
+
.aramex_shipment_creation_fieldset {
|
170 |
+
float: left;
|
171 |
+
margin-bottom: 10px;
|
172 |
+
margin-left: 4px;
|
173 |
+
margin-right: 2px;
|
174 |
+
min-height: 250px;
|
175 |
+
width: 310px;
|
176 |
+
}
|
177 |
+
|
178 |
+
#aramex_shipment_creation {
|
179 |
+
width: 700px;
|
180 |
+
font-family: verdana;
|
181 |
+
font-size: 12px;
|
182 |
+
margin: 0 auto;
|
183 |
+
z-index: 401;
|
184 |
+
display: none;
|
185 |
+
opacity: 1;
|
186 |
+
background: #fff;
|
187 |
+
padding: 15px;
|
188 |
+
margin-top: 10px;
|
189 |
+
}
|
190 |
+
|
191 |
+
#aramex_shipment_creation_header {
|
192 |
+
margin-bottom: 20px;
|
193 |
+
}
|
194 |
+
|
195 |
+
#aramex_shipment_creation_logo {
|
196 |
+
float: right;
|
197 |
+
}
|
198 |
+
|
199 |
+
#aramex_shipment_creation_title {
|
200 |
+
float: left;
|
201 |
+
margin-left: 15px;
|
202 |
+
margin-top: 15px;
|
203 |
+
}
|
204 |
+
|
205 |
+
.aramex_clearer {
|
206 |
+
clear: both;
|
207 |
+
}
|
208 |
+
|
209 |
+
.aramex_shipment_creation_part {
|
210 |
+
padding: 5px;
|
211 |
+
margin-bottom: 10px;
|
212 |
+
}
|
213 |
+
|
214 |
+
#aramex_shipment label {
|
215 |
+
display: block;
|
216 |
+
float: left;
|
217 |
+
font-size: 11px;
|
218 |
+
padding: 2px;
|
219 |
+
width: 90px;
|
220 |
+
}
|
221 |
+
|
222 |
+
#aramex_shipment_creation input, select{
|
223 |
+
padding: 2px;
|
224 |
+
display: block;
|
225 |
+
width: 190px;
|
226 |
+
}
|
227 |
+
|
228 |
+
#aramex_shipment .text_short {
|
229 |
+
clear: both;
|
230 |
+
margin-bottom: 5px;
|
231 |
+
min-height: 28px;
|
232 |
+
width: 300px;
|
233 |
+
}
|
234 |
+
|
235 |
+
#shipment_infromation .text_short {
|
236 |
+
min-height: 35px;
|
237 |
+
}
|
238 |
+
|
239 |
+
#aramex_shipment_creation .little_description {
|
240 |
+
font-size: 9px;
|
241 |
+
color: #555;
|
242 |
+
float: right;
|
243 |
+
padding-right: 20px;
|
244 |
+
margin-bottom: 5px;
|
245 |
+
margin-top: 3px;
|
246 |
+
}
|
247 |
+
|
248 |
+
#general_details {
|
249 |
+
margin-bottom: -10px;
|
250 |
+
}
|
251 |
+
|
252 |
+
.aramex_shipment_creation_fieldset_big {
|
253 |
+
margin-bottom: 10px;
|
254 |
+
}
|
255 |
+
|
256 |
+
#aramex_shipment_creation_general_info {
|
257 |
+
background: #FFFFCC;
|
258 |
+
}
|
259 |
+
|
260 |
+
#shipment_infromation, #shipment_infromation2 {
|
261 |
+
float: left;
|
262 |
+
}
|
263 |
+
|
264 |
+
#general_details .text_short, #general_details textarea {
|
265 |
+
width: 300px;
|
266 |
+
float: left;
|
267 |
+
color: #000;
|
268 |
+
}
|
269 |
+
|
270 |
+
#aramex_overlay {
|
271 |
+
z-index: 400;
|
272 |
+
position: absolute;
|
273 |
+
width: 100%;
|
274 |
+
height: 100%;
|
275 |
+
display: none;
|
276 |
+
top: 0;
|
277 |
+
left: 0;
|
278 |
+
}
|
279 |
+
|
280 |
+
#aramex_items_table {
|
281 |
+
text-align: left;
|
282 |
+
border-collapse: collapse;
|
283 |
+
}
|
284 |
+
|
285 |
+
#aramex_items_table th {
|
286 |
+
text-align: left;
|
287 |
+
background: #ccc;
|
288 |
+
}
|
289 |
+
|
290 |
+
#aramex_items_table td, #aramex_items_table th {
|
291 |
+
border: 0 none;
|
292 |
+
padding: 1px 15px 3px 3px;
|
293 |
+
};
|
294 |
+
|
295 |
+
#aramex_items_table .aramex_item_qty
|
296 |
+
{
|
297 |
+
width: 20px;
|
298 |
+
}
|
299 |
+
|
300 |
+
#aramex_items_table .aramex_item_name
|
301 |
+
{
|
302 |
+
width: 180px;
|
303 |
+
}
|
304 |
+
|
305 |
+
#aramex_items_table .aramex_item_options
|
306 |
+
{
|
307 |
+
width: 20px;
|
308 |
+
}
|
309 |
+
|
310 |
+
#aramex_items_table .aramex_item_tobe_shipped {
|
311 |
+
padding-top: 3px;
|
312 |
+
padding-bottom: 3px;
|
313 |
+
}
|
314 |
+
|
315 |
+
#aramex_shipment label.error {
|
316 |
+
display: inline-block;
|
317 |
+
float: none;
|
318 |
+
margin-left: 17px;
|
319 |
+
padding-left: 58px;
|
320 |
+
width: 200px;
|
321 |
+
}
|
322 |
+
|
323 |
+
#aramex_shipment a.error span,
|
324 |
+
#aramex_shipment .required,
|
325 |
+
#aramex_shipment .validation-advice {
|
326 |
+
color: #000000 !important;
|
327 |
+
font-weight: normal !important;
|
328 |
+
}
|
329 |
+
|
330 |
+
#aramex_shipment .error {
|
331 |
+
color: red !important;
|
332 |
+
}
|
333 |
+
|
334 |
+
#shipper_details textarea, #receiver_details textarea, #shipment_infromation textarea {
|
335 |
+
width: 190px;
|
336 |
+
}
|
337 |
+
|
338 |
+
#aramex_shipment_creation .aramex_input_items_qty {
|
339 |
+
width: 25px;
|
340 |
+
}
|
341 |
+
|
342 |
+
legend {
|
343 |
+
display: block !important;
|
344 |
+
height: 0;
|
345 |
+
line-height: 0;
|
346 |
+
margin: 0;
|
347 |
+
overflow: visible;
|
348 |
+
visibility: visible;
|
349 |
+
padding: 0;
|
350 |
+
width: auto;
|
351 |
+
}
|
352 |
+
|
353 |
+
</style>
|
354 |
+
<?php
|
355 |
+
|
356 |
+
//calculating total weight of current order
|
357 |
+
$totalWeight = 0;
|
358 |
+
|
359 |
+
$itemsv = $_order->getAllVisibleItems();
|
360 |
+
foreach($itemsv as $itemvv){
|
361 |
+
if($itemvv->getWeight() != 0){
|
362 |
+
$weight = $itemvv->getWeight()*$itemvv->getQtyOrdered();
|
363 |
+
} else {
|
364 |
+
$weight = 0.5*$itemvv->getQtyOrdered();
|
365 |
+
}
|
366 |
+
$totalWeight += $weight;
|
367 |
+
}
|
368 |
+
|
369 |
+
|
370 |
+
|
371 |
+
$state = "";
|
372 |
+
if(($shipping->getData('region_id')) && ($shipping->getCountry() == 'US')){
|
373 |
+
$region = Mage::getModel('directory/region')->load($shipping->getData('region_id'));
|
374 |
+
$state = $region->getName();
|
375 |
+
}
|
376 |
+
else{
|
377 |
+
$state = $shipping->getData('region');
|
378 |
+
}
|
379 |
+
|
380 |
+
$billing_state = "";
|
381 |
+
if($shipping->getData('region_id')){
|
382 |
+
$region = Mage::getModel('directory/region')->load($shipping->getData('region_id'));
|
383 |
+
$billing_state = $region->getName();
|
384 |
+
}
|
385 |
+
else{
|
386 |
+
$billing_state = $shipping->getData('region');
|
387 |
+
}
|
388 |
+
|
389 |
+
?>
|
390 |
+
|
391 |
+
<!-- aramex popup starts -->
|
392 |
+
|
393 |
+
<div id="aramex_overlay">
|
394 |
+
<div id="aramex_shipment_creation">
|
395 |
+
<form id="aramex_shipment" method="post" action="<?php echo $this->getUrl('aramexshipment/shipment/post'); ?>" enctype="multipart/form-data">
|
396 |
+
<input type="hidden" name="aramex_shipment_referer" value="<?php echo $this->getCurrentUrl(); ?>" />
|
397 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
398 |
+
<input name="aramex_shipment_shipper_account" type="hidden" value="<?php echo Mage::getStoreConfig('aramexsettings/settings/account_number'); ?>" />
|
399 |
+
<input name="aramex_shipment_original_reference" type="hidden" value="<?php echo $_order->getIncrementId() ?>" />
|
400 |
+
<FIELDSET class="aramex_shipment_creation_fieldset_big" id="aramex_shipment_creation_general_info">
|
401 |
+
<legend>Billing Account</legend>
|
402 |
+
<div id="general_details" class="aramex_shipment_creation_part">
|
403 |
+
<div class="text_short">
|
404 |
+
<label>Account</label><input type="text" name="aramex_shipment_shipper_account_show" disabled="disabled" value="<?php echo Mage::getStoreConfig('aramexsettings/settings/account_number'); ?>"/>
|
405 |
+
<div class="little_description">Taken from Aramex Global Settings</div>
|
406 |
+
<div class="aramex_clearer"></div>
|
407 |
+
</div>
|
408 |
+
<div id="aramex_shipment_creation_logo"><img src="https://nahel.com/skin/frontend/default/nahel_ccc/images/aramex-red-trans.png" /></div>
|
409 |
+
</div>
|
410 |
+
|
411 |
+
<div class="text_short">
|
412 |
+
<label>Payment</label>
|
413 |
+
<select class="aramex_all_options" name="aramex_shipment_info_billing_account" onchange="resetShipperDetail(this);">
|
414 |
+
|
415 |
+
<option value="1">Shipper Account</option>
|
416 |
+
<option value="2">Consignee Account</option>
|
417 |
+
<option value="3">Third Party</option>
|
418 |
+
|
419 |
+
</select>
|
420 |
+
<div id="aramex_shipment_info_service_type_div" style="display: none;"></div>
|
421 |
+
</div>
|
422 |
+
|
423 |
+
</FIELDSET>
|
424 |
+
<div id="aramex_messages"></div>
|
425 |
+
<FIELDSET class="aramex_shipment_creation_fieldset">
|
426 |
+
<legend>Shipper Details</legend>
|
427 |
+
<div id="shipper_details" class="aramex_shipment_creation_part">
|
428 |
+
<div class="text_short">
|
429 |
+
<label>Reference</label><input class="number" type="text" name="aramex_shipment_shipper_reference" value="<?php echo $_order->getIncrementId() ?>"/>
|
430 |
+
</div>
|
431 |
+
<div class="text_short">
|
432 |
+
<label>Name</label><input type="text" class="required" id="aramex_shipment_shipper_name" name="aramex_shipment_shipper_name" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/name'); ?>"/>
|
433 |
+
</div>
|
434 |
+
<div class="text_short">
|
435 |
+
<label>Email</label><input type="text" class="required email" id="aramex_shipment_shipper_email" name="aramex_shipment_shipper_email" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/email'); ?>"/>
|
436 |
+
</div>
|
437 |
+
<div class="text_short">
|
438 |
+
<?php $company_name = ($billing) ? $billing->getData('company') : '';?>
|
439 |
+
<label>Company</label><input type="text" id="aramex_shipment_shipper_company" name="aramex_shipment_shipper_company" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/company'); ?>"/>
|
440 |
+
</div>
|
441 |
+
<div class="text_short">
|
442 |
+
<label>Address</label><textarea rows="4" class="required" cols="26" type="text" id="aramex_shipment_shipper_street" name="aramex_shipment_shipper_street"><?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/address'); ?></textarea>
|
443 |
+
</div>
|
444 |
+
<div class="text_short">
|
445 |
+
<label>Country</label>
|
446 |
+
<select class="aramex_countries validate-select" id="aramex_shipment_shipper_country" name="aramex_shipment_shipper_country">
|
447 |
+
<?php
|
448 |
+
foreach($countryCollection as $country) {
|
449 |
+
?>
|
450 |
+
<option value="<?php echo $country['country_id'] ?>" <?php if(Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo (Mage::getStoreConfig('aramexsettings/shipperdetail/country') == $country['country_id']) ? 'selected="selected"' : ''; }?> ><?php echo $country['name'] ?></option>
|
451 |
+
<?php
|
452 |
+
}
|
453 |
+
?>
|
454 |
+
</select>
|
455 |
+
</div>
|
456 |
+
|
457 |
+
|
458 |
+
|
459 |
+
<div class="text_short">
|
460 |
+
<label>City</label><input class="" type="text" id="aramex_shipment_shipper_city" name="aramex_shipment_shipper_city" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/city'); ?>"/>
|
461 |
+
</div>
|
462 |
+
<div class="text_short">
|
463 |
+
<label>Postal Code</label><input class="" type="text" id="aramex_shipment_shipper_postal" name="aramex_shipment_shipper_postal" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/postalcode'); ?>"/>
|
464 |
+
</div>
|
465 |
+
<div class="text_short">
|
466 |
+
<label>State</label><input type="text" id="aramex_shipment_shipper_state" name="aramex_shipment_shipper_state" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/state'); ?>" />
|
467 |
+
</div>
|
468 |
+
<div class="text_short">
|
469 |
+
<label>Phone</label><input class="required" type="text" id="aramex_shipment_shipper_phone" name="aramex_shipment_shipper_phone" value="<?php echo Mage::getStoreConfig('aramexsettings/shipperdetail/phone'); ?>" />
|
470 |
+
</div>
|
471 |
+
</div>
|
472 |
+
</FIELDSET>
|
473 |
+
<FIELDSET class="aramex_shipment_creation_fieldset">
|
474 |
+
<legend>Receiver Details</legend>
|
475 |
+
<div id="receiver_details" class="aramex_shipment_creation_part">
|
476 |
+
<div class="text_short">
|
477 |
+
<label>Reference</label><input class="number" type="text" id="aramex_shipment_receiver_reference" name="aramex_shipment_receiver_reference" value="<?php echo $_order->getIncrementId() ?>"/>
|
478 |
+
</div>
|
479 |
+
<div class="text_short">
|
480 |
+
<label>Name</label><input class="required" type="text" id="aramex_shipment_receiver_name" name="aramex_shipment_receiver_name" value="<?php echo ($shipping) ? $shipping->getName() : ''; ?>"/>
|
481 |
+
</div>
|
482 |
+
<div class="text_short">
|
483 |
+
<label>Email</label><input class="email required" type="text" id="aramex_shipment_receiver_email" name="aramex_shipment_receiver_email" value="<?php if($customer->getEmail()){ echo $customer->getEmail(); }else{ echo $_order->getData('customer_email'); } ?>"/>
|
484 |
+
</div>
|
485 |
+
<div class="text_short">
|
486 |
+
<?php $company_name = ($shipping) ? $shipping->getData('company') : '';?>
|
487 |
+
<label>Company</label><input type="text" id="aramex_shipment_receiver_company" name="aramex_shipment_receiver_company" value="<?php if(!empty($company_name)) { echo $company_name; } else { echo ($shipping) ? $shipping->getName() : '';} ?>"/>
|
488 |
+
</div>
|
489 |
+
<div class="text_short">
|
490 |
+
<label>Address</label><textarea class="required" rows="4" cols="26" type="text" id="aramex_shipment_receiver_street" name="aramex_shipment_receiver_street"><?php echo ($shipping) ? $shipping->getData('street') : ''; ?></textarea>
|
491 |
+
</div>
|
492 |
+
<div class="text_short">
|
493 |
+
<label>Country</label>
|
494 |
+
<select class="aramex_countries" id="aramex_shipment_receiver_country" name="aramex_shipment_receiver_country" value="<?php echo ($shipping) ? $shipping->getData('country') : ''; ?>">
|
495 |
+
<?php
|
496 |
+
foreach($countryCollection as $country) {
|
497 |
+
?>
|
498 |
+
<option value="<?php echo $country['country_id'] ?>" <?php if($shipping){ echo ($shipping->getCountry() == $country['country_id']) ? 'selected="selected"' : ''; }?> ><?php echo $country['name'] ?></option>
|
499 |
+
<?php
|
500 |
+
}
|
501 |
+
?>
|
502 |
+
</select>
|
503 |
+
</div>
|
504 |
+
<div class="text_short">
|
505 |
+
<label>City</label><input class="" type="text" id="aramex_shipment_receiver_city" name="aramex_shipment_receiver_city" value="<?php echo ($shipping) ? $shipping->getData('city') : ''; ?>" />
|
506 |
+
</div>
|
507 |
+
<div class="text_short">
|
508 |
+
<label>Postal Code</label><input type="text" class="" id="aramex_shipment_receiver_postal" name="aramex_shipment_receiver_postal" value="<?php echo ($shipping) ? $shipping->getData('postcode') : ''; ?>" />
|
509 |
+
</div>
|
510 |
+
<div class="text_short">
|
511 |
+
<label>State</label><input type="text" id="aramex_shipment_receiver_state" name="aramex_shipment_receiver_state" value="<?php echo ($shipping) ? $state : ''; ?>" />
|
512 |
+
</div>
|
513 |
+
<div class="text_short">
|
514 |
+
<label>Phone</label><input class="required" type="text" id="aramex_shipment_receiver_phone" name="aramex_shipment_receiver_phone" value="<?php echo ($shipping) ? $shipping->getData('telephone') : ''; ?>"/>
|
515 |
+
</div>
|
516 |
+
</div>
|
517 |
+
</FIELDSET>
|
518 |
+
<div class="aramex_clearer"></div>
|
519 |
+
<FIELDSET class="aramex_shipment_creation_fieldset_big">
|
520 |
+
<legend>Shipment Information</legend>
|
521 |
+
<div id="shipment_infromation" class="aramex_shipment_creation_part">
|
522 |
+
<div class="text_short">Total weight: <span id="order-total-weight"><?php echo number_format($totalWeight, 2); ?></span> KG</div>
|
523 |
+
|
524 |
+
<input type="hidden" name="order_weight" value="<?php echo $totalWeight; ?>" />
|
525 |
+
|
526 |
+
<div class="text_short">
|
527 |
+
<label>Reference</label><input type="text" id="aramex_shipment_info_reference" name="aramex_shipment_info_reference" value="<?php echo $_order->getIncrementId() ?>"/>
|
528 |
+
</div>
|
529 |
+
<div class="text_short">
|
530 |
+
<label>Product Group</label>
|
531 |
+
<select class="aramex_all_options" id="aramex_shipment_info_product_group" name="aramex_shipment_info_product_group" >
|
532 |
+
|
533 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="DOM">Domestic</option>
|
534 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="EXP">International Express</option>
|
535 |
+
|
536 |
+
</select>
|
537 |
+
<div id="aramex_shipment_info_product_group_div" style="display: none;"></div>
|
538 |
+
</div>
|
539 |
+
<div class="text_short">
|
540 |
+
<label>Service Type</label>
|
541 |
+
<select class="aramex_all_options" id="aramex_shipment_info_product_type" name="aramex_shipment_info_product_type">
|
542 |
+
|
543 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="ONP" id="ONP" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Overnight Parcel</option>
|
544 |
+
<option value="OND" id="OND" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Overnight Document</option>
|
545 |
+
<option value="CDA" id="CDA" style="<?php if($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>">Cash on Delivery</option>
|
546 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="PDX" id="PDX" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Document Express</option>
|
547 |
+
<option value="PPX" id="PPX" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Parcel Express</option>
|
548 |
+
<option value="PLX" id="PLX" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Priority Letter Express</option>
|
549 |
+
<option value="DDX" id="DDX" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Deferred Document Express</option>
|
550 |
+
<option value="DPX" id="DPX" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Deferred Parcel Express</option>
|
551 |
+
<option value="GDX" id="GDX" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Ground Document Express</option>
|
552 |
+
<option value="GPX" id="GPX" style="<?php if($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')){ echo 'display: none'; } ?>" >Ground Parcel Express</option>
|
553 |
+
|
554 |
+
</select>
|
555 |
+
|
556 |
+
|
557 |
+
|
558 |
+
<div id="aramex_shipment_info_service_type_div" style="display: none;"></div>
|
559 |
+
</div>
|
560 |
+
|
561 |
+
|
562 |
+
<div class="text_short">
|
563 |
+
<label>Additional Services</label>
|
564 |
+
|
565 |
+
<?php /* ?>
|
566 |
+
<input class="" type="text" id="aramex_shipment_info_service_type" name="aramex_shipment_info_service_type" value="CODS"/>
|
567 |
+
<?php */ ?>
|
568 |
+
|
569 |
+
<select class="aramex_all_options" id="aramex_shipment_info_service_type" name="aramex_shipment_info_service_type">
|
570 |
+
|
571 |
+
<option value=""></option>
|
572 |
+
<option value="CODS" <?php if($_order->getPayment()->getMethodInstance()->getCode() == 'ccsave'){ echo 'selected="selected"'; } ?>>Cash on Delivery</option>
|
573 |
+
<option value="FIRST">First Delivery</option>
|
574 |
+
<option value="FRDOM">Free Domicile</option>
|
575 |
+
<option value="HFPU">Hold for pick up</option>
|
576 |
+
<option value="NOON">Noon Delivery</option>
|
577 |
+
<option value="SIG">Signature Required</option>
|
578 |
+
|
579 |
+
</select>
|
580 |
+
|
581 |
+
</div>
|
582 |
+
|
583 |
+
<div class="text_short">
|
584 |
+
<label>Payment Type</label>
|
585 |
+
<select class="aramex_all_options" id="aramex_shipment_info_payment_type" name="aramex_shipment_info_payment_type">
|
586 |
+
|
587 |
+
<option value="P">Prepaid</option>
|
588 |
+
<option value="C">Collect</option>
|
589 |
+
<option value="3">Third Party</option>
|
590 |
+
|
591 |
+
</select>
|
592 |
+
<div id="aramex_shipment_info_service_type_div" style="display: none;"></div>
|
593 |
+
</div>
|
594 |
+
|
595 |
+
<?php ?>
|
596 |
+
<div class="text_short">
|
597 |
+
<label>Payment Option</label>
|
598 |
+
|
599 |
+
<?php /* ?>
|
600 |
+
<input class="" type="text" id="aramex_shipment_info_payment_option" name="aramex_shipment_info_payment_option" value=""/>
|
601 |
+
<?php */ ?>
|
602 |
+
|
603 |
+
<select class="" id="aramex_shipment_info_payment_option" name="aramex_shipment_info_payment_option">
|
604 |
+
|
605 |
+
<option value=""></option>
|
606 |
+
<option id="ASCC" value="ASCC" style="display: none;">Needs Shipper Account Number to be filled</option>
|
607 |
+
<option id="ARCC" value="ARCC" style="display: none;">Needs Consignee Account Number to be filled</option>
|
608 |
+
|
609 |
+
<option id="CASH" value="CASH">Cash</option>
|
610 |
+
<option id="ACCT" value="ACCT">Account</option>
|
611 |
+
<option id="PPST" value="PPST">Prepaid Stock</option>
|
612 |
+
<option id="CRDT" value="CRDT">Credit</option>
|
613 |
+
|
614 |
+
</select>
|
615 |
+
|
616 |
+
</div>
|
617 |
+
<?php ?>
|
618 |
+
|
619 |
+
|
620 |
+
|
621 |
+
<div class="text_short">
|
622 |
+
<label>COD Amount</label><input class="" type="text" id="aramex_shipment_info_cod_amount" name="aramex_shipment_info_cod_amount" value="<?php if($_order->getPayment()->getMethodInstance()->getCode() != 'ccsave'){ echo round($_order->getData('grand_total'), 2); } ?>"/>
|
623 |
+
</div>
|
624 |
+
|
625 |
+
<div class="text_short">
|
626 |
+
<label>Custom Amount</label><input class="" type="text" id="aramex_shipment_info_custom_amount" name="aramex_shipment_info_custom_amount" value=""/>
|
627 |
+
</div>
|
628 |
+
|
629 |
+
<div class="text_short">
|
630 |
+
<label>Currency</label><input type="text" class="" id="aramex_shipment_currency_code" name="aramex_shipment_currency_code" value=""/>
|
631 |
+
</div>
|
632 |
+
|
633 |
+
<div class="text_short">
|
634 |
+
<!--<label>Comment</label><input class="" type="text" id="aramex_shipment_info_comment" name="aramex_shipment_info_comment" value=""/>-->
|
635 |
+
<label>Comment</label><textarea class="required" 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 $_SESSION['form_data']['aramex_shipment_info_comment'] ?></textarea>
|
636 |
+
</div>
|
637 |
+
|
638 |
+
<div class="text_short">
|
639 |
+
<label>Foreign Shipment No</label><input class="" type="text" id="aramex_shipment_info_foreignhawb" name="aramex_shipment_info_foreignhawb" value=""/>
|
640 |
+
</div>
|
641 |
+
<?php ?>
|
642 |
+
<div class="text_short">
|
643 |
+
<label for="file1">Filename 1:</label>
|
644 |
+
<div id="file1_div" style="float: left;width: 145px;">
|
645 |
+
<input type="file" name="file1" id="file1" size="7">
|
646 |
+
</div>
|
647 |
+
<div style="float: right;">
|
648 |
+
<input type="button" name="filereset" id="filereset" value="Reset" style="width: 60px;height: 24px;"/>
|
649 |
+
</div>
|
650 |
+
</div>
|
651 |
+
<div class="text_short">
|
652 |
+
<label for="file2">Filename 2:</label>
|
653 |
+
<div id="file2_div" style="float: left;width: 145px;">
|
654 |
+
<input type="file" name="file2" id="file2" size="7">
|
655 |
+
</div>
|
656 |
+
<div style="float: right;">
|
657 |
+
<input type="button" name="file2reset" id="file2reset" value="Reset" style="width: 60px;height: 24px;"/>
|
658 |
+
</div>
|
659 |
+
</div>
|
660 |
+
<div class="text_short">
|
661 |
+
<label for="file">Filename 3:</label>
|
662 |
+
<div id="file3_div" style="float: left;width: 145px;">
|
663 |
+
<input type="file" name="file3" id="file3" size="7">
|
664 |
+
</div>
|
665 |
+
<div style="float: right;">
|
666 |
+
<input type="button" name="file3reset" id="file3reset" value="Reset" style="width: 60px;height: 24px;"/>
|
667 |
+
</div>
|
668 |
+
</div>
|
669 |
+
<?php ?>
|
670 |
+
|
671 |
+
|
672 |
+
|
673 |
+
|
674 |
+
<?php /*if($payment->getData('method') == 'ig_cashondelivery'){ ?>
|
675 |
+
<div class="text_short">
|
676 |
+
<label>Additional Services</label>
|
677 |
+
<select class="aramex_all_options" name="aramex_shipment_info_additional_services" multiple="multiple" style="display: none;">
|
678 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() == Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="CODS" class="domestic_service">Cash on Delivery</option>
|
679 |
+
<option <?php if($shipping) {echo ($shipping->getCountry() != Mage::getStoreConfig('aramexsettings/shipperdetail/country')) ? 'selected="selected"' : '';} ?> value="CODS" class="express_service">Cash on Delivery Service</option>
|
680 |
+
</select>
|
681 |
+
<div id="aramex_shipment_info_additional_services_div"></div>
|
682 |
+
</div>
|
683 |
+
<?php }*/ ?>
|
684 |
+
<div class="text_short">
|
685 |
+
<label>Description</label><textarea rows="4" cols="31" type="text" id="aramex_shipment_description" name="aramex_shipment_description" style="display: none;"><?php
|
686 |
+
$itemsnamecounter = 1;
|
687 |
+
foreach($_order->getAllVisibleItems() as $itemname){
|
688 |
+
if($itemname->getQtyOrdered() > $itemname->getQtyShipped()){
|
689 |
+
echo $itemname->getId().' - '. trim($itemname->getName());
|
690 |
+
}
|
691 |
+
$itemsnamecounter++;
|
692 |
+
$supplier_different = false;
|
693 |
+
$atleast_item_shipped = false;
|
694 |
+
if(!$item_supplier_id){
|
695 |
+
$item_supplier_id = $itemname->getUdropshipVendor();
|
696 |
+
} else {
|
697 |
+
if($item_supplier_id != $itemname->getUdropshipVendor()){
|
698 |
+
if(!$supplier_different){
|
699 |
+
$supplier_different = true;
|
700 |
+
}
|
701 |
+
}
|
702 |
+
}
|
703 |
+
|
704 |
+
if($itemname->getQtyOrdered() == $itemname->getQtyShipped()){
|
705 |
+
if(!$atleast_item_shipped){
|
706 |
+
$atleast_item_shipped = true;
|
707 |
+
}
|
708 |
+
}
|
709 |
+
}
|
710 |
+
|
711 |
+
unset($_SESSION['form_data']);
|
712 |
+
|
713 |
+
?>
|
714 |
+
</textarea>
|
715 |
+
<div id="aramex_shipment_description_div" style=" float: left;
|
716 |
+
font-size: 11px;
|
717 |
+
margin-bottom: 5px;
|
718 |
+
margin-top: 2px;
|
719 |
+
width: 202px;">
|
720 |
+
<?php
|
721 |
+
$itemsnamecounter1 = 1;
|
722 |
+
foreach($_order->getAllVisibleItems() as $itemname1){
|
723 |
+
//echo $itemsnamecounter1;
|
724 |
+
if($itemname1->getQtyOrdered() > $itemname1->getQtyShipped()){
|
725 |
+
echo '<p id="'.$itemname1->getId().'">' . trim($itemname1->getName()) . '</p>';
|
726 |
+
}
|
727 |
+
$itemsnamecounter1++;
|
728 |
+
}
|
729 |
+
?>
|
730 |
+
</div>
|
731 |
+
</div>
|
732 |
+
<div class="text_short">
|
733 |
+
<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>
|
734 |
+
</div>
|
735 |
+
<?php if($payment->getData('method') == 'ig_cashondelivery'){ ?>
|
736 |
+
<?php if($supplier_different){ ?>
|
737 |
+
<div class="text_short">
|
738 |
+
<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>
|
739 |
+
</div>
|
740 |
+
<?php
|
741 |
+
} else {
|
742 |
+
if($atleast_item_shipped){
|
743 |
+
?>
|
744 |
+
<div class="text_short">
|
745 |
+
<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>
|
746 |
+
</div>
|
747 |
+
<?php
|
748 |
+
} else {
|
749 |
+
?>
|
750 |
+
<div class="text_short">
|
751 |
+
<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>
|
752 |
+
</div>
|
753 |
+
<?php
|
754 |
+
}
|
755 |
+
}
|
756 |
+
?>
|
757 |
+
<div class="text_short">
|
758 |
+
<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>
|
759 |
+
</div>
|
760 |
+
<?php } ?>
|
761 |
+
</div>
|
762 |
+
<div id="shipment_infromation2" class="aramex_shipment_creation_part">
|
763 |
+
<div class="text_short" id="aramex_shipment_info_items">
|
764 |
+
<div >
|
765 |
+
<?php
|
766 |
+
$itemscount = 0;
|
767 |
+
$totalWeight = 0;
|
768 |
+
|
769 |
+
$itemsv = $_order->getAllVisibleItems();
|
770 |
+
foreach($itemsv as $itemvv){
|
771 |
+
if($itemvv->getQtyOrdered() > $itemvv->getQtyShipped()){
|
772 |
+
$itemscount += $itemvv->getQtyOrdered() - $itemvv->getQtyShipped();
|
773 |
+
}
|
774 |
+
|
775 |
+
if($itemvv->getWeight() != 0){
|
776 |
+
$weight = $itemvv->getWeight()*$itemvv->getQtyOrdered();
|
777 |
+
} else {
|
778 |
+
$weight = 0.5*$itemvv->getQtyOrdered();
|
779 |
+
}
|
780 |
+
|
781 |
+
$totalWeight += $weight;
|
782 |
+
}
|
783 |
+
|
784 |
+
if($itemscount != 0){
|
785 |
+
?>
|
786 |
+
<div style="margin-bottom: -15px;">Items not shipped yet</div>
|
787 |
+
<br />
|
788 |
+
<table id="aramex_items_table">
|
789 |
+
<tr>
|
790 |
+
<th class="aramex_item_options">Action</th>
|
791 |
+
<th class="aramex_item_name">Name</th>
|
792 |
+
<th class="aramex_item_qty">Qty</th>
|
793 |
+
</tr>
|
794 |
+
<?php
|
795 |
+
foreach($itemsv as $item){
|
796 |
+
if($item->getQtyOrdered() > $item->getQtyShipped()){
|
797 |
+
?>
|
798 |
+
<tr id="item<?php echo $item->getId(); ?>" class="aramex_item_tobe_shipped">
|
799 |
+
<td class="aramex_item_options">
|
800 |
+
<a href="javascript:aramexhide('<?php echo $item->getId(); ?>', '<?php echo $item->getBasePrice() * $item->getQtyOrdered(); ?>', '<?php echo ($item->getWeight() * $item->getQtyOrdered()) ?>');">Remove</a>
|
801 |
+
</td>
|
802 |
+
<td class="aramex_item_name">
|
803 |
+
<span title="<?php echo $item->getName(); ?>"><?php echo substr($item->getName(), 0, 21); ?> ...</span>
|
804 |
+
<input type="hidden" id="aramex_items_<?php echo $item->getId(); ?>" name="aramex_items[<?php echo $item->getId(); ?>]" value="<?php echo abs($item->getQtyOrdered() - $item->getQtyShipped()); ?>" />
|
805 |
+
|
806 |
+
<?php /* ?>
|
807 |
+
|
808 |
+
<input type="hidden" class="aramex_item_base_price" id="aramex_items_base_price_<?php echo $item->getId(); ?>" name="aramex_items[<?php echo $item->getId(); ?>]" value="<?php echo $item->getBasePrice(); ?>" />
|
809 |
+
|
810 |
+
<?php */ ?>
|
811 |
+
|
812 |
+
</td>
|
813 |
+
<td class="aramex_item_qty">
|
814 |
+
<input class="aramex_input_items_qty" type="text" name="<?php echo $item->getId(); ?>" value="<?php echo abs($item->getQtyOrdered() - $item->getQtyShipped()); ?>" />
|
815 |
+
|
816 |
+
<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() ?>" />
|
817 |
+
<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() ?>" />
|
818 |
+
<input type="hidden" id="aramex_items_total_<?php echo $item->getId(); ?>" name="aramex_items_total_<?php echo $item->getId(); ?>" value="<?php echo abs($item->getQtyOrdered() - $item->getQtyShipped()); ?>" />
|
819 |
+
|
820 |
+
</td>
|
821 |
+
</tr>
|
822 |
+
<?php
|
823 |
+
}
|
824 |
+
}
|
825 |
+
?>
|
826 |
+
<tr>
|
827 |
+
<td colspan="2" style="font-weight: bold;background: none repeat scroll 0% 0% rgb(224, 224, 224);">Number of items to be shipped:</td>
|
828 |
+
<td>
|
829 |
+
<span id="items_tobe_shipped_number">
|
830 |
+
<?php echo $itemscount; ?>
|
831 |
+
</span>
|
832 |
+
</td>
|
833 |
+
</tr>
|
834 |
+
</table>
|
835 |
+
<?php } else { ?>
|
836 |
+
<div style="color: green; width: 200px; margin: 0pt auto;">All items have been shipped</div>
|
837 |
+
<?php } ?>
|
838 |
+
</div>
|
839 |
+
</div>
|
840 |
+
</div>
|
841 |
+
<div class="aramex_clearer"></div>
|
842 |
+
</FIELDSET>
|
843 |
+
<div class="aramex_clearer"></div>
|
844 |
+
|
845 |
+
<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>
|
846 |
+
<div class="aramex_clearer"></div>
|
847 |
+
<div style="float: right;margin-bottom: 20px;margin-top: -11px;">
|
848 |
+
<button id="aramex_shipment_creation_submit_id" type="submit" name="aramex_shipment_creation_submit" <?php echo ($itemscount == 0) ? 'disabled="disabled"' : ''; ?>>Create Shipment</button>
|
849 |
+
<button onclick="aramexclose()" type="button">Close</button>
|
850 |
+
</div>
|
851 |
+
</form>
|
852 |
+
</div>
|
853 |
+
</div>
|
854 |
+
|
855 |
+
<!-- aramex popup ends -->
|
856 |
+
|
857 |
+
<!--
|
858 |
+
<script type="text/javascript" src="https://nahel.com/skin/frontend/default/nahel_ccc/js/jquery.js"></script>
|
859 |
+
<script type="text/javascript" src="https://nahel.com/skin/frontend/default/nahel_ccc/js/jquery.validate.min.js"></script>
|
860 |
+
-->
|
861 |
+
|
862 |
+
|
863 |
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
864 |
+
|
865 |
+
<!--
|
866 |
+
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
|
867 |
+
-->
|
868 |
+
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
|
869 |
+
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
|
870 |
+
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js"></script>
|
871 |
+
|
872 |
+
<script>
|
873 |
+
var jccc = jQuery.noConflict();
|
874 |
+
|
875 |
+
var aramex_shipment_shipper_name = document.getElementById('aramex_shipment_shipper_name').value;
|
876 |
+
var aramex_shipment_shipper_email = document.getElementById('aramex_shipment_shipper_email').value;
|
877 |
+
var aramex_shipment_shipper_company = document.getElementById('aramex_shipment_shipper_company').value;
|
878 |
+
var aramex_shipment_shipper_street = document.getElementById('aramex_shipment_shipper_street').value;
|
879 |
+
var aramex_shipment_shipper_country = document.getElementById('aramex_shipment_shipper_country').value;
|
880 |
+
var aramex_shipment_shipper_city = document.getElementById('aramex_shipment_shipper_city').value;
|
881 |
+
var aramex_shipment_shipper_postal = document.getElementById('aramex_shipment_shipper_postal').value;
|
882 |
+
var aramex_shipment_shipper_state = document.getElementById('aramex_shipment_shipper_state').value;
|
883 |
+
var aramex_shipment_shipper_phone = document.getElementById('aramex_shipment_shipper_phone').value;
|
884 |
+
|
885 |
+
var aramex_shipment_receiver_name = document.getElementById('aramex_shipment_receiver_name').value;
|
886 |
+
var aramex_shipment_receiver_email = document.getElementById('aramex_shipment_receiver_email').value;
|
887 |
+
var aramex_shipment_receiver_company = document.getElementById('aramex_shipment_receiver_company').value;
|
888 |
+
var aramex_shipment_receiver_street = document.getElementById('aramex_shipment_receiver_street').value;
|
889 |
+
var aramex_shipment_receiver_country = document.getElementById('aramex_shipment_receiver_country').value;
|
890 |
+
var aramex_shipment_receiver_city = document.getElementById('aramex_shipment_receiver_city').value;
|
891 |
+
var aramex_shipment_receiver_postal = document.getElementById('aramex_shipment_receiver_postal').value;
|
892 |
+
var aramex_shipment_receiver_state = document.getElementById('aramex_shipment_receiver_state').value;
|
893 |
+
var aramex_shipment_receiver_phone = document.getElementById('aramex_shipment_receiver_phone').value;
|
894 |
+
|
895 |
+
function resetShipperDetail(el){
|
896 |
+
//alert(el.value);
|
897 |
+
var elValue = el.value;
|
898 |
+
var flag = 0;
|
899 |
+
|
900 |
+
|
901 |
+
if(elValue == 2){
|
902 |
+
document.getElementById('aramex_shipment_shipper_name').value = aramex_shipment_receiver_name;
|
903 |
+
document.getElementById('aramex_shipment_shipper_email').value = aramex_shipment_receiver_email;
|
904 |
+
document.getElementById('aramex_shipment_shipper_company').value = aramex_shipment_receiver_company;
|
905 |
+
document.getElementById('aramex_shipment_shipper_street').value = aramex_shipment_receiver_street;
|
906 |
+
document.getElementById('aramex_shipment_shipper_country').value = aramex_shipment_receiver_country;
|
907 |
+
document.getElementById('aramex_shipment_shipper_city').value = aramex_shipment_receiver_city;
|
908 |
+
document.getElementById('aramex_shipment_shipper_postal').value = aramex_shipment_receiver_postal;
|
909 |
+
document.getElementById('aramex_shipment_shipper_state').value = aramex_shipment_receiver_state;
|
910 |
+
document.getElementById('aramex_shipment_shipper_phone').value = aramex_shipment_receiver_phone;
|
911 |
+
document.getElementById('aramex_shipment_receiver_name').value = aramex_shipment_shipper_name;
|
912 |
+
document.getElementById('aramex_shipment_receiver_email').value = aramex_shipment_shipper_email;
|
913 |
+
document.getElementById('aramex_shipment_receiver_company').value = aramex_shipment_shipper_company;
|
914 |
+
document.getElementById('aramex_shipment_receiver_street').value = aramex_shipment_shipper_street;
|
915 |
+
document.getElementById('aramex_shipment_receiver_country').value = aramex_shipment_shipper_country;
|
916 |
+
document.getElementById('aramex_shipment_receiver_city').value = aramex_shipment_shipper_city;
|
917 |
+
document.getElementById('aramex_shipment_receiver_postal').value = aramex_shipment_shipper_postal;
|
918 |
+
document.getElementById('aramex_shipment_receiver_state').value = aramex_shipment_shipper_state;
|
919 |
+
document.getElementById('aramex_shipment_receiver_phone').value = aramex_shipment_shipper_phone;
|
920 |
+
flag = 1;
|
921 |
+
}
|
922 |
+
else if(elValue == 3){
|
923 |
+
document.getElementById('aramex_shipment_shipper_name').value = "";
|
924 |
+
document.getElementById('aramex_shipment_shipper_email').value = "";
|
925 |
+
document.getElementById('aramex_shipment_shipper_company').value = "";
|
926 |
+
document.getElementById('aramex_shipment_shipper_street').value = "";
|
927 |
+
document.getElementById('aramex_shipment_shipper_country').value = "";
|
928 |
+
document.getElementById('aramex_shipment_shipper_city').value = "";
|
929 |
+
document.getElementById('aramex_shipment_shipper_postal').value = "";
|
930 |
+
document.getElementById('aramex_shipment_shipper_state').value = "";
|
931 |
+
document.getElementById('aramex_shipment_shipper_phone').value = "";
|
932 |
+
|
933 |
+
document.getElementById('aramex_shipment_info_payment_type').value = '3';
|
934 |
+
|
935 |
+
document.getElementById('ASCC').style.display = 'block';
|
936 |
+
document.getElementById('ARCC').style.display = 'block';
|
937 |
+
|
938 |
+
document.getElementById('CASH').style.display = 'none';
|
939 |
+
document.getElementById('ACCT').style.display = 'none';
|
940 |
+
document.getElementById('PPST').style.display = 'none';
|
941 |
+
document.getElementById('CRDT').style.display = 'none';
|
942 |
+
|
943 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
944 |
+
|
945 |
+
|
946 |
+
|
947 |
+
flag = 2;
|
948 |
+
}
|
949 |
+
else{
|
950 |
+
if(flag = 1){
|
951 |
+
document.getElementById('aramex_shipment_receiver_name').value = aramex_shipment_receiver_name;
|
952 |
+
document.getElementById('aramex_shipment_receiver_email').value = aramex_shipment_receiver_email;
|
953 |
+
document.getElementById('aramex_shipment_receiver_company').value = aramex_shipment_receiver_company;
|
954 |
+
document.getElementById('aramex_shipment_receiver_street').value = aramex_shipment_receiver_street;
|
955 |
+
document.getElementById('aramex_shipment_receiver_country').value = aramex_shipment_receiver_country;
|
956 |
+
document.getElementById('aramex_shipment_receiver_city').value = aramex_shipment_receiver_city;
|
957 |
+
document.getElementById('aramex_shipment_receiver_postal').value = aramex_shipment_receiver_postal;
|
958 |
+
document.getElementById('aramex_shipment_receiver_state').value = aramex_shipment_receiver_state;
|
959 |
+
document.getElementById('aramex_shipment_receiver_phone').value = aramex_shipment_receiver_phone;
|
960 |
+
|
961 |
+
|
962 |
+
document.getElementById('aramex_shipment_shipper_name').value = aramex_shipment_shipper_name;
|
963 |
+
document.getElementById('aramex_shipment_shipper_email').value = aramex_shipment_shipper_email;
|
964 |
+
document.getElementById('aramex_shipment_shipper_company').value = aramex_shipment_shipper_company;
|
965 |
+
document.getElementById('aramex_shipment_shipper_street').value = aramex_shipment_shipper_street;
|
966 |
+
document.getElementById('aramex_shipment_shipper_country').value = aramex_shipment_shipper_country;
|
967 |
+
document.getElementById('aramex_shipment_shipper_city').value = aramex_shipment_shipper_city;
|
968 |
+
document.getElementById('aramex_shipment_shipper_postal').value = aramex_shipment_shipper_postal;
|
969 |
+
document.getElementById('aramex_shipment_shipper_state').value = aramex_shipment_shipper_state;
|
970 |
+
document.getElementById('aramex_shipment_shipper_phone').value = aramex_shipment_shipper_phone;
|
971 |
+
|
972 |
+
document.getElementById('aramex_shipment_info_payment_type').value = 'P';
|
973 |
+
|
974 |
+
document.getElementById('ASCC').style.display = 'none';
|
975 |
+
document.getElementById('ARCC').style.display = 'none';
|
976 |
+
|
977 |
+
document.getElementById('CASH').style.display = 'block';
|
978 |
+
document.getElementById('ACCT').style.display = 'block';
|
979 |
+
document.getElementById('PPST').style.display = 'block';
|
980 |
+
document.getElementById('CRDT').style.display = 'block';
|
981 |
+
|
982 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
983 |
+
|
984 |
+
|
985 |
+
|
986 |
+
|
987 |
+
}
|
988 |
+
else if(flag = 2){
|
989 |
+
document.getElementById('aramex_shipment_shipper_name').value = aramex_shipment_shipper_name;
|
990 |
+
document.getElementById('aramex_shipment_shipper_email').value = aramex_shipment_shipper_email;
|
991 |
+
document.getElementById('aramex_shipment_shipper_company').value = aramex_shipment_shipper_company;
|
992 |
+
document.getElementById('aramex_shipment_shipper_street').value = aramex_shipment_shipper_street;
|
993 |
+
document.getElementById('aramex_shipment_shipper_country').value = aramex_shipment_shipper_country;
|
994 |
+
document.getElementById('aramex_shipment_shipper_city').value = aramex_shipment_shipper_city;
|
995 |
+
document.getElementById('aramex_shipment_shipper_postal').value = aramex_shipment_shipper_postal;
|
996 |
+
document.getElementById('aramex_shipment_shipper_state').value = aramex_shipment_shipper_state;
|
997 |
+
document.getElementById('aramex_shipment_shipper_phone').value = aramex_shipment_shipper_phone;
|
998 |
+
|
999 |
+
document.getElementById('aramex_shipment_receiver_name').value = aramex_shipment_receiver_name;
|
1000 |
+
document.getElementById('aramex_shipment_receiver_email').value = aramex_shipment_receiver_email;
|
1001 |
+
document.getElementById('aramex_shipment_receiver_company').value = aramex_shipment_receiver_company;
|
1002 |
+
document.getElementById('aramex_shipment_receiver_street').value = aramex_shipment_receiver_street;
|
1003 |
+
document.getElementById('aramex_shipment_receiver_country').value = aramex_shipment_receiver_country;
|
1004 |
+
document.getElementById('aramex_shipment_receiver_city').value = aramex_shipment_receiver_city;
|
1005 |
+
document.getElementById('aramex_shipment_receiver_postal').value = aramex_shipment_receiver_postal;
|
1006 |
+
document.getElementById('aramex_shipment_receiver_state').value = aramex_shipment_receiver_state;
|
1007 |
+
document.getElementById('aramex_shipment_receiver_phone').value = aramex_shipment_receiver_phone;
|
1008 |
+
|
1009 |
+
document.getElementById('aramex_shipment_info_payment_type').value = 'P';
|
1010 |
+
|
1011 |
+
document.getElementById('ASCC').style.display = 'none';
|
1012 |
+
document.getElementById('ARCC').style.display = 'none';
|
1013 |
+
|
1014 |
+
document.getElementById('CASH').style.display = 'block';
|
1015 |
+
document.getElementById('ACCT').style.display = 'block';
|
1016 |
+
document.getElementById('PPST').style.display = 'block';
|
1017 |
+
document.getElementById('CRDT').style.display = 'block';
|
1018 |
+
|
1019 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
1020 |
+
|
1021 |
+
|
1022 |
+
}
|
1023 |
+
flag = 0;
|
1024 |
+
}
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
jccc('#aramex_shipment_info_payment_type').change(function(){
|
1028 |
+
//alert('Hello');
|
1029 |
+
if(jccc('#aramex_shipment_info_payment_type').val() == "P"){
|
1030 |
+
document.getElementById('ASCC').style.display = 'none';
|
1031 |
+
document.getElementById('ARCC').style.display = 'none';
|
1032 |
+
|
1033 |
+
document.getElementById('CASH').style.display = 'block';
|
1034 |
+
document.getElementById('ACCT').style.display = 'block';
|
1035 |
+
document.getElementById('PPST').style.display = 'block';
|
1036 |
+
document.getElementById('CRDT').style.display = 'block';
|
1037 |
+
|
1038 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
1039 |
+
|
1040 |
+
|
1041 |
+
}
|
1042 |
+
else{
|
1043 |
+
document.getElementById('ASCC').style.display = 'block';
|
1044 |
+
document.getElementById('ARCC').style.display = 'block';
|
1045 |
+
|
1046 |
+
document.getElementById('CASH').style.display = 'none';
|
1047 |
+
document.getElementById('ACCT').style.display = 'none';
|
1048 |
+
document.getElementById('PPST').style.display = 'none';
|
1049 |
+
document.getElementById('CRDT').style.display = 'none';
|
1050 |
+
|
1051 |
+
jccc('#aramex_shipment_info_payment_option').val("");
|
1052 |
+
|
1053 |
+
}
|
1054 |
+
});
|
1055 |
+
|
1056 |
+
|
1057 |
+
function togglePickup(){
|
1058 |
+
jccc('#pickup_infromation').toggle('slow');
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
|
1062 |
+
function aramexpop(itemscount)
|
1063 |
+
{
|
1064 |
+
<?php /*if($itemscount > 0){ ?>
|
1065 |
+
jccc("#aramex_overlay").css("display", "block");
|
1066 |
+
jccc("#aramex_shipment_creation").fadeIn(1000);
|
1067 |
+
<?php } else { ?>
|
1068 |
+
alert('Cannot create a shipment, all items have been shipped');
|
1069 |
+
<?php }*/ ?>
|
1070 |
+
|
1071 |
+
|
1072 |
+
if(itemscount > 0){
|
1073 |
+
jccc("#aramex_overlay").css("display", "block");
|
1074 |
+
jccc("#aramex_shipment_creation").fadeIn(1000);
|
1075 |
+
}
|
1076 |
+
else{
|
1077 |
+
alert('Cannot create a shipment, all items have been shipped');
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
function aramexclose()
|
1083 |
+
{
|
1084 |
+
jccc("#aramex_overlay").css("display", "none");
|
1085 |
+
jccc("#aramex_shipment_creation").fadeOut(500);
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
function aramexhide(aramexid, item_price, order_total_weight)
|
1089 |
+
{
|
1090 |
+
|
1091 |
+
//alert((parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val())-parseFloat(item_price)).toFixed(2));
|
1092 |
+
|
1093 |
+
if(jccc(".aramex_item_tobe_shipped").length > 1){
|
1094 |
+
//jccc("input[name=aramex_shipment_info_items_subtotal]").val(parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val())-parseFloat(item_price));
|
1095 |
+
|
1096 |
+
//alert(parseFloat(jccc("#order-total-weight").html()) - parseFloat(order_total_weight));
|
1097 |
+
jccc("#order-total-weight").html((parseFloat(jccc("#order-total-weight").html()) - parseFloat(order_total_weight)).toFixed(2));
|
1098 |
+
jccc("#order_weight").val((parseFloat(jccc("#order-total-weight").html()) - parseFloat(order_total_weight)).toFixed(2));
|
1099 |
+
|
1100 |
+
jccc("input[name=aramex_shipment_info_items_subtotal]").val((parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val())-parseFloat(item_price)).toFixed(2));
|
1101 |
+
|
1102 |
+
//new
|
1103 |
+
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));
|
1104 |
+
|
1105 |
+
jccc("#item"+aramexid).css('background', '#F2C2C8');
|
1106 |
+
jccc("#item"+aramexid).fadeOut(500);
|
1107 |
+
jccc("#item"+aramexid+" input").val(0);
|
1108 |
+
jccc("#item"+aramexid).remove();
|
1109 |
+
jccc("#"+aramexid).remove();
|
1110 |
+
jccc("textarea[name=aramex_shipment_description]").text(jccc("#aramex_shipment_description_div").text());
|
1111 |
+
get_tobe_shipped_items_number();
|
1112 |
+
} else {
|
1113 |
+
alert('At least one item is needed to create a shipment.');
|
1114 |
+
}
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
function get_tobe_shipped_items_number()
|
1118 |
+
{
|
1119 |
+
items_tobe_shipped_number = 0;
|
1120 |
+
jccc("#aramex_items_table .aramex_input_items_qty").each(function(qty_index){
|
1121 |
+
items_tobe_shipped_number += parseFloat(jccc(this).val());
|
1122 |
+
});
|
1123 |
+
//items_tobe_shipped_number = jccc(".aramex_item_tobe_shipped").length;
|
1124 |
+
jccc("#items_tobe_shipped_number").html(items_tobe_shipped_number);
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
var codTotal = jccc("#aramex_shipment_info_cod_amount").val();
|
1128 |
+
|
1129 |
+
jccc(".aramex_input_items_qty").keyup(function(){
|
1130 |
+
var the_id = jccc(this).attr('name');
|
1131 |
+
var items_price = 0;
|
1132 |
+
|
1133 |
+
var itemWeight = 0;
|
1134 |
+
var itemTotalPrice = 0;
|
1135 |
+
|
1136 |
+
jccc("#aramex_items_"+the_id).val(jccc(this).val());
|
1137 |
+
jccc(".aramex_input_items_qty").each(function(price_index){
|
1138 |
+
var the_id_qty = jccc(this).attr('name');//alert(the_id_qty);
|
1139 |
+
items_price += jccc(this).val() * jccc("#aramex_items_base_price_"+the_id_qty).val();
|
1140 |
+
|
1141 |
+
itemWeight += jccc(this).val() * jccc("#aramex_items_base_weight_"+the_id_qty).val();
|
1142 |
+
itemTotalPrice += (parseInt(jccc("#aramex_items_total_"+the_id_qty).val()) - parseInt(jccc(this).val())) * jccc("#aramex_items_base_price_"+the_id_qty).val();
|
1143 |
+
|
1144 |
+
});
|
1145 |
+
|
1146 |
+
//jccc("input[name=aramex_shipment_info_items_subtotal]").val(items_price);
|
1147 |
+
|
1148 |
+
jccc("input[name=aramex_shipment_info_items_subtotal]").val(items_price.toFixed(2));
|
1149 |
+
jccc("#order-total-weight").html(itemWeight.toFixed(2));
|
1150 |
+
|
1151 |
+
if(itemTotalPrice){
|
1152 |
+
jccc("#aramex_shipment_info_cod_amount").val((parseFloat('<?php echo round($_order->getData('grand_total'), 2) ?>') - parseFloat(itemTotalPrice)).toFixed(2));
|
1153 |
+
}
|
1154 |
+
else if(itemTotalPrice == 0){
|
1155 |
+
jccc("#aramex_shipment_info_cod_amount").val(codTotal);
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
jccc("input[name=aramex_shipment_info_cod_value]").val(parseFloat(items_price) + parseFloat(jccc("input[name=aramex_shipment_info_shipping_charges]").val()));
|
1159 |
+
get_tobe_shipped_items_number();
|
1160 |
+
});
|
1161 |
+
|
1162 |
+
var messages_content;
|
1163 |
+
<?php
|
1164 |
+
if(Mage::app()->getRequest()->getParam('aramexpopup') == 'show'){
|
1165 |
+
?>
|
1166 |
+
//aramexpop();
|
1167 |
+
jccc("#messages").ready(function(){
|
1168 |
+
jccc("#aramex_messages").html(jccc("#messages").html());
|
1169 |
+
});
|
1170 |
+
<?php
|
1171 |
+
}
|
1172 |
+
?>
|
1173 |
+
|
1174 |
+
jccc("input[name=aramex_shipment_info_shipping_charges]").change(function(){
|
1175 |
+
var cod_value = parseFloat(jccc("input[name=aramex_shipment_info_shipping_charges]").val()) + parseFloat(jccc("input[name=aramex_shipment_info_items_subtotal]").val());
|
1176 |
+
jccc("input[name=aramex_shipment_info_cod_value]").val(cod_value);
|
1177 |
+
});
|
1178 |
+
|
1179 |
+
jccc(".aramex_countries").change(function(){
|
1180 |
+
if(jccc("select[name=aramex_shipment_shipper_country]").val() != jccc("select[name=aramex_shipment_receiver_country]").val()){
|
1181 |
+
jccc("select[name=aramex_shipment_info_product_group]").val('EXP');
|
1182 |
+
//jccc("select[name=aramex_shipment_info_service_type]").val('EPX');
|
1183 |
+
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1184 |
+
jccc("select[name=aramex_shipment_info_additional_services] .express_service").attr("selected", "selected");
|
1185 |
+
|
1186 |
+
document.getElementById('aramex_shipment_info_product_type').value = 'PDX';
|
1187 |
+
document.getElementById('ONP').style.display = 'none';
|
1188 |
+
document.getElementById('OND').style.display = 'none';
|
1189 |
+
document.getElementById('CDA').style.display = 'none';
|
1190 |
+
|
1191 |
+
document.getElementById('PDX').style.display = 'block';
|
1192 |
+
document.getElementById('PPX').style.display = 'block';
|
1193 |
+
document.getElementById('PLX').style.display = 'block';
|
1194 |
+
document.getElementById('DDX').style.display = 'block';
|
1195 |
+
document.getElementById('DPX').style.display = 'block';
|
1196 |
+
document.getElementById('GDX').style.display = 'block';
|
1197 |
+
document.getElementById('GPX').style.display = 'block';
|
1198 |
+
|
1199 |
+
} else {
|
1200 |
+
jccc("select[name=aramex_shipment_info_product_group]").val('DOM');
|
1201 |
+
//jccc("select[name=aramex_shipment_info_service_type]").val('ONP');
|
1202 |
+
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1203 |
+
jccc("select[name=aramex_shipment_info_additional_services] .domestic_service").attr("selected", "selected");
|
1204 |
+
|
1205 |
+
document.getElementById('aramex_shipment_info_product_type').value = 'ONP';
|
1206 |
+
document.getElementById('ONP').style.display = 'block';
|
1207 |
+
document.getElementById('OND').style.display = 'block';
|
1208 |
+
document.getElementById('CDA').style.display = 'block';
|
1209 |
+
|
1210 |
+
document.getElementById('PDX').style.display = 'none';
|
1211 |
+
document.getElementById('PPX').style.display = 'none';
|
1212 |
+
document.getElementById('PLX').style.display = 'none';
|
1213 |
+
document.getElementById('DDX').style.display = 'none';
|
1214 |
+
document.getElementById('DPX').style.display = 'none';
|
1215 |
+
document.getElementById('GDX').style.display = 'none';
|
1216 |
+
document.getElementById('GPX').style.display = 'none';
|
1217 |
+
}
|
1218 |
+
|
1219 |
+
jccc("#aramex_shipment_info_product_group_div").html(jccc("select[name=aramex_shipment_info_product_group] option:selected").text());
|
1220 |
+
jccc("#aramex_shipment_info_service_type_div").html(jccc("select[name=aramex_shipment_info_service_type] option:selected").text());
|
1221 |
+
jccc("#aramex_shipment_info_additional_services_div").html(jccc("select[name=aramex_shipment_info_additional_services] option:selected").text());
|
1222 |
+
});
|
1223 |
+
|
1224 |
+
jccc(".aramex_all_options").change(function(){
|
1225 |
+
if(jccc("select[name=aramex_shipment_shipper_country]").val() != jccc("select[name=aramex_shipment_receiver_country]").val()){
|
1226 |
+
jccc("select[name=aramex_shipment_info_product_group]").val('EXP');
|
1227 |
+
//jccc("select[name=aramex_shipment_info_service_type]").val('EPX');
|
1228 |
+
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1229 |
+
jccc("select[name=aramex_shipment_info_additional_services] .express_service").attr("selected", "selected");
|
1230 |
+
} else {
|
1231 |
+
jccc("select[name=aramex_shipment_info_product_group]").val('DOM');
|
1232 |
+
//jccc("select[name=aramex_shipment_info_service_type]").val('ONP');
|
1233 |
+
jccc("select[name=aramex_shipment_info_additional_services] option:selected").removeAttr("selected");
|
1234 |
+
jccc("select[name=aramex_shipment_info_additional_services] .domestic_service").attr("selected", "selected");
|
1235 |
+
}
|
1236 |
+
});
|
1237 |
+
|
1238 |
+
jccc("#aramex_shipment_info_product_group_div").html(jccc("select[name=aramex_shipment_info_product_group] option:selected").text());
|
1239 |
+
jccc("#aramex_shipment_info_service_type_div").html(jccc("select[name=aramex_shipment_info_service_type] option:selected").text());
|
1240 |
+
jccc("#aramex_shipment_info_additional_services_div").html(jccc("select[name=aramex_shipment_info_additional_services] option:selected").text());
|
1241 |
+
|
1242 |
+
//jccc("#aramex_shipment").validate();
|
1243 |
+
|
1244 |
+
jccc(document).ready(function(){
|
1245 |
+
if((jccc('#aramex_messages').html() != "") && (jccc('.error-msg'))){
|
1246 |
+
jccc("#aramex_overlay").css("display", "block");
|
1247 |
+
jccc("#aramex_shipment_creation").fadeIn(1000);
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
jccc(function() {
|
1251 |
+
//jccc( "#datepicker" ).datepicker();
|
1252 |
+
jccc( "#aramex_shipment_info_pickup_date" ).datepicker({ dateFormat: "yy-mm-dd" });
|
1253 |
+
jccc( "#aramex_shipment_info_ready_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
1254 |
+
jccc( "#aramex_shipment_info_last_pickup_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
1255 |
+
jccc( "#aramex_shipment_info_closing_time" ).datepicker({ dateFormat: "yy-mm-dd" });
|
1256 |
+
});
|
1257 |
+
|
1258 |
+
jccc('#filereset').click(function(){
|
1259 |
+
jccc("#file1_div").html(jccc("#file1_div").html());
|
1260 |
+
});
|
1261 |
+
jccc('#file2reset').click(function(){
|
1262 |
+
jccc("#file2_div").html(jccc("#file2_div").html());
|
1263 |
+
});
|
1264 |
+
jccc('#file3reset').click(function(){
|
1265 |
+
jccc("#file3_div").html(jccc("#file3_div").html());
|
1266 |
+
});
|
1267 |
+
jccc("#aramex_shipment").validate();
|
1268 |
+
|
1269 |
+
});
|
1270 |
+
|
1271 |
+
</script><?php /* ?>
|
1272 |
+
<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/aramexgeo_adminhtml.js') ?>"></script>
|
1273 |
+
<?php */ ?>
|
app/etc/modules/Aramex_Core.xml
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 |
+
<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>
|
aramex/desktop.ini
ADDED
@@ -0,0 +1,4 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
[ViewState]
|
2 |
+
Mode=
|
3 |
+
Vid=
|
4 |
+
FolderType=Generic
|
aramex/shipping.wsdl
ADDED
@@ -0,0 +1,494 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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:sequence>
|
25 |
+
</xsd:complexType>
|
26 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true"/>
|
27 |
+
<xsd:complexType name="Transaction">
|
28 |
+
<xsd:sequence>
|
29 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true"/>
|
30 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true"/>
|
31 |
+
<xsd:element type="xsd:string" name="Reference3" nillable="true"/>
|
32 |
+
<xsd:element type="xsd:string" name="Reference4" nillable="true"/>
|
33 |
+
<xsd:element type="xsd:string" name="Reference5" nillable="true"/>
|
34 |
+
</xsd:sequence>
|
35 |
+
</xsd:complexType>
|
36 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true"/>
|
37 |
+
<xsd:complexType name="ArrayOfShipment">
|
38 |
+
<xsd:sequence>
|
39 |
+
<xsd:element type="tns:Shipment" name="Shipment" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
40 |
+
</xsd:sequence>
|
41 |
+
</xsd:complexType>
|
42 |
+
<xsd:element type="tns:ArrayOfShipment" name="ArrayOfShipment" nillable="true"/>
|
43 |
+
<xsd:complexType name="Shipment">
|
44 |
+
<xsd:sequence>
|
45 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true" minOccurs="0"/>
|
46 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true" minOccurs="0"/>
|
47 |
+
<xsd:element type="xsd:string" name="Reference3" nillable="true" minOccurs="0"/>
|
48 |
+
<xsd:element type="tns:Party" name="Shipper" nillable="true"/>
|
49 |
+
<xsd:element type="tns:Party" name="Consignee" nillable="true"/>
|
50 |
+
<xsd:element type="tns:Party" name="ThirdParty" nillable="true" minOccurs="0"/>
|
51 |
+
<xsd:element type="xsd:dateTime" name="ShippingDateTime"/>
|
52 |
+
<xsd:element type="xsd:dateTime" name="DueDate" minOccurs="0"/>
|
53 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true" minOccurs="0"/>
|
54 |
+
<xsd:element type="xsd:string" name="PickupLocation" nillable="true" minOccurs="0"/>
|
55 |
+
<xsd:element type="xsd:string" name="OperationsInstructions" nillable="true" minOccurs="0"/>
|
56 |
+
<xsd:element type="xsd:string" name="AccountingInstrcutions" nillable="true" minOccurs="0"/>
|
57 |
+
<xsd:element type="tns:ShipmentDetails" name="Details" nillable="true" minOccurs="0"/>
|
58 |
+
<xsd:element type="xsd:string" name="ForeignHAWB" nillable="true" minOccurs="0"/>
|
59 |
+
<xsd:element type="xsd:int" name="TransportType_x0020_" minOccurs="0"/>
|
60 |
+
<xsd:element type="xsd:string" name="PickupGUID" nillable="true" minOccurs="0"/>
|
61 |
+
</xsd:sequence>
|
62 |
+
</xsd:complexType>
|
63 |
+
<xsd:element type="tns:Shipment" name="Shipment" nillable="true"/>
|
64 |
+
<xsd:complexType name="Party">
|
65 |
+
<xsd:sequence>
|
66 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true" minOccurs="0"/>
|
67 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true" minOccurs="0"/>
|
68 |
+
<xsd:element type="xsd:string" name="AccountNumber" nillable="true" minOccurs="0"/>
|
69 |
+
<xsd:element type="tns:Address" name="PartyAddress" nillable="true"/>
|
70 |
+
<xsd:element type="tns:Contact" name="Contact" nillable="true"/>
|
71 |
+
</xsd:sequence>
|
72 |
+
</xsd:complexType>
|
73 |
+
<xsd:element type="tns:Party" name="Party" nillable="true"/>
|
74 |
+
<xsd:complexType name="Address">
|
75 |
+
<xsd:sequence>
|
76 |
+
<xsd:element type="xsd:string" name="Line1" nillable="true"/>
|
77 |
+
<xsd:element type="xsd:string" name="Line2" nillable="true"/>
|
78 |
+
<xsd:element type="xsd:string" name="Line3" nillable="true"/>
|
79 |
+
<xsd:element type="xsd:string" name="City" nillable="true"/>
|
80 |
+
<xsd:element type="xsd:string" name="StateOrProvinceCode" nillable="true" minOccurs="0"/>
|
81 |
+
<xsd:element type="xsd:string" name="PostCode" nillable="true"/>
|
82 |
+
<xsd:element type="xsd:string" name="CountryCode" nillable="true"/>
|
83 |
+
</xsd:sequence>
|
84 |
+
</xsd:complexType>
|
85 |
+
<xsd:element type="tns:Address" name="Address" nillable="true"/>
|
86 |
+
<xsd:complexType name="Contact">
|
87 |
+
<xsd:sequence>
|
88 |
+
<xsd:element type="xsd:string" name="Department" nillable="true" minOccurs="0"/>
|
89 |
+
<xsd:element type="xsd:string" name="PersonName" nillable="true"/>
|
90 |
+
<xsd:element type="xsd:string" name="Title" nillable="true" minOccurs="0"/>
|
91 |
+
<xsd:element type="xsd:string" name="CompanyName" nillable="true" minOccurs="0"/>
|
92 |
+
<xsd:element type="xsd:string" name="PhoneNumber1" nillable="true"/>
|
93 |
+
<xsd:element type="xsd:string" name="PhoneNumber1Ext" nillable="true" minOccurs="0"/>
|
94 |
+
<xsd:element type="xsd:string" name="PhoneNumber2" nillable="true"/>
|
95 |
+
<xsd:element type="xsd:string" name="PhoneNumber2Ext" nillable="true" minOccurs="0"/>
|
96 |
+
<xsd:element type="xsd:string" name="FaxNumber" nillable="true" minOccurs="0"/>
|
97 |
+
<xsd:element type="xsd:string" name="CellPhone" nillable="true" minOccurs="0"/>
|
98 |
+
<xsd:element type="xsd:string" name="EmailAddress" nillable="true" minOccurs="0"/>
|
99 |
+
<xsd:element type="xsd:string" name="Type" nillable="true"/>
|
100 |
+
</xsd:sequence>
|
101 |
+
</xsd:complexType>
|
102 |
+
<xsd:element type="tns:Contact" name="Contact" nillable="true"/>
|
103 |
+
<xsd:complexType name="ShipmentDetails">
|
104 |
+
<xsd:sequence>
|
105 |
+
<xsd:element type="tns:Dimensions" name="Dimensions" nillable="true"/>
|
106 |
+
<xsd:element type="tns:Weight" name="ActualWeight" nillable="true"/>
|
107 |
+
<xsd:element type="tns:Weight" name="ChargeableWeight" nillable="true"/>
|
108 |
+
<xsd:element type="xsd:string" name="DescriptionOfGoods" nillable="true"/>
|
109 |
+
<xsd:element type="xsd:string" name="GoodsOriginCountry" nillable="true"/>
|
110 |
+
<xsd:element type="xsd:int" name="NumberOfPieces"/>
|
111 |
+
<xsd:element type="xsd:string" name="ProductGroup" nillable="true"/>
|
112 |
+
<xsd:element type="xsd:string" name="ProductType" nillable="true"/>
|
113 |
+
<xsd:element type="xsd:string" name="PaymentType" nillable="true"/>
|
114 |
+
<xsd:element type="xsd:string" name="PaymentOptions" nillable="true"/>
|
115 |
+
<xsd:element type="tns:Money" name="CustomsValueAmount" nillable="true" minOccurs="0"/>
|
116 |
+
<xsd:element type="tns:Money" name="CashOnDeliveryAmount" nillable="true" minOccurs="0"/>
|
117 |
+
<xsd:element type="tns:Money" name="InsuranceAmount" nillable="true" minOccurs="0"/>
|
118 |
+
<xsd:element type="tns:Money" name="CashAdditionalAmount" nillable="true" minOccurs="0"/>
|
119 |
+
<xsd:element type="xsd:string" name="CashAdditionalAmountDescription" nillable="true" minOccurs="0"/>
|
120 |
+
<xsd:element type="tns:Money" name="CollectAmount" nillable="true" minOccurs="0"/>
|
121 |
+
<xsd:element type="xsd:string" name="Services" nillable="true" minOccurs="0"/>
|
122 |
+
<xsd:element type="tns:ArrayOfShipmentItem" name="Items" nillable="true" minOccurs="0"/>
|
123 |
+
</xsd:sequence>
|
124 |
+
</xsd:complexType>
|
125 |
+
<xsd:element type="tns:ShipmentDetails" name="ShipmentDetails" nillable="true"/>
|
126 |
+
<xsd:element type="tns:ArrayOfAttachment" name="Attachments" nillable="true" minOccurs="0"/>
|
127 |
+
<xsd:complexType name="Dimensions">
|
128 |
+
<xsd:sequence>
|
129 |
+
<xsd:element type="xsd:double" name="Length"/>
|
130 |
+
<xsd:element type="xsd:double" name="Width"/>
|
131 |
+
<xsd:element type="xsd:double" name="Height"/>
|
132 |
+
<xsd:element type="xsd:string" name="Unit" nillable="true"/>
|
133 |
+
</xsd:sequence>
|
134 |
+
</xsd:complexType>
|
135 |
+
<xsd:element type="tns:Dimensions" name="Dimensions" nillable="true"/>
|
136 |
+
<xsd:complexType name="Weight">
|
137 |
+
<xsd:sequence>
|
138 |
+
<xsd:element type="xsd:string" name="Unit" nillable="true"/>
|
139 |
+
<xsd:element type="xsd:double" name="Value"/>
|
140 |
+
</xsd:sequence>
|
141 |
+
</xsd:complexType>
|
142 |
+
<xsd:element type="tns:Weight" name="Weight" nillable="true"/>
|
143 |
+
<xsd:complexType name="Atachment">
|
144 |
+
<xsd:sequence>
|
145 |
+
<xsd:element type="xsd:string" name="FileName"/>
|
146 |
+
<xsd:element type="xsd:string" name="FileExtension"/>
|
147 |
+
<xsd:element type="xsd:base64Binary" name="FileContents"/>
|
148 |
+
</xsd:sequence>
|
149 |
+
</xsd:complexType>
|
150 |
+
<xsd:element type="tns:Atachment" name="Atachment" nillable="true"/>
|
151 |
+
<xsd:complexType name="Money">
|
152 |
+
<xsd:sequence>
|
153 |
+
<xsd:element type="xsd:string" name="CurrencyCode" nillable="true"/>
|
154 |
+
<xsd:element type="xsd:double" name="Value"/>
|
155 |
+
</xsd:sequence>
|
156 |
+
</xsd:complexType>
|
157 |
+
<xsd:element type="tns:Money" name="Money" nillable="true"/>
|
158 |
+
<xsd:complexType name="ArrayOfShipmentItem">
|
159 |
+
<xsd:sequence>
|
160 |
+
<xsd:element type="tns:ShipmentItem" name="ShipmentItem" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
161 |
+
</xsd:sequence>
|
162 |
+
</xsd:complexType>
|
163 |
+
<xsd:element type="tns:ArrayOfShipmentItem" name="ArrayOfShipmentItem" nillable="true"/>
|
164 |
+
<xsd:complexType name="ShipmentItem">
|
165 |
+
<xsd:sequence>
|
166 |
+
<xsd:element type="xsd:string" name="PackageType" nillable="true"/>
|
167 |
+
<xsd:element type="xsd:int" name="Quantity"/>
|
168 |
+
<xsd:element type="tns:Weight" name="Weight" nillable="true"/>
|
169 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true" minOccurs="0"/>
|
170 |
+
<xsd:element type="xsd:string" name="Reference" nillable="true" minOccurs="0"/>
|
171 |
+
</xsd:sequence>
|
172 |
+
</xsd:complexType>
|
173 |
+
<xsd:element type="tns:ShipmentItem" name="ShipmentItem" nillable="true"/>
|
174 |
+
<xsd:complexType name="ArrayOfAttachment">
|
175 |
+
<xsd:sequence>
|
176 |
+
<xsd:element type="tns:Attachment" name="Attachment" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
177 |
+
</xsd:sequence>
|
178 |
+
</xsd:complexType>
|
179 |
+
<xsd:element type="tns:ArrayOfAttachment" name="ArrayOfAttachment" nillable="true"/>
|
180 |
+
<xsd:complexType name="Attachment">
|
181 |
+
<xsd:sequence>
|
182 |
+
<xsd:element type="xsd:string" name="FileName" />
|
183 |
+
<xsd:element type="xsd:string" name="FileExtension" />
|
184 |
+
<xsd:element type="xsd:base64Binary" name="FileContents" />
|
185 |
+
</xsd:sequence>
|
186 |
+
</xsd:complexType>
|
187 |
+
<xsd:element type="tns:Attachment" name="Attachment" nillable="true"/>
|
188 |
+
<xsd:complexType name="LabelInfo">
|
189 |
+
<xsd:sequence>
|
190 |
+
<xsd:element type="xsd:int" name="ReportID"/>
|
191 |
+
<xsd:element type="xsd:string" name="ReportType" nillable="true"/>
|
192 |
+
</xsd:sequence>
|
193 |
+
</xsd:complexType>
|
194 |
+
<xsd:element type="tns:LabelInfo" name="LabelInfo" nillable="true"/>
|
195 |
+
<xsd:element name="ShipmentCreationResponse">
|
196 |
+
<xsd:complexType>
|
197 |
+
<xsd:sequence>
|
198 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
199 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
200 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
201 |
+
<xsd:element type="tns:ArrayOfProcessedShipment" name="Shipments" nillable="true" minOccurs="0"/>
|
202 |
+
</xsd:sequence>
|
203 |
+
</xsd:complexType>
|
204 |
+
</xsd:element>
|
205 |
+
<xsd:complexType name="ArrayOfNotification">
|
206 |
+
<xsd:sequence>
|
207 |
+
<xsd:element type="tns:Notification" name="Notification" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
208 |
+
</xsd:sequence>
|
209 |
+
</xsd:complexType>
|
210 |
+
<xsd:element type="tns:ArrayOfNotification" name="ArrayOfNotification" nillable="true"/>
|
211 |
+
<xsd:complexType name="Notification">
|
212 |
+
<xsd:sequence>
|
213 |
+
<xsd:element type="xsd:string" name="Code" nillable="true"/>
|
214 |
+
<xsd:element type="xsd:string" name="Message" nillable="true"/>
|
215 |
+
</xsd:sequence>
|
216 |
+
</xsd:complexType>
|
217 |
+
<xsd:element type="tns:Notification" name="Notification" nillable="true"/>
|
218 |
+
<xsd:complexType name="ArrayOfProcessedShipment">
|
219 |
+
<xsd:sequence>
|
220 |
+
<xsd:element type="tns:ProcessedShipment" name="ProcessedShipment" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
221 |
+
</xsd:sequence>
|
222 |
+
</xsd:complexType>
|
223 |
+
<xsd:element type="tns:ArrayOfProcessedShipment" name="ArrayOfProcessedShipment" nillable="true"/>
|
224 |
+
<xsd:complexType name="ProcessedShipment">
|
225 |
+
<xsd:sequence>
|
226 |
+
<xsd:element type="xsd:string" name="ID" nillable="true"/>
|
227 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true"/>
|
228 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true"/>
|
229 |
+
<xsd:element type="xsd:string" name="Reference3" nillable="true"/>
|
230 |
+
<xsd:element type="xsd:string" name="ForeignHAWB" nillable="true"/>
|
231 |
+
<xsd:element type="xsd:boolean" name="HasErrors"/>
|
232 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true"/>
|
233 |
+
<xsd:element type="tns:ShipmentLabel" name="ShipmentLabel" nillable="true"/>
|
234 |
+
</xsd:sequence>
|
235 |
+
</xsd:complexType>
|
236 |
+
<xsd:element type="tns:ProcessedShipment" name="ProcessedShipment" nillable="true"/>
|
237 |
+
<xsd:complexType name="ShipmentLabel">
|
238 |
+
<xsd:sequence>
|
239 |
+
<xsd:element type="xsd:string" name="LabelURL" nillable="true"/>
|
240 |
+
<xsd:element type="xsd:base64Binary" name="LabelFileContents" nillable="true"/>
|
241 |
+
</xsd:sequence>
|
242 |
+
</xsd:complexType>
|
243 |
+
<xsd:element type="tns:ShipmentLabel" name="ShipmentLabel" nillable="true"/>
|
244 |
+
<xsd:element name="LabelPrintingRequest">
|
245 |
+
<xsd:complexType>
|
246 |
+
<xsd:sequence>
|
247 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
248 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
249 |
+
<xsd:element type="xsd:string" name="ShipmentNumber" nillable="true" minOccurs="0"/>
|
250 |
+
<xsd:element type="xsd:string" name="ProductGroup" nillable="true" minOccurs="0"/>
|
251 |
+
<xsd:element type="xsd:string" name="OriginEntity" nillable="true" minOccurs="0"/>
|
252 |
+
<xsd:element type="tns:LabelInfo" name="LabelInfo" nillable="true" minOccurs="0"/>
|
253 |
+
</xsd:sequence>
|
254 |
+
</xsd:complexType>
|
255 |
+
</xsd:element>
|
256 |
+
<xsd:element name="LabelPrintingResponse">
|
257 |
+
<xsd:complexType>
|
258 |
+
<xsd:sequence>
|
259 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
260 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
261 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
262 |
+
<xsd:element type="xsd:string" name="ShipmentNumber" nillable="true" minOccurs="0"/>
|
263 |
+
<xsd:element type="tns:ShipmentLabel" name="ShipmentLabel" nillable="true" minOccurs="0"/>
|
264 |
+
</xsd:sequence>
|
265 |
+
</xsd:complexType>
|
266 |
+
</xsd:element>
|
267 |
+
<xsd:element name="PickupCreationRequest">
|
268 |
+
<xsd:complexType>
|
269 |
+
<xsd:sequence>
|
270 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
271 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
272 |
+
<xsd:element type="tns:Pickup" name="Pickup" nillable="true" minOccurs="0"/>
|
273 |
+
<xsd:element type="tns:LabelInfo" name="LabelInfo" nillable="true" minOccurs="0"/>
|
274 |
+
</xsd:sequence>
|
275 |
+
</xsd:complexType>
|
276 |
+
</xsd:element>
|
277 |
+
<xsd:complexType name="Pickup">
|
278 |
+
<xsd:sequence>
|
279 |
+
<xsd:element type="tns:Address" name="PickupAddress" nillable="true"/>
|
280 |
+
<xsd:element type="tns:Contact" name="PickupContact" nillable="true"/>
|
281 |
+
<xsd:element type="xsd:string" name="PickupLocation" nillable="true"/>
|
282 |
+
<xsd:element type="xsd:dateTime" name="PickupDate"/>
|
283 |
+
<xsd:element type="xsd:dateTime" name="ReadyTime"/>
|
284 |
+
<xsd:element type="xsd:dateTime" name="LastPickupTime"/>
|
285 |
+
<xsd:element type="xsd:dateTime" name="ClosingTime"/>
|
286 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true"/>
|
287 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true" minOccurs="0"/>
|
288 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true" minOccurs="0"/>
|
289 |
+
<xsd:element type="xsd:string" name="Vehicle" nillable="true"/>
|
290 |
+
<xsd:element type="tns:ArrayOfShipment" name="Shipments" nillable="true" minOccurs="0"/>
|
291 |
+
<xsd:element type="tns:ArrayOfPickupItemDetail" name="PickupItems" nillable="true"/>
|
292 |
+
<xsd:element type="xsd:string" name="Status" nillable="true" minOccurs="0"/>
|
293 |
+
</xsd:sequence>
|
294 |
+
</xsd:complexType>
|
295 |
+
<xsd:element type="tns:Pickup" name="Pickup" nillable="true"/>
|
296 |
+
<xsd:complexType name="ArrayOfPickupItemDetail">
|
297 |
+
<xsd:sequence>
|
298 |
+
<xsd:element type="tns:PickupItemDetail" name="PickupItemDetail" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
299 |
+
</xsd:sequence>
|
300 |
+
</xsd:complexType>
|
301 |
+
<xsd:element type="tns:ArrayOfPickupItemDetail" name="ArrayOfPickupItemDetail" nillable="true"/>
|
302 |
+
<xsd:complexType name="PickupItemDetail">
|
303 |
+
<xsd:sequence>
|
304 |
+
<xsd:element type="xsd:string" name="ProductGroup" nillable="true"/>
|
305 |
+
<xsd:element type="xsd:string" name="ProductType" nillable="true"/>
|
306 |
+
<xsd:element type="xsd:int" name="NumberOfShipments"/>
|
307 |
+
<xsd:element type="xsd:string" name="PackageType" nillable="true"/>
|
308 |
+
<xsd:element type="xsd:string" name="Payment" nillable="true"/>
|
309 |
+
<xsd:element type="tns:Weight" name="ShipmentWeight" nillable="true"/>
|
310 |
+
<xsd:element type="tns:Volume" name="ShipmentVolume" nillable="true"/>
|
311 |
+
<xsd:element type="xsd:int" name="NumberOfPieces"/>
|
312 |
+
<xsd:element type="tns:Money" name="CashAmount" nillable="true"/>
|
313 |
+
<xsd:element type="tns:Money" name="ExtraCharges" nillable="true"/>
|
314 |
+
<xsd:element type="tns:Dimensions" name="ShipmentDimensions" nillable="true"/>
|
315 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true"/>
|
316 |
+
</xsd:sequence>
|
317 |
+
</xsd:complexType>
|
318 |
+
<xsd:element type="tns:PickupItemDetail" name="PickupItemDetail" nillable="true"/>
|
319 |
+
<xsd:complexType name="Volume">
|
320 |
+
<xsd:sequence>
|
321 |
+
<xsd:element type="xsd:string" name="Unit" nillable="true"/>
|
322 |
+
<xsd:element type="xsd:double" name="Value"/>
|
323 |
+
</xsd:sequence>
|
324 |
+
</xsd:complexType>
|
325 |
+
<xsd:element type="tns:Volume" name="Volume" nillable="true"/>
|
326 |
+
<xsd:element name="PickupCreationResponse">
|
327 |
+
<xsd:complexType>
|
328 |
+
<xsd:sequence>
|
329 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
330 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
331 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
332 |
+
<xsd:element type="tns:ProcessedPickup" name="ProcessedPickup" nillable="true" minOccurs="0"/>
|
333 |
+
</xsd:sequence>
|
334 |
+
</xsd:complexType>
|
335 |
+
</xsd:element>
|
336 |
+
<xsd:complexType name="ProcessedPickup">
|
337 |
+
<xsd:sequence>
|
338 |
+
<xsd:element type="xsd:string" name="ID" nillable="true"/>
|
339 |
+
<xsd:element type="ser:guid" name="GUID"/>
|
340 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true"/>
|
341 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true"/>
|
342 |
+
<xsd:element type="tns:ArrayOfProcessedShipment" name="ProcessedShipments" nillable="true"/>
|
343 |
+
</xsd:sequence>
|
344 |
+
</xsd:complexType>
|
345 |
+
<xsd:element type="tns:ProcessedPickup" name="ProcessedPickup" nillable="true"/>
|
346 |
+
<xsd:element name="PickupCancelationRequest">
|
347 |
+
<xsd:complexType>
|
348 |
+
<xsd:sequence>
|
349 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true" minOccurs="0"/>
|
350 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
351 |
+
<xsd:element type="xsd:string" name="PickupGUID" nillable="true" minOccurs="0"/>
|
352 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true" minOccurs="0"/>
|
353 |
+
</xsd:sequence>
|
354 |
+
</xsd:complexType>
|
355 |
+
</xsd:element>
|
356 |
+
<xsd:element name="PickupCancelationResponse">
|
357 |
+
<xsd:complexType>
|
358 |
+
<xsd:sequence>
|
359 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
360 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
361 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
362 |
+
</xsd:sequence>
|
363 |
+
</xsd:complexType>
|
364 |
+
</xsd:element>
|
365 |
+
</xsd:schema>
|
366 |
+
<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">
|
367 |
+
<xs:element type="xs:anyType" name="anyType" nillable="true"/>
|
368 |
+
<xs:element type="xs:anyURI" name="anyURI" nillable="true"/>
|
369 |
+
<xs:element type="xs:base64Binary" name="base64Binary" nillable="true"/>
|
370 |
+
<xs:element type="xs:boolean" name="boolean" nillable="true"/>
|
371 |
+
<xs:element type="xs:byte" name="byte" nillable="true"/>
|
372 |
+
<xs:element type="xs:dateTime" name="dateTime" nillable="true"/>
|
373 |
+
<xs:element type="xs:decimal" name="decimal" nillable="true"/>
|
374 |
+
<xs:element type="xs:double" name="double" nillable="true"/>
|
375 |
+
<xs:element type="xs:float" name="float" nillable="true"/>
|
376 |
+
<xs:element type="xs:int" name="int" nillable="true"/>
|
377 |
+
<xs:element type="xs:long" name="long" nillable="true"/>
|
378 |
+
<xs:element type="xs:QName" name="QName" nillable="true"/>
|
379 |
+
<xs:element type="xs:short" name="short" nillable="true"/>
|
380 |
+
<xs:element type="xs:string" name="string" nillable="true"/>
|
381 |
+
<xs:element type="xs:unsignedByte" name="unsignedByte" nillable="true"/>
|
382 |
+
<xs:element type="xs:unsignedInt" name="unsignedInt" nillable="true"/>
|
383 |
+
<xs:element type="xs:unsignedLong" name="unsignedLong" nillable="true"/>
|
384 |
+
<xs:element type="xs:unsignedShort" name="unsignedShort" nillable="true"/>
|
385 |
+
<xs:element type="tns:char" name="char" nillable="true"/>
|
386 |
+
<xs:simpleType name="char">
|
387 |
+
<xs:restriction base="xs:int"/>
|
388 |
+
</xs:simpleType>
|
389 |
+
<xs:element type="tns:duration" name="duration" nillable="true"/>
|
390 |
+
<xs:simpleType name="duration">
|
391 |
+
<xs:restriction base="xs:duration">
|
392 |
+
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
|
393 |
+
<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
|
394 |
+
<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
|
395 |
+
</xs:restriction>
|
396 |
+
</xs:simpleType>
|
397 |
+
<xs:element type="tns:guid" name="guid" nillable="true"/>
|
398 |
+
<xs:simpleType name="guid">
|
399 |
+
<xs:restriction base="xs:string">
|
400 |
+
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
|
401 |
+
</xs:restriction>
|
402 |
+
</xs:simpleType>
|
403 |
+
<xs:attribute type="xs:QName" name="FactoryType"/>
|
404 |
+
<xs:attribute type="xs:ID" name="Id"/>
|
405 |
+
<xs:attribute type="xs:IDREF" name="Ref"/>
|
406 |
+
</xs:schema>
|
407 |
+
</wsdl:types>
|
408 |
+
<wsdl:message name="ShipmentCreationRequest">
|
409 |
+
<wsdl:part name="parameters" element="tns:ShipmentCreationRequest"/>
|
410 |
+
</wsdl:message>
|
411 |
+
<wsdl:message name="ShipmentCreationResponse">
|
412 |
+
<wsdl:part name="parameters" element="tns:ShipmentCreationResponse"/>
|
413 |
+
</wsdl:message>
|
414 |
+
<wsdl:message name="LabelPrintingRequest">
|
415 |
+
<wsdl:part name="parameters" element="tns:LabelPrintingRequest"/>
|
416 |
+
</wsdl:message>
|
417 |
+
<wsdl:message name="LabelPrintingResponse">
|
418 |
+
<wsdl:part name="parameters" element="tns:LabelPrintingResponse"/>
|
419 |
+
</wsdl:message>
|
420 |
+
<wsdl:message name="PickupCreationRequest">
|
421 |
+
<wsdl:part name="parameters" element="tns:PickupCreationRequest"/>
|
422 |
+
</wsdl:message>
|
423 |
+
<wsdl:message name="PickupCreationResponse">
|
424 |
+
<wsdl:part name="parameters" element="tns:PickupCreationResponse"/>
|
425 |
+
</wsdl:message>
|
426 |
+
<wsdl:message name="PickupCancelationRequest">
|
427 |
+
<wsdl:part name="parameters" element="tns:PickupCancelationRequest"/>
|
428 |
+
</wsdl:message>
|
429 |
+
<wsdl:message name="PickupCancelationResponse">
|
430 |
+
<wsdl:part name="parameters" element="tns:PickupCancelationResponse"/>
|
431 |
+
</wsdl:message>
|
432 |
+
<wsdl:portType name="Service_1_0">
|
433 |
+
<wsdl:operation name="CreateShipments">
|
434 |
+
<wsdl:input name="ShipmentCreationRequest" message="tns:ShipmentCreationRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipments"/>
|
435 |
+
<wsdl:output name="ShipmentCreationResponse" message="tns:ShipmentCreationResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipmentsResponse"/>
|
436 |
+
</wsdl:operation>
|
437 |
+
<wsdl:operation name="PrintLabel">
|
438 |
+
<wsdl:input name="LabelPrintingRequest" message="tns:LabelPrintingRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/PrintLabel"/>
|
439 |
+
<wsdl:output name="LabelPrintingResponse" message="tns:LabelPrintingResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/PrintLabelResponse"/>
|
440 |
+
</wsdl:operation>
|
441 |
+
<wsdl:operation name="CreatePickup">
|
442 |
+
<wsdl:input name="PickupCreationRequest" message="tns:PickupCreationRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreatePickup"/>
|
443 |
+
<wsdl:output name="PickupCreationResponse" message="tns:PickupCreationResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreatePickupResponse"/>
|
444 |
+
</wsdl:operation>
|
445 |
+
<wsdl:operation name="CancelPickup">
|
446 |
+
<wsdl:input name="PickupCancelationRequest" message="tns:PickupCancelationRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CancelPickup"/>
|
447 |
+
<wsdl:output name="PickupCancelationResponse" message="tns:PickupCancelationResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CancelPickupResponse"/>
|
448 |
+
</wsdl:operation>
|
449 |
+
</wsdl:portType>
|
450 |
+
<wsdl:binding type="tns:Service_1_0" name="Service_1_0">
|
451 |
+
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
|
452 |
+
<wsdl:operation name="CreateShipments">
|
453 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipments"/>
|
454 |
+
<wsdl:input name="ShipmentCreationRequest">
|
455 |
+
<soap:body use="literal"/>
|
456 |
+
</wsdl:input>
|
457 |
+
<wsdl:output name="ShipmentCreationResponse">
|
458 |
+
<soap:body use="literal"/>
|
459 |
+
</wsdl:output>
|
460 |
+
</wsdl:operation>
|
461 |
+
<wsdl:operation name="PrintLabel">
|
462 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/PrintLabel"/>
|
463 |
+
<wsdl:input name="LabelPrintingRequest">
|
464 |
+
<soap:body use="literal"/>
|
465 |
+
</wsdl:input>
|
466 |
+
<wsdl:output name="LabelPrintingResponse">
|
467 |
+
<soap:body use="literal"/>
|
468 |
+
</wsdl:output>
|
469 |
+
</wsdl:operation>
|
470 |
+
<wsdl:operation name="CreatePickup">
|
471 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreatePickup"/>
|
472 |
+
<wsdl:input name="PickupCreationRequest">
|
473 |
+
<soap:body use="literal"/>
|
474 |
+
</wsdl:input>
|
475 |
+
<wsdl:output name="PickupCreationResponse">
|
476 |
+
<soap:body use="literal"/>
|
477 |
+
</wsdl:output>
|
478 |
+
</wsdl:operation>
|
479 |
+
<wsdl:operation name="CancelPickup">
|
480 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CancelPickup"/>
|
481 |
+
<wsdl:input name="PickupCancelationRequest">
|
482 |
+
<soap:body use="literal"/>
|
483 |
+
</wsdl:input>
|
484 |
+
<wsdl:output name="PickupCancelationResponse">
|
485 |
+
<soap:body use="literal"/>
|
486 |
+
</wsdl:output>
|
487 |
+
</wsdl:operation>
|
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>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Aramex_Shipping_Tracking_API</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Stable</summary>
|
10 |
+
<description>Aramex Shipping and Tracking extension</description>
|
11 |
+
<notes>stable</notes>
|
12 |
+
<authors><author><name>Aramex</name><user>Amol</user><email>Amol.Tated@aramex.com</email></author></authors>
|
13 |
+
<date>2013-05-29</date>
|
14 |
+
<time>09:36:37</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Aramex_Core.xml" hash="1923b29dd7e03cf9f4f7ba9c912760da"/><file name="Aramex_Core.xml" hash="1923b29dd7e03cf9f4f7ba9c912760da"/></dir></target><target name="magecommunity"><dir name="Aramex"><dir name="Core"><file name="Aramex_Core.xml" hash="5525eb67e5f1896bd148280135936cd4"/><dir name="Helper"><file name="Data.php" hash="3e54384c862c7db8c4a8af4219c01d13"/></dir><dir name="Model"><file name="Settings.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="etc"><file name="config.xml" hash="f8e4095e76f0012b30f40932e2064e5b"/><file name="system.xml" hash="5c1b63745c4e019b93e973a4230dda22"/><file name="system.xml-15-Jan-2013" hash="766d98917f921e3184c824ca7e6e92ea"/><file name="system.xml-7-Jan-2013" hash="b841b80a32bc9d828593dde6db15b8b7"/></dir><file name=".DS_Store" hash="63f10aa2776f22791b4252a55c2d779d"/></dir><dir name="Shipment"><file name="Aramex_Shipment.xml" hash="a665b5ab26b59bc247a9a1b4266fd2f0"/><dir name="Block"><dir name="Sales"><dir name="Order"><file name="View.php" hash="2f8abff310d9983f4a19268464d36197"/></dir></dir></dir><dir name="Model"><dir name="Carrier"><dir name="Aramex"><dir name="Source"><file name="Dropoff.php" hash="be955005e03be4f4f07180b82191ff50"/><file name="Freemethod.php" hash="1ad34cc411b9f13b4b2a3bb91450b9b6"/><file name="Method.php" hash="ae7ebd022c95f8c6c44f4727528b7d56"/><file name="Packaging.php" hash="572a0b2c42dbbfabfd4575db08a70fc7"/></dir></dir><file name="Aramex.php" hash="ff55404d64b5f4af52f89aaa4172074f"/><file name="~$Aramex.php" hash="445a99f7ccd2d8bb7c694743b316e662"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="e3a6cdad35fe8d49fec3ad36d0c5f5cf"/><file name="ShipmentController.php" hash="cea32b347de29be31f768a98c4cc2c56"/><file name=".DS_Store" hash="fe1370d34791e3d9ade24763c3297fe3"/></dir><dir name="etc"><file name="config.xml" hash="16511eada35383d8490923f584051e2d"/></dir><file name=".DS_Store" hash="e9877719bcfec2eef994850c1f10f853"/></dir><dir name="Shipping"><dir name="Model"><dir name="Carrier"><dir name="Aramex"><dir name="Source"><file name="Dropoff.php" hash="be955005e03be4f4f07180b82191ff50"/><file name="Freemethod.php" hash="1ad34cc411b9f13b4b2a3bb91450b9b6"/><file name="Method.php" hash="ae7ebd022c95f8c6c44f4727528b7d56"/><file name="Packaging.php" hash="572a0b2c42dbbfabfd4575db08a70fc7"/></dir></dir><file name="Aramex.php" hash="aa45617cbb4dc8818539ca17e1c99317"/></dir></dir><dir name="etc"><file name="config.xml" hash="eab6a79e7730105c0b720a3976fb3511"/><file name="system.xml" hash="6691523c79d20079c96d0f6129281a5a"/></dir></dir><file name=".DS_Store" hash="9f4b17221ee140508fab9bbe1589d355"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="info.phtml" hash="212ef6d4b41663cd37a680760ae36371"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><dir name="aramex"><file name="desktop.ini" hash="15478b340a8362bb79fd2a6ea0dde1a0"/><file name="shipping.wsdl" hash="be4030121f0693dcb34f4e6279d24a4a"/></dir><dir name="wsdl"><file name="Tracking.wsdl" hash="d0a3decaa902f3f2b6d463c790071da8"/></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|
wsdl/Tracking.wsdl
ADDED
@@ -0,0 +1,176 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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="TrackShipments">
|
6 |
+
<soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/TrackShipments"/>
|
7 |
+
<wsdl:input name="ShipmentTrackingRequest">
|
8 |
+
<soap:body use="literal"/>
|
9 |
+
</wsdl:input>
|
10 |
+
<wsdl:output name="ShipmentTrackingResponse">
|
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="ShipmentTrackingRequest">
|
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="q1:ArrayOfstring" name="Shipments" nillable="true" minOccurs="0" xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
|
23 |
+
<xsd:element type="xsd:boolean" name="GetLastTrackingUpdateOnly" minOccurs="0"/>
|
24 |
+
</xsd:sequence>
|
25 |
+
</xsd:complexType>
|
26 |
+
</xsd:element>
|
27 |
+
<xsd:complexType name="ClientInfo">
|
28 |
+
<xsd:sequence>
|
29 |
+
<xsd:element type="xsd:string" name="UserName" nillable="true"/>
|
30 |
+
<xsd:element type="xsd:string" name="Password" nillable="true"/>
|
31 |
+
<xsd:element type="xsd:string" name="Version" nillable="true"/>
|
32 |
+
<xsd:element type="xsd:string" name="AccountNumber" nillable="true"/>
|
33 |
+
<xsd:element type="xsd:string" name="AccountPin" nillable="true"/>
|
34 |
+
<xsd:element type="xsd:string" name="AccountEntity" nillable="true"/>
|
35 |
+
<xsd:element type="xsd:string" name="AccountCountryCode" nillable="true"/>
|
36 |
+
</xsd:sequence>
|
37 |
+
</xsd:complexType>
|
38 |
+
<xsd:element type="tns:ClientInfo" name="ClientInfo" nillable="true"/>
|
39 |
+
<xsd:complexType name="Transaction">
|
40 |
+
<xsd:sequence>
|
41 |
+
<xsd:element type="xsd:string" name="Reference1" nillable="true"/>
|
42 |
+
<xsd:element type="xsd:string" name="Reference2" nillable="true"/>
|
43 |
+
<xsd:element type="xsd:string" name="Reference3" nillable="true"/>
|
44 |
+
<xsd:element type="xsd:string" name="Reference4" nillable="true"/>
|
45 |
+
<xsd:element type="xsd:string" name="Reference5" nillable="true"/>
|
46 |
+
</xsd:sequence>
|
47 |
+
</xsd:complexType>
|
48 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true"/>
|
49 |
+
<xsd:element name="ShipmentTrackingResponse">
|
50 |
+
<xsd:complexType>
|
51 |
+
<xsd:sequence>
|
52 |
+
<xsd:element type="tns:Transaction" name="Transaction" nillable="true" minOccurs="0"/>
|
53 |
+
<xsd:element type="tns:ArrayOfNotification" name="Notifications" nillable="true" minOccurs="0"/>
|
54 |
+
<xsd:element type="xsd:boolean" name="HasErrors" minOccurs="0"/>
|
55 |
+
<xsd:element type="q2:ArrayOfKeyValueOfstringArrayOfTrackingResultmFAkxlpY" name="TrackingResults" nillable="true" minOccurs="0" xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
|
56 |
+
</xsd:sequence>
|
57 |
+
</xsd:complexType>
|
58 |
+
</xsd:element>
|
59 |
+
<xsd:complexType name="ArrayOfNotification">
|
60 |
+
<xsd:sequence>
|
61 |
+
<xsd:element type="tns:Notification" name="Notification" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
62 |
+
</xsd:sequence>
|
63 |
+
</xsd:complexType>
|
64 |
+
<xsd:element type="tns:ArrayOfNotification" name="ArrayOfNotification" nillable="true"/>
|
65 |
+
<xsd:complexType name="Notification">
|
66 |
+
<xsd:sequence>
|
67 |
+
<xsd:element type="xsd:string" name="Code" nillable="true"/>
|
68 |
+
<xsd:element type="xsd:string" name="Message" nillable="true"/>
|
69 |
+
</xsd:sequence>
|
70 |
+
</xsd:complexType>
|
71 |
+
<xsd:element type="tns:Notification" name="Notification" nillable="true"/>
|
72 |
+
<xsd:complexType name="ArrayOfTrackingResult">
|
73 |
+
<xsd:sequence>
|
74 |
+
<xsd:element type="tns:TrackingResult" name="TrackingResult" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
75 |
+
</xsd:sequence>
|
76 |
+
</xsd:complexType>
|
77 |
+
<xsd:element type="tns:ArrayOfTrackingResult" name="ArrayOfTrackingResult" nillable="true"/>
|
78 |
+
<xsd:complexType name="TrackingResult">
|
79 |
+
<xsd:sequence>
|
80 |
+
<xsd:element type="xsd:string" name="WaybillNumber" nillable="true"/>
|
81 |
+
<xsd:element type="xsd:string" name="UpdateCode" nillable="true"/>
|
82 |
+
<xsd:element type="xsd:string" name="UpdateDescription" nillable="true"/>
|
83 |
+
<xsd:element type="xsd:dateTime" name="UpdateDateTime"/>
|
84 |
+
<xsd:element type="xsd:string" name="UpdateLocation" nillable="true"/>
|
85 |
+
<xsd:element type="xsd:string" name="Comments" nillable="true"/>
|
86 |
+
<xsd:element type="xsd:string" name="ProblemCode" nillable="true"/>
|
87 |
+
</xsd:sequence>
|
88 |
+
</xsd:complexType>
|
89 |
+
<xsd:element type="tns:TrackingResult" name="TrackingResult" nillable="true"/>
|
90 |
+
</xsd:schema>
|
91 |
+
<xsd:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" elementFormDefault="qualified">
|
92 |
+
<xsd:complexType name="ArrayOfstring">
|
93 |
+
<xsd:sequence>
|
94 |
+
<xsd:element type="xsd:string" name="string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
|
95 |
+
</xsd:sequence>
|
96 |
+
</xsd:complexType>
|
97 |
+
<xsd:element type="tns:ArrayOfstring" name="ArrayOfstring" nillable="true"/>
|
98 |
+
<xsd:complexType name="ArrayOfKeyValueOfstringArrayOfTrackingResultmFAkxlpY">
|
99 |
+
<xsd:annotation>
|
100 |
+
<xsd:appinfo>
|
101 |
+
<IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary>
|
102 |
+
</xsd:appinfo>
|
103 |
+
</xsd:annotation>
|
104 |
+
<xsd:sequence>
|
105 |
+
<xsd:element name="KeyValueOfstringArrayOfTrackingResultmFAkxlpY" minOccurs="0" maxOccurs="unbounded">
|
106 |
+
<xsd:complexType>
|
107 |
+
<xsd:sequence>
|
108 |
+
<xsd:element type="xsd:string" name="Key" nillable="true"/>
|
109 |
+
<xsd:element type="q3:ArrayOfTrackingResult" name="Value" nillable="true" xmlns:q3="http://ws.aramex.net/ShippingAPI/v1/"/>
|
110 |
+
</xsd:sequence>
|
111 |
+
</xsd:complexType>
|
112 |
+
</xsd:element>
|
113 |
+
</xsd:sequence>
|
114 |
+
</xsd:complexType>
|
115 |
+
<xsd:element type="tns:ArrayOfKeyValueOfstringArrayOfTrackingResultmFAkxlpY" name="ArrayOfKeyValueOfstringArrayOfTrackingResultmFAkxlpY" nillable="true"/>
|
116 |
+
</xsd:schema>
|
117 |
+
<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">
|
118 |
+
<xs:element type="xs:anyType" name="anyType" nillable="true"/>
|
119 |
+
<xs:element type="xs:anyURI" name="anyURI" nillable="true"/>
|
120 |
+
<xs:element type="xs:base64Binary" name="base64Binary" nillable="true"/>
|
121 |
+
<xs:element type="xs:boolean" name="boolean" nillable="true"/>
|
122 |
+
<xs:element type="xs:byte" name="byte" nillable="true"/>
|
123 |
+
<xs:element type="xs:dateTime" name="dateTime" nillable="true"/>
|
124 |
+
<xs:element type="xs:decimal" name="decimal" nillable="true"/>
|
125 |
+
<xs:element type="xs:double" name="double" nillable="true"/>
|
126 |
+
<xs:element type="xs:float" name="float" nillable="true"/>
|
127 |
+
<xs:element type="xs:int" name="int" nillable="true"/>
|
128 |
+
<xs:element type="xs:long" name="long" nillable="true"/>
|
129 |
+
<xs:element type="xs:QName" name="QName" nillable="true"/>
|
130 |
+
<xs:element type="xs:short" name="short" nillable="true"/>
|
131 |
+
<xs:element type="xs:string" name="string" nillable="true"/>
|
132 |
+
<xs:element type="xs:unsignedByte" name="unsignedByte" nillable="true"/>
|
133 |
+
<xs:element type="xs:unsignedInt" name="unsignedInt" nillable="true"/>
|
134 |
+
<xs:element type="xs:unsignedLong" name="unsignedLong" nillable="true"/>
|
135 |
+
<xs:element type="xs:unsignedShort" name="unsignedShort" nillable="true"/>
|
136 |
+
<xs:element type="tns:char" name="char" nillable="true"/>
|
137 |
+
<xs:simpleType name="char">
|
138 |
+
<xs:restriction base="xs:int"/>
|
139 |
+
</xs:simpleType>
|
140 |
+
<xs:element type="tns:duration" name="duration" nillable="true"/>
|
141 |
+
<xs:simpleType name="duration">
|
142 |
+
<xs:restriction base="xs:duration">
|
143 |
+
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
|
144 |
+
<xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
|
145 |
+
<xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
|
146 |
+
</xs:restriction>
|
147 |
+
</xs:simpleType>
|
148 |
+
<xs:element type="tns:guid" name="guid" nillable="true"/>
|
149 |
+
<xs:simpleType name="guid">
|
150 |
+
<xs:restriction base="xs:string">
|
151 |
+
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
|
152 |
+
</xs:restriction>
|
153 |
+
</xs:simpleType>
|
154 |
+
<xs:attribute type="xs:QName" name="FactoryType"/>
|
155 |
+
<xs:attribute type="xs:ID" name="Id"/>
|
156 |
+
<xs:attribute type="xs:IDREF" name="Ref"/>
|
157 |
+
</xs:schema>
|
158 |
+
</wsdl:types>
|
159 |
+
<wsdl:message name="ShipmentTrackingRequest">
|
160 |
+
<wsdl:part name="parameters" element="tns:ShipmentTrackingRequest"/>
|
161 |
+
</wsdl:message>
|
162 |
+
<wsdl:message name="ShipmentTrackingResponse">
|
163 |
+
<wsdl:part name="parameters" element="tns:ShipmentTrackingResponse"/>
|
164 |
+
</wsdl:message>
|
165 |
+
<wsdl:portType name="Service_1_0">
|
166 |
+
<wsdl:operation name="TrackShipments">
|
167 |
+
<wsdl:input name="ShipmentTrackingRequest" message="tns:ShipmentTrackingRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/TrackShipments"/>
|
168 |
+
<wsdl:output name="ShipmentTrackingResponse" message="tns:ShipmentTrackingResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/TrackShipmentsResponse"/>
|
169 |
+
</wsdl:operation>
|
170 |
+
</wsdl:portType>
|
171 |
+
<wsdl:service name="Service_1_0">
|
172 |
+
<wsdl:port name="BasicHttpBinding_Service_1_0" binding="i0:BasicHttpBinding_Service_1_0">
|
173 |
+
<soap:address location="http://ws.aramex.net/shippingapi/tracking/service_1_0.svc"/>
|
174 |
+
</wsdl:port>
|
175 |
+
</wsdl:service>
|
176 |
+
</wsdl:definitions>
|