netsolutions_checkdelivery - Version 1.0.0

Version Notes

Clear Cache after installation

Download this release

Release Info

Developer Netsol
Extension netsolutions_checkdelivery
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (23) hide show
  1. app/code/community/Netsolutions/Checkdelivery/Block/Adminhtml/System/Config/Exportbutton.php +22 -0
  2. app/code/community/Netsolutions/Checkdelivery/Block/Checkdelivery.php +18 -0
  3. app/code/community/Netsolutions/Checkdelivery/Helper/Data.php +6 -0
  4. app/code/community/Netsolutions/Checkdelivery/Model/Checkdelivery.php +12 -0
  5. app/code/community/Netsolutions/Checkdelivery/Model/Csv.php +9 -0
  6. app/code/community/Netsolutions/Checkdelivery/Model/Mysql4/Checkdelivery.php +154 -0
  7. app/code/community/Netsolutions/Checkdelivery/Model/Mysql4/Checkdelivery/Collection.php +9 -0
  8. app/code/community/Netsolutions/Checkdelivery/Model/System/Config/Source/Dropdown/Values.php +20 -0
  9. app/code/community/Netsolutions/Checkdelivery/controllers/Adminhtml/ExportcsvController.php +66 -0
  10. app/code/community/Netsolutions/Checkdelivery/controllers/IndexController.php +233 -0
  11. app/code/community/Netsolutions/Checkdelivery/etc/adminhtml.xml +35 -0
  12. app/code/community/Netsolutions/Checkdelivery/etc/config.xml +106 -0
  13. app/code/community/Netsolutions/Checkdelivery/etc/system.xml +197 -0
  14. app/code/community/Netsolutions/Checkdelivery/sql/checkdelivery_setup/mysql4-install-0.1.0.php +13 -0
  15. app/design/frontend/base/default/layout/checkdelivery.xml +16 -0
  16. app/design/frontend/base/default/template/checkdelivery/checkdelivery.phtml +41 -0
  17. app/etc/modules/Netsolutions_Checkdelivery.xml +10 -0
  18. lib/Checkdelivery/CountryService_v2.wsdl +271 -0
  19. lib/Checkdelivery/fedex-common.php +239 -0
  20. lib/Checkdelivery/fedextransactions.log +35 -0
  21. package.xml +18 -0
  22. skin/frontend/base/default/css/checkdelivery/style.css +6 -0
  23. skin/frontend/base/default/images/ajax-loader-2.gif +0 -0
app/code/community/Netsolutions/Checkdelivery/Block/Adminhtml/System/Config/Exportbutton.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netsolutions_Checkdelivery_Block_Adminhtml_System_Config_Exportbutton extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+
8
+ $this->setElement($element);
9
+ //$url = $this->getUrl('checkdelivery_catalog/product'); //
10
+ $url = Mage::helper("adminhtml")->getUrl("checkdelivery/adminhtml_exportcsv/exportdata");
11
+ $html = $this->getLayout()->createBlock('adminhtml/widget_button')
12
+ ->setType('button')
13
+ ->setClass('scalable')
14
+ ->setLabel('Export csv !')
15
+ ->setOnClick("setLocation('$url')")
16
+ ->toHtml();
17
+
18
+ return $html;
19
+ }
20
+ }
21
+ ?>
22
+
app/code/community/Netsolutions/Checkdelivery/Block/Checkdelivery.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netsolutions_Checkdelivery_Block_CheckDelivery extends Mage_Core_Block_Template
3
+ {
4
+ /*public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getCheckdelivery()
10
+ {
11
+ if (!$this->hasData('checkdelivery')) {
12
+ $this->setData('checkdelivery', Mage::registry('checkdelivery'));
13
+ }
14
+ return $this->getData('checkdelivery');
15
+ //return 'neeraj';
16
+
17
+ }*/
18
+ }
app/code/community/Netsolutions/Checkdelivery/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Netsolutions_Checkdelivery_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/community/Netsolutions/Checkdelivery/Model/Checkdelivery.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Netsolutions_Checkdelivery_Model_Checkdelivery extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct(){
6
+
7
+ $this->_init("checkdelivery/checkdelivery");
8
+
9
+ }
10
+
11
+ }
12
+
app/code/community/Netsolutions/Checkdelivery/Model/Csv.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Netsolutions_Checkdelivery_Model_Csv extends Mage_Core_Model_Config_Data{
4
+
5
+ public function save(){
6
+ Mage::getResourceModel('checkdelivery/checkdelivery')->uploadAndImport($this);
7
+ }
8
+
9
+ }
app/code/community/Netsolutions/Checkdelivery/Model/Mysql4/Checkdelivery.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netsolutions_Checkdelivery_Model_Mysql4_Checkdelivery extends Mage_Core_Model_Resource_Db_Abstract{
3
+
4
+ /**initiate the database (table name and
5
+ * the checkdelivery id(primery key)) **/
6
+ protected function _construct()
7
+ {
8
+ $this->_init('checkdelivery/checkdelivery', 'checkdelivery_id');
9
+ }
10
+
11
+ /**
12
+ * Upload checkdelivery file and import data from it
13
+ *
14
+ * @param Varien_Object $object
15
+ * @throws Mage_Core_Exception
16
+ * @return Netsolutions_Checkdelivery_Model_Mysql4_Checkdelivery
17
+ */
18
+ public function uploadAndImport(Varien_Object $object){
19
+
20
+ if(empty($_FILES['groups']['tmp_name']['nsi_csv_grp']['fields']['import']['value'])){
21
+ return $this;
22
+ }
23
+ $csvFile = $_FILES['groups']['tmp_name']['nsi_csv_grp']['fields']['import']['value'];
24
+
25
+ $this->_importErrors = array();
26
+
27
+ $this->_importedRows = 0;
28
+
29
+ $io = new Varien_Io_File();
30
+
31
+ $info = pathinfo($csvFile);
32
+
33
+ $io->open(array('path'=>$info['dirname']));
34
+
35
+ $io->streamOpen($info['basename'],'r');
36
+
37
+ // check and skip headers
38
+ $headers = $io->streamReadCsv();
39
+
40
+ if($headers === false || count($headers) < 2){
41
+ $io->streamClose();
42
+ Mage::throwException(Mage::Helper('checkdelivery')->__('Invalid Check delivery CSV File Format'));
43
+ }
44
+
45
+
46
+ $adapter = $this->_getWriteAdapter();
47
+ $adapter->beginTransaction();
48
+
49
+ try {
50
+ $rowNumber = 1;
51
+ $importData = array();
52
+
53
+
54
+ while (false !== ($csvLine = $io->streamReadCsv())) {
55
+ $rowNumber ++;
56
+
57
+ if (empty($csvLine)) {
58
+ continue;
59
+ }
60
+
61
+ $row = $this->_getImportRow($csvLine, $rowNumber);
62
+ if ($row !== false) {
63
+ $importData[] = $row;
64
+ }
65
+
66
+ if (count($importData) == 5000) {
67
+ $this->_saveImportData($importData);
68
+ $importData = array();
69
+ }
70
+ }
71
+ $this->_saveImportData($importData);
72
+ $io->streamClose();
73
+ } catch (Mage_Core_Exception $e) {
74
+ $adapter->rollback();
75
+ $io->streamClose();
76
+ Mage::throwException($e->getMessage());
77
+ } catch (Exception $e) {
78
+ $adapter->rollback();
79
+ $io->streamClose();
80
+ Mage::logException($e);
81
+ Mage::throwException(Mage::helper('checkdelivery')->__('An error occurred while import zip code csv.'));
82
+ }
83
+
84
+ $adapter->commit();
85
+
86
+ if ($this->_importErrors) {
87
+ $error = Mage::helper('checkdelivery')->__('CSV has not been imported. See the following list of errors: %s', implode(" \n", $this->_importErrors));
88
+ Mage::throwException($error);
89
+ }
90
+
91
+ return $this;
92
+ }
93
+
94
+ /**
95
+ * Validate row for import and return check delivery array or false
96
+ * Error will be add to _importErrors array
97
+ *
98
+ * @param array $row
99
+ * @param int $rowNumber
100
+ * @return array|false
101
+ */
102
+ protected function _getImportRow($row, $rowNumber = 0)
103
+ {
104
+ // validate row
105
+ if (count($row) < 1) {
106
+ $this->_importErrors[] = Mage::helper('checkdelivery')->__('Invalid CSV file format in the Row #%s', $rowNumber);
107
+ return false;
108
+ }
109
+
110
+ // strip whitespace from the beginning and end of each row
111
+ foreach ($row as $k => $v) {
112
+ $row[$k] = trim($v);
113
+ }
114
+
115
+
116
+ if($row[0] != ''){
117
+ $sku = $row[0];
118
+ }
119
+
120
+ // detect zip code
121
+ if ($row[1] == '*') {
122
+ $zipCode = '*';
123
+ }
124
+ else if($row[1] == ''){
125
+ $zipCode = '';
126
+ }
127
+ else {
128
+ $zipCode = $row[1];
129
+ }
130
+
131
+
132
+ return array(
133
+ $sku, // sku
134
+ $zipCode, // zipcode
135
+ );
136
+ }
137
+
138
+ /**
139
+ * Save import data batch
140
+ *
141
+ * @param array $data
142
+ * @return Netsolutions_Checkdelivery_Model_Mysql4_Checkdelivery
143
+ */
144
+ protected function _saveImportData(array $data)
145
+ {
146
+ if (!empty($data)) {
147
+ $columns = array('sku', 'zipcode');
148
+ $this->_getWriteAdapter()->insertArray($this->getMainTable(), $columns, $data);
149
+ $this->_importedRows += count($data);
150
+ }
151
+
152
+ return $this;
153
+ }
154
+ }
app/code/community/Netsolutions/Checkdelivery/Model/Mysql4/Checkdelivery/Collection.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Netsolutions_Checkdelivery_Model_Mysql4_Checkdelivery_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct(){
6
+ $this->_init("checkdelivery/checkdelivery");
7
+ }
8
+ }
9
+
app/code/community/Netsolutions/Checkdelivery/Model/System/Config/Source/Dropdown/Values.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Netsolutions_Checkdelivery_Model_System_Config_Source_Dropdown_Values
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array(
9
+ 'value' => 'csv',
10
+ 'label' => 'Using CSV',
11
+ ),
12
+ array(
13
+ 'value' => 'api',
14
+ 'label' => 'Using API',
15
+ ),
16
+ );
17
+ }
18
+
19
+ }
20
+ ?>
app/code/community/Netsolutions/Checkdelivery/controllers/Adminhtml/ExportcsvController.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Netsolutions_Checkdelivery_Adminhtml_ExportcsvController extends Mage_Adminhtml_Controller_Action {
4
+
5
+ /**initiate the database (table name and
6
+ * the checkdelivery id(primery key)) **/
7
+
8
+ public function exportdataAction(){
9
+ //specify csv name
10
+ $fileName = 'manifest_upload_'.Mage::getSingleton('core/date')->date('d-m-Y_H-i-s').'_csv.csv';
11
+
12
+ //$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
13
+ //get product collections
14
+ $_productCollection = Mage::getModel('catalog/product')
15
+ ->getCollection()
16
+ ->addAttributeToSort('created_at', 'DESC')
17
+ ->addAttributeToSelect('*')
18
+ ->load();
19
+ //call checkdelivery collections
20
+ $zipcollections = Mage::getModel('checkdelivery/checkdelivery')->getCollection();
21
+
22
+
23
+ $csv = '';
24
+ $_columns = array(
25
+ "sku",
26
+ "zip_code",
27
+
28
+ );
29
+
30
+ $data = array();
31
+ foreach ($_columns as $column)
32
+ {
33
+ $data[] = '"'.$column.'"';
34
+ }
35
+ $csv .= implode(',', $data)."\n";
36
+ $WithVal = array();
37
+ foreach($zipcollections as $row){
38
+
39
+ $data = array();
40
+ $data[] = $row->getData('sku');
41
+ $data[] = $row->getData('zipcode');
42
+
43
+ $csv .= implode(',', $data)."\n";
44
+ if(!in_array($row->getData('sku'), $WithVal)){
45
+
46
+ $WithVal[]=$row->getData('sku');
47
+
48
+ }
49
+ }
50
+
51
+ foreach($_productCollection as $products){
52
+ if(!in_array($products->getId(), $WithVal)){
53
+ $data = array();
54
+ $data[] = $products->getSku();
55
+ //$data[] = $products['zipcode'];
56
+ $csv .= implode(',', $data)."\n";
57
+ }
58
+ }
59
+ //to prepare csv file to be downloadble
60
+ $this->_prepareDownloadResponse($fileName, $csv);
61
+
62
+ }
63
+
64
+ }
65
+
66
+ ?>
app/code/community/Netsolutions/Checkdelivery/controllers/IndexController.php ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*check zip code avaibelity from db and return the response*/
4
+
5
+ class Netsolutions_Checkdelivery_IndexController extends Mage_Core_Controller_Front_Action
6
+ {
7
+ public function indexAction() {
8
+ /*get checkdelivery store config data */
9
+ $zip = $this->getRequest()->getParam('zipcode');
10
+ $sku = $this->getRequest()->getParam('sku');
11
+ $success = Mage::getStoreConfig('checkdelivery/nsi_general_grp/success_messgae');
12
+ $failure = Mage::getStoreConfig('checkdelivery/nsi_general_grp/failure_messgae');
13
+ $empty = Mage::getStoreConfig('checkdelivery/nsi_general_grp/empty_messgae');
14
+ $actionType = Mage::getStoreConfig('checkdelivery/nsi_general_grp/dropdown');
15
+ $fedExLicenceKey = Mage::getStoreConfig('checkdelivery/nsi_fedex_api_grp/fedex_licence');
16
+ $fedExAccountNo = Mage::getStoreConfig('checkdelivery/nsi_fedex_api_grp/fedex_accountno');
17
+ $fedExPassword = Mage::getStoreConfig('checkdelivery/nsi_fedex_api_grp/fedex_password');
18
+ $fedExMeter = Mage::getStoreConfig('checkdelivery/nsi_fedex_api_grp/fedex_meter');
19
+ $allowedCountryType = Mage::getStoreConfig('checkdelivery/nsi_fedex_api_grp/sallowspecific');
20
+ $allowedCountryName = Mage::getStoreConfig('checkdelivery/nsi_fedex_api_grp/specificcountry');
21
+ $enableApi = Mage::getStoreConfig('checkdelivery/nsi_fedex_api_grp/active');
22
+ $enableCSV = Mage::getStoreConfig('checkdelivery/nsi_csv_grp/active');
23
+ $countryCodeArray = explode(",", $allowedCountryName);
24
+ /*get zip code using API code*/
25
+
26
+ /*to get country code on the basis of input postal code*/
27
+ $postcode = $zip;
28
+ if($postcode)
29
+ {
30
+ $address = urlencode($postcode);
31
+ $url='http://maps.googleapis.com/maps/api/geocode/json?address='.$address.'&sensor=false';
32
+
33
+ $ch = curl_init();
34
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
35
+ curl_setopt($ch, CURLOPT_URL, $url);
36
+ $data = curl_exec($ch);
37
+ curl_close($ch);
38
+ $source = $data;
39
+ $obj = json_decode($source);
40
+ $lat = $obj->results[0]->geometry->location->lat;
41
+ $long = $obj->results[0]->geometry->location->lng;
42
+ }
43
+ $longitude=$long;
44
+ $latitude=$lat;
45
+ $var = json_decode($source);
46
+ $countryData = $var->results[0]->address_components;
47
+ foreach($countryData as $country){
48
+ //echo "<pre>";print_r($country);
49
+ if($allowedCountryType == '0'){
50
+ if($country->types[0]=='country'){
51
+ $shortName = $country->short_name;
52
+ }
53
+ else{
54
+ continue;
55
+ }
56
+ }
57
+ elseif($allowedCountryType == '1' && in_array($country->short_name, $countryCodeArray)){
58
+ $shortName = $country->short_name;
59
+ }
60
+ }
61
+
62
+ /*include liebrary files (fedex comman liebrary files and soap wsdl files)*/
63
+ require_once(Mage::getBaseDir('lib') . '/Checkdelivery/fedex-common.php');
64
+ $path_to_wsdl = Mage::getBaseDir('lib')."/Checkdelivery/CountryService_v2.wsdl";
65
+ ini_set("soap.wsdl_cache_enabled", "0");
66
+
67
+ $client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer to http://us3.php.net/manual/en/ref.soap.php for more information
68
+
69
+ $request['WebAuthenticationDetail'] = array(
70
+ 'UserCredential' => array(
71
+ 'Key' => $fedExLicenceKey, // Replace 'XXX' and 'YYY' with FedEx provided credentials
72
+ 'Password' => $fedExPassword
73
+ )
74
+ );
75
+ $request['ClientDetail'] = array(
76
+ 'AccountNumber' => $fedExAccountNo, // Replace 'XXX' with your account and meter number
77
+ 'MeterNumber' => $fedExMeter
78
+ );
79
+ $request['TransactionDetail'] = array('CustomerTransactionId' => '*** PostalCodeInquiry Request using PHP ***');
80
+ $request['Version'] = array(
81
+ 'ServiceId' => 'cnty',
82
+ 'Major' => '2',
83
+ 'Intermediate' => '0',
84
+ 'Minor' => '0'
85
+ );
86
+ $request['CarrierCode'] = 'FXFR'; // valid values FDXC(Cargo), FDXE(Express), FDXG(Ground), FDCC(Custom Critical), FXFR(Freight)
87
+ $request['PostalCode'] = $zip;
88
+ $request['CountryCode'] = $shortName;
89
+
90
+ /*Validate requested zip code with FEDEX api*/
91
+
92
+ if(setEndpoint('changeEndpoint')){
93
+ $newLocation = $client->__setLocation(setEndpoint('endpoint'));
94
+ }
95
+ /*end api code*/
96
+
97
+ /**start csv code*/
98
+
99
+ $collections = Mage::getModel('checkdelivery/checkdelivery')->getCollection();
100
+ $i=0;
101
+ foreach($collections as $data){
102
+ $checkdelivey[$data->getData('sku')][$i] = $data->getData('zipcode');
103
+
104
+ $i++;
105
+ }
106
+
107
+ $trimedZip = trim($zip);
108
+
109
+ /*end csv code*/
110
+
111
+ if($enableApi == 1 and $enableCSV == 1){
112
+ if(isset($trimedZip) && !empty($trimedZip)){
113
+ $avalAllLocation = '*';
114
+ if(in_array($avalAllLocation,$checkdelivey[$sku]) || in_array($trimedZip,$checkdelivey[$sku])){
115
+ if($response1 -> HighestSeverity != 'FAILURE' && $response1 -> HighestSeverity != 'ERROR'){
116
+ $response['message'] = $success;
117
+ $response['color'] = 'green';
118
+ }
119
+ }
120
+ else if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬-]/', $trimedZip)){
121
+ $response['message'] = "Special character is not allowed";
122
+ $response['color'] = 'red';
123
+ }
124
+ else if(strlen($trimedZip) == 0){
125
+
126
+ $response['message'] = $empty;
127
+ $response['color'] = 'orange';
128
+ }
129
+ else{
130
+ $response['message'] = $failure;
131
+ $response['color'] = 'red';
132
+
133
+ }
134
+ }
135
+ else{
136
+ $response['message'] = $empty;
137
+ $response['color'] = 'red';
138
+ }
139
+ echo json_encode($response);
140
+ }
141
+
142
+ //echo "<pre>";print_r($countryCodeArray);
143
+
144
+ /*get check delivery data and response by selected option Fedex API form Strore config.*/
145
+ else if($enableApi == 1 and $enableCSV == 0){
146
+ // echo 1;die;
147
+ $response1 = $client ->postalCodeInquiry($request);
148
+ if(isset($zip) && !empty($zip)){
149
+ if ($response1 -> HighestSeverity != 'FAILURE' && $response1 -> HighestSeverity != 'ERROR'){
150
+ $response['message'] = $success;
151
+ $response['color'] = 'green';
152
+
153
+ }
154
+
155
+ else if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬-]/', $zip)){
156
+ $response['message'] = "Special character is not allowed";
157
+ $response['color'] = 'red';
158
+ }
159
+
160
+ else if(strlen(trim($zip)) == 0){
161
+ $response['message'] = $empty;
162
+ $response['color'] = 'red';
163
+ }
164
+ else{
165
+ $response['message'] = $failure;
166
+ $response['color'] = 'red';
167
+ }
168
+ }
169
+
170
+ else{
171
+ $response['message'] = $empty;
172
+ $response['color'] = 'orange';
173
+ }
174
+
175
+
176
+ echo json_encode($response);
177
+ }
178
+ /*get check delivery data and response by selected option Fedex API form Strore config.*/
179
+ else if($enableCSV == 1 && $enableApi == 0){
180
+ //die('asdas');die;
181
+ if(isset($trimedZip) && !empty($trimedZip)){
182
+ $avalAllLocation = '*';
183
+ if(in_array($avalAllLocation,$checkdelivey[$sku]) || in_array($trimedZip,$checkdelivey[$sku])){
184
+ $response['message'] = $success;
185
+ $response['color'] = 'green';
186
+ }
187
+ else if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬-]/', $trimedZip)){
188
+ $response['message'] = "Special character is not allowed";
189
+ $response['color'] = 'red';
190
+ }
191
+ else if(strlen($trimedZip) == 0){
192
+
193
+ $response['message'] = $empty;
194
+ $response['color'] = 'red';
195
+ }
196
+ else{
197
+ $response['message'] = $failure;
198
+ $response['color'] = 'red';
199
+
200
+ }
201
+ }
202
+ else{
203
+ $response['message'] = $empty;
204
+ $response['color'] = 'orange';
205
+ }
206
+ echo json_encode($response);
207
+ }
208
+
209
+ else if($enableCSV == "0" and $enableApi == "0"){
210
+ if(isset($zip) && !empty($zip)){
211
+ if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬-]/', $zip)){
212
+ $response['message'] = "Special character is not allowed";
213
+ $response['color'] = 'red';
214
+ }
215
+ else{
216
+ $response['message'] = "Service is inactive";
217
+ $response['color'] = 'red';
218
+ }
219
+ }
220
+ else{
221
+ $response['message'] = $empty;
222
+ $response['color'] = 'red';
223
+ }
224
+
225
+
226
+ echo json_encode($response);
227
+ }
228
+
229
+
230
+ }
231
+ }
232
+
233
+
app/code/community/Netsolutions/Checkdelivery/etc/adminhtml.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <adminhtml>
2
+ <acl>
3
+ <resources>
4
+ <all>
5
+ <title>Allow Everything</title>
6
+ </all>
7
+ <admin>
8
+ <children>
9
+ <Netsolutions_Checkdelivery>
10
+ <title>CheckDelivery Module</title>
11
+ <sort_order>10</sort_order>
12
+ </Netsolutions_Checkdelivery>
13
+ <system>
14
+ <children>
15
+ <config>
16
+ <children>
17
+ <checkdelivery translate="title" module="checkdelivery">
18
+ <title>Netsolutions CheckDelivery Section</title>
19
+ </checkdelivery>
20
+ </children>
21
+ </config>
22
+ </children>
23
+ </system>
24
+ </children>
25
+ </admin>
26
+ </resources>
27
+ </acl>
28
+ <layout>
29
+ <updates>
30
+ <checkdelivery>
31
+ <file>checkdelivery.xml</file>
32
+ </checkdelivery>
33
+ </updates>
34
+ </layout>
35
+ </adminhtml>
app/code/community/Netsolutions/Checkdelivery/etc/config.xml ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Netsolutions_Checkdelivery>
5
+ <version>0.1.0</version>
6
+ </Netsolutions_Checkdelivery>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <checkdelivery>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Netsolutions_Checkdelivery</module>
14
+ <frontName>checkdelivery</frontName>
15
+ </args>
16
+ </checkdelivery>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <checkdelivery>
21
+ <file>checkdelivery.xml</file>
22
+ </checkdelivery>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <admin>
27
+ <routers>
28
+
29
+ <adminhtml>
30
+ <args>
31
+ <checkdelivery>
32
+ <Netsolutions_Checkdelivery before="Mage_Adminhtml">Netsolutions_Checkdelivery_Adminhtml</Netsolutions_Checkdelivery>
33
+ </checkdelivery>
34
+ </args>
35
+ </adminhtml>
36
+ <checkdelivery>
37
+ <use>admin</use>
38
+ <args>
39
+ <module>Netsolutions_Checkdelivery</module>
40
+ <frontName>checkdelivery</frontName>
41
+ </args>
42
+ </checkdelivery>
43
+
44
+
45
+
46
+ </routers>
47
+ </admin>
48
+
49
+ <global>
50
+ <models>
51
+ <checkdelivery>
52
+ <class>Netsolutions_Checkdelivery_Model</class>
53
+ <resourceModel>checkdelivery_mysql4</resourceModel>
54
+ </checkdelivery>
55
+ <checkdelivery_mysql4>
56
+ <class>Netsolutions_Checkdelivery_Model_Mysql4</class>
57
+ <entities>
58
+ <checkdelivery>
59
+ <table>checkdelivery</table>
60
+ </checkdelivery>
61
+ </entities>
62
+ </checkdelivery_mysql4>
63
+ </models>
64
+ <resources>
65
+ <checkdelivery_setup>
66
+ <setup>
67
+ <module>Netsolutions_Checkdelivery</module>
68
+ </setup>
69
+ <connection>
70
+ <use>core_setup</use>
71
+ </connection>
72
+ </checkdelivery_setup>
73
+ <checkdelivery_write>
74
+ <connection>
75
+ <use>core_write</use>
76
+ </connection>
77
+ </checkdelivery_write>
78
+ <checkdelivery_read>
79
+ <connection>
80
+ <use>core_read</use>
81
+ </connection>
82
+ </checkdelivery_read>
83
+ </resources>
84
+ <blocks>
85
+ <checkdelivery>
86
+ <class>Netsolutions_Checkdelivery_Block</class>
87
+ </checkdelivery>
88
+ </blocks>
89
+ <helpers>
90
+ <checkdelivery>
91
+ <class>Netsolutions_Checkdelivery_Helper</class>
92
+ </checkdelivery>
93
+ </helpers>
94
+ </global>
95
+ <default>
96
+ <checkdelivery>
97
+ <general>
98
+ <active>1</active>
99
+ <block_title>Check Delivery Availability</block_title>
100
+ <success_messgae>Delivery possible in your area</success_messgae>
101
+ <failure_messgae>We do not deliver to this location.</failure_messgae>
102
+ <empty_messgae>Please enter Zip Code</empty_messgae>
103
+ </general>
104
+ </checkdelivery>
105
+ </default>
106
+ </config>
app/code/community/Netsolutions/Checkdelivery/etc/system.xml ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <nsi translate="label" module="checkdelivery">
5
+ <label>Netsol - Extensions</label>
6
+ <sort_order>10</sort_order>
7
+ </nsi>
8
+ </tabs>
9
+ <sections>
10
+ <checkdelivery>
11
+ <label>Check Delivery</label>
12
+ <tab>nsi</tab>
13
+ <class>Netsolutions-checkdelivery</class>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>150</sort_order>
16
+ <show_in_default>1</show_in_default>
17
+ <show_in_website>1</show_in_website>
18
+ <show_in_store>1</show_in_store>
19
+ <groups>
20
+ <nsi_general_grp translate="label">
21
+ <label>General</label>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>0</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <fields>
28
+ <active translate="label">
29
+ <label>Enable Module</label>
30
+ <frontend_type>select</frontend_type>
31
+ <source_model>adminhtml/system_config_source_yesno</source_model>
32
+ <sort_order>1</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ </active>
37
+
38
+ <success_messgae translate="label">
39
+ <label>Success Message</label>
40
+ <frontend_type>text</frontend_type>
41
+ <comment>Default: Delivery possible in your area</comment>
42
+ <sort_order>4</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>1</show_in_store>
46
+ </success_messgae>
47
+
48
+ <failure_messgae translate="label">
49
+ <label>Failure Message</label>
50
+ <frontend_type>text</frontend_type>
51
+ <comment>Default: We do not deliver to this location. </comment>
52
+ <sort_order>5</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>1</show_in_store>
56
+ </failure_messgae>
57
+
58
+ <empty_messgae translate="label">
59
+ <label>Empty Message</label>
60
+ <frontend_type>text</frontend_type>
61
+ <comment>Default: Please enter zip code </comment>
62
+ <sort_order>6</sort_order>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>1</show_in_website>
65
+ <show_in_store>1</show_in_store>
66
+ </empty_messgae>
67
+ </fields>
68
+ </nsi_general_grp>
69
+ </groups>
70
+ <groups>
71
+ <nsi_csv_grp translate="label">
72
+ <label>Using CSV</label>
73
+ <frontend_type>text</frontend_type>
74
+ <sort_order>1</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <show_in_store>1</show_in_store>
78
+ <fields>
79
+ <active translate="label">
80
+ <label>Enable CSV</label>
81
+ <frontend_type>select</frontend_type>
82
+ <source_model>adminhtml/system_config_source_yesno</source_model>
83
+ <sort_order>1</sort_order>
84
+ <show_in_default>1</show_in_default>
85
+ <show_in_website>1</show_in_website>
86
+ <show_in_store>1</show_in_store>
87
+ </active>
88
+ <export translate="label">
89
+ <label>Export CSV</label>
90
+ <sort_order>1</sort_order>
91
+ <type>button</type>
92
+ <show_in_default>1</show_in_default>
93
+ <show_in_website>1</show_in_website>
94
+ <show_in_store>1</show_in_store>
95
+ <frontend_model>checkdelivery/adminhtml_system_config_exportbutton</frontend_model>
96
+ </export>
97
+ <import translate="label">
98
+ <label>Import CSV</label>
99
+ <frontend_type>import</frontend_type>
100
+ <backend_model>checkdelivery/csv</backend_model>
101
+ <sort_order>2</sort_order>
102
+ <show_in_default>1</show_in_default>
103
+ <show_in_website>1</show_in_website>
104
+ <show_in_store>1</show_in_store>
105
+
106
+ </import>
107
+ </fields>
108
+ </nsi_csv_grp>
109
+ </groups>
110
+ <groups>
111
+ <nsi_fedex_api_grp translate="label">
112
+ <label>Using Fedex API</label>
113
+ <frontend_type>text</frontend_type>
114
+ <sort_order>2</sort_order>
115
+ <show_in_default>1</show_in_default>
116
+ <show_in_website>1</show_in_website>
117
+ <show_in_store>1</show_in_store>
118
+ <fields>
119
+ <active translate="label">
120
+ <label>Enable API</label>
121
+ <frontend_type>select</frontend_type>
122
+ <source_model>adminhtml/system_config_source_yesno</source_model>
123
+ <sort_order>1</sort_order>
124
+ <show_in_default>1</show_in_default>
125
+ <show_in_website>1</show_in_website>
126
+ <show_in_store>1</show_in_store>
127
+ </active>
128
+ <fedex_licence translate="label">
129
+ <label>Fedex License key</label>
130
+ <frontend_type>password</frontend_type>
131
+ <comment>Hint: Fedex license key</comment>
132
+ <sort_order>1</sort_order>
133
+ <show_in_default>1</show_in_default>
134
+ <show_in_website>1</show_in_website>
135
+ <show_in_store>1</show_in_store>
136
+
137
+ </fedex_licence>
138
+
139
+ <fedex_accountno translate="label">
140
+ <label>Fedex account no</label>
141
+ <frontend_type>text</frontend_type>
142
+ <comment>Hint: Fedex account no</comment>
143
+ <sort_order>2</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+
148
+ </fedex_accountno>
149
+ <fedex_password translate="label">
150
+ <label>Fedex password</label>
151
+ <frontend_type>password</frontend_type>
152
+ <comment>Hint: Fedex password</comment>
153
+ <sort_order>3</sort_order>
154
+ <show_in_default>1</show_in_default>
155
+ <show_in_website>1</show_in_website>
156
+ <show_in_store>1</show_in_store>
157
+
158
+ </fedex_password>
159
+
160
+ <fedex_meter translate="label">
161
+ <label>Fedex Meter no</label>
162
+ <frontend_type>text</frontend_type>
163
+ <comment>Hint: Fedex meter no</comment>
164
+ <sort_order>4</sort_order>
165
+ <show_in_default>1</show_in_default>
166
+ <show_in_website>1</show_in_website>
167
+ <show_in_store>1</show_in_store>
168
+
169
+ </fedex_meter>
170
+
171
+ <sallowspecific translate="label">
172
+ <label>Fedex Check Applicable Countries</label>
173
+ <frontend_type>select</frontend_type>
174
+ <sort_order>5</sort_order>
175
+ <frontend_class>shipping-applicable-country</frontend_class>
176
+ <source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
177
+ <show_in_default>1</show_in_default>
178
+ <show_in_website>1</show_in_website>
179
+ <show_in_store>1</show_in_store>
180
+
181
+ </sallowspecific>
182
+ <specificcountry translate="label">
183
+ <label>Fedex check Specific Countries</label>
184
+ <frontend_type>multiselect</frontend_type>
185
+ <sort_order>6</sort_order>
186
+ <source_model>adminhtml/system_config_source_country</source_model>
187
+ <show_in_default>1</show_in_default>
188
+ <show_in_website>1</show_in_website>
189
+ <show_in_store>1</show_in_store>
190
+ <can_be_empty>1</can_be_empty>
191
+ </specificcountry>
192
+ </fields>
193
+ </nsi_fedex_api_grp>
194
+ </groups>
195
+ </checkdelivery>
196
+ </sections>
197
+ </config>
app/code/community/Netsolutions/Checkdelivery/sql/checkdelivery_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->run("DROP TABLE IF EXISTS {$this->getTable('checkdelivery')};
5
+ CREATE TABLE {$this->getTable('checkdelivery')} (
6
+ `checkdelivery_id` int(11) unsigned NOT NULL auto_increment,
7
+ `sku` varchar(255) NOT NULL,
8
+ `zipcode` varchar(255) NOT NULL default '',
9
+ PRIMARY KEY (`checkdelivery_id`)
10
+ ) Engine = InnoDB DEFAULT CHARSET=utf8;
11
+ ");
12
+ $installer->endSetup();
13
+ ?>
app/design/frontend/base/default/layout/checkdelivery.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <catalog_product_view>
4
+ <reference name="head">
5
+ <action method="addCss" ifconfig="checkdelivery/nsi_general_grp/active" ><stylesheet>css/checkdelivery/style.css</stylesheet></action>
6
+ </reference>
7
+ <reference name="content">
8
+ <!--<block type="checkdelivery/checkdelivery" name="checkdelivery.checkdelivery" template="checkdelivery/checkdelivery.phtml"/>-->
9
+ <block type="checkdelivery/checkdelivery" name="checkdelivery.checkdelivery">
10
+ <action method="setTemplate" ifconfig="checkdelivery/nsi_general_grp/active">
11
+ <template>checkdelivery/checkdelivery.phtml</template>
12
+ </action>
13
+ </block>
14
+ </reference>
15
+ </catalog_product_view>
16
+ </layout>
app/design/frontend/base/default/template/checkdelivery/checkdelivery.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php echo Mage::registry('product')->getSku();?>
2
+ <div class="block block-list block-check-delivery">
3
+ <div class="block-title">
4
+ <strong><span><?php echo $this->__($blockLabel) ?></span></strong>
5
+ </div>
6
+ <div class="block-content" >
7
+ <p><strong><font color="red"><?php echo $this->__('Check product avaibelity');?></font></strong></p>
8
+ <br>
9
+ <input name="zipcode" size="17" type="text" id="zipcode" maxlength="10" class="input-text" placeholder="<?php echo $this->__('Enter ZIP Code'); ?>"/>
10
+
11
+ <div id="loading_checkDel" class="loading_checkDel" style="display:none;"><img src="<?php echo $this->getSkinUrl('images/ajax-loader-2.gif');?>"></div>
12
+
13
+
14
+ <input type="hidden" name="sku" id="sku" value="<?php echo Mage::registry('product')->getSku();?>"/>
15
+ <button type="button" name="zip-check" title="Check" class="button" id="zip-check" ><span><span><?php echo $this->__('Check'); ?></span></span></button>
16
+ <div id="delivery-message"></div>
17
+ <?php $defaultHtml = Mage::getStoreConfig('checkdelivery/general/default_html'); ?>
18
+ <div id="delivery-html"><?php echo $defaultHtml ?></div>
19
+
20
+ <br>
21
+ </div>
22
+ </div>
23
+ <script>
24
+ $j = jQuery.noConflict();
25
+ Event.observe('zip-check', 'click', function(event){
26
+ $j('.loading_checkDel').show();
27
+
28
+ new Ajax.Request("<?php echo $this->getUrl('checkdelivery/index/index') ?>", {
29
+
30
+ method: "get",
31
+ parameters: {zipcode : $('zipcode').value,sku : $('sku').value },
32
+ onSuccess: function(transport) {
33
+ $j('.loading_checkDel').hide();
34
+ var json = transport.responseText.evalJSON();
35
+ $('delivery-message').update(json.message);
36
+ $('delivery-message').setStyle({color: json.color});
37
+ $('delivery-html').update(json.html);
38
+ }
39
+ });
40
+ });
41
+ </script>
app/etc/modules/Netsolutions_Checkdelivery.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Netsolutions_Checkdelivery>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>0.1.0</version>
8
+ </Netsolutions_Checkdelivery>
9
+ </modules>
10
+ </config>
lib/Checkdelivery/CountryService_v2.wsdl ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://fedex.com/ws/cnty/v2" xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://fedex.com/ws/cnty/v2" name="CountryServiceDefinitions">
2
+ <types>
3
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://fedex.com/ws/cnty/v2">
4
+ <xs:element name="PostalCodeInquiryReply" type="ns:PostalCodeInquiryReply"/>
5
+ <xs:element name="PostalCodeInquiryRequest" type="ns:PostalCodeInquiryRequest"/>
6
+ <xs:complexType name="ClientDetail">
7
+ <xs:annotation>
8
+ <xs:documentation>Descriptive data for the client submitting a transaction.</xs:documentation>
9
+ </xs:annotation>
10
+ <xs:sequence>
11
+ <xs:element name="AccountNumber" type="xs:string" minOccurs="1">
12
+ <xs:annotation>
13
+ <xs:documentation>The FedEx account number associated with this transaction.</xs:documentation>
14
+ </xs:annotation>
15
+ </xs:element>
16
+ <xs:element name="MeterNumber" type="xs:string" minOccurs="1">
17
+ <xs:annotation>
18
+ <xs:documentation>This number is assigned by FedEx and identifies the unique device from which the request is originating</xs:documentation>
19
+ </xs:annotation>
20
+ </xs:element>
21
+ <xs:element name="MeterInstance" type="xs:string" minOccurs="0"/>
22
+ <xs:element name="IntegratorId" type="xs:string" minOccurs="0">
23
+ <xs:annotation>
24
+ <xs:documentation>Only used in transactions which require identification of the FedEx Office integrator.</xs:documentation>
25
+ </xs:annotation>
26
+ </xs:element>
27
+ <xs:element name="Region" type="ns:ExpressRegionCode" minOccurs="0">
28
+ <xs:annotation>
29
+ <xs:documentation>Indicates the region from which the transaction is submitted.</xs:documentation>
30
+ </xs:annotation>
31
+ </xs:element>
32
+ <xs:element name="Localization" type="ns:Localization" minOccurs="0">
33
+ <xs:annotation>
34
+ <xs:documentation>The language to be used for human-readable Notification.localizedMessages in responses to the request containing this ClientDetail object. Different requests from the same client may contain different Localization data. (Contrast with TransactionDetail.localization, which governs data payload language/translation.)</xs:documentation>
35
+ </xs:annotation>
36
+ </xs:element>
37
+ </xs:sequence>
38
+ </xs:complexType>
39
+ <xs:simpleType name="ExpressRegionCode">
40
+ <xs:annotation>
41
+ <xs:documentation>Indicates a FedEx Express operating region.</xs:documentation>
42
+ </xs:annotation>
43
+ <xs:restriction base="xs:string">
44
+ <xs:enumeration value="APAC"/>
45
+ <xs:enumeration value="CA"/>
46
+ <xs:enumeration value="EMEA"/>
47
+ <xs:enumeration value="LAC"/>
48
+ <xs:enumeration value="US"/>
49
+ </xs:restriction>
50
+ </xs:simpleType>
51
+ <xs:complexType name="Localization">
52
+ <xs:annotation>
53
+ <xs:documentation>Identifies the representation of human-readable text.</xs:documentation>
54
+ </xs:annotation>
55
+ <xs:sequence>
56
+ <xs:element name="LanguageCode" type="xs:string" minOccurs="1">
57
+ <xs:annotation>
58
+ <xs:documentation>Two-letter code for language (e.g. EN, FR, etc.)</xs:documentation>
59
+ </xs:annotation>
60
+ </xs:element>
61
+ <xs:element name="LocaleCode" type="xs:string" minOccurs="0">
62
+ <xs:annotation>
63
+ <xs:documentation>Two-letter code for the region (e.g. us, ca, etc..).</xs:documentation>
64
+ </xs:annotation>
65
+ </xs:element>
66
+ </xs:sequence>
67
+ </xs:complexType>
68
+ <xs:complexType name="Notification">
69
+ <xs:annotation>
70
+ <xs:documentation>The descriptive data regarding the result of the submitted transaction.</xs:documentation>
71
+ </xs:annotation>
72
+ <xs:sequence>
73
+ <xs:element name="Severity" type="ns:NotificationSeverityType" minOccurs="0">
74
+ <xs:annotation>
75
+ <xs:documentation>The severity of this notification. This can indicate success or failure or some other information about the request. The values that can be returned are SUCCESS - Your transaction succeeded with no other applicable information. NOTE - Additional information that may be of interest to you about your transaction. WARNING - Additional information that you need to know about your transaction that you may need to take action on. ERROR - Information about an error that occurred while processing your transaction. FAILURE - FedEx was unable to process your transaction at this time due to a system failure. Please try again later</xs:documentation>
76
+ </xs:annotation>
77
+ </xs:element>
78
+ <xs:element name="Source" type="xs:string" minOccurs="0">
79
+ <xs:annotation>
80
+ <xs:documentation>Indicates the source of this notification. Combined with the Code it uniquely identifies this notification</xs:documentation>
81
+ </xs:annotation>
82
+ </xs:element>
83
+ <xs:element name="Code" type="xs:string" minOccurs="0">
84
+ <xs:annotation>
85
+ <xs:documentation>A code that represents this notification. Combined with the Source it uniquely identifies this notification.</xs:documentation>
86
+ </xs:annotation>
87
+ </xs:element>
88
+ <xs:element name="Message" type="xs:string" minOccurs="0">
89
+ <xs:annotation>
90
+ <xs:documentation>Human-readable text that explains this notification.</xs:documentation>
91
+ </xs:annotation>
92
+ </xs:element>
93
+ <xs:element name="LocalizedMessage" type="xs:string" minOccurs="0">
94
+ <xs:annotation>
95
+ <xs:documentation>The translated message. The language and locale specified in the ClientDetail. Localization are used to determine the representation. Currently only supported in a TrackReply.</xs:documentation>
96
+ </xs:annotation>
97
+ </xs:element>
98
+ <xs:element name="MessageParameters" type="ns:NotificationParameter" minOccurs="0" maxOccurs="unbounded">
99
+ <xs:annotation>
100
+ <xs:documentation>A collection of name/value pairs that provide specific data to help the client determine the nature of an error (or warning, etc.) witout having to parse the message string.</xs:documentation>
101
+ </xs:annotation>
102
+ </xs:element>
103
+ </xs:sequence>
104
+ </xs:complexType>
105
+ <xs:complexType name="NotificationParameter">
106
+ <xs:sequence>
107
+ <xs:element name="Id" type="xs:string" minOccurs="0">
108
+ <xs:annotation>
109
+ <xs:documentation>Identifies the type of data contained in Value (e.g. SERVICE_TYPE, PACKAGE_SEQUENCE, etc..).</xs:documentation>
110
+ </xs:annotation>
111
+ </xs:element>
112
+ <xs:element name="Value" type="xs:string" minOccurs="0">
113
+ <xs:annotation>
114
+ <xs:documentation>The value of the parameter (e.g. PRIORITY_OVERNIGHT, 2, etc..).</xs:documentation>
115
+ </xs:annotation>
116
+ </xs:element>
117
+ </xs:sequence>
118
+ </xs:complexType>
119
+ <xs:simpleType name="NotificationSeverityType">
120
+ <xs:restriction base="xs:string">
121
+ <xs:enumeration value="ERROR"/>
122
+ <xs:enumeration value="FAILURE"/>
123
+ <xs:enumeration value="NOTE"/>
124
+ <xs:enumeration value="SUCCESS"/>
125
+ <xs:enumeration value="WARNING"/>
126
+ </xs:restriction>
127
+ </xs:simpleType>
128
+ <xs:complexType name="PostalCodeInquiryReply">
129
+ <xs:sequence>
130
+ <xs:element name="HighestSeverity" type="ns:NotificationSeverityType" minOccurs="1"/>
131
+ <xs:element name="Notifications" type="ns:Notification" minOccurs="1" maxOccurs="unbounded"/>
132
+ <xs:element name="TransactionDetail" type="ns:TransactionDetail" minOccurs="0"/>
133
+ <xs:element name="Version" type="ns:VersionId" minOccurs="1"/>
134
+ <xs:element name="ExpressFreightContractorDeliveryArea" type="xs:boolean" minOccurs="0"/>
135
+ <xs:element name="ExpressDescription" type="ns:PostalCodeServiceAreaDescription" minOccurs="0"/>
136
+ <xs:element name="ExpressFreightDescription" type="ns:PostalCodeServiceAreaDescription" minOccurs="0">
137
+ <xs:annotation>
138
+ <xs:documentation>Only service area field is currently provided for Express Freight.</xs:documentation>
139
+ </xs:annotation>
140
+ </xs:element>
141
+ </xs:sequence>
142
+ </xs:complexType>
143
+ <xs:complexType name="PostalCodeInquiryRequest">
144
+ <xs:sequence>
145
+ <xs:element name="WebAuthenticationDetail" type="ns:WebAuthenticationDetail" minOccurs="1">
146
+ <xs:annotation>
147
+ <xs:documentation>Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services).</xs:documentation>
148
+ </xs:annotation>
149
+ </xs:element>
150
+ <xs:element name="ClientDetail" type="ns:ClientDetail" minOccurs="1"/>
151
+ <xs:element name="TransactionDetail" type="ns:TransactionDetail" minOccurs="0"/>
152
+ <xs:element name="Version" type="ns:VersionId" minOccurs="1"/>
153
+ <xs:element name="ShipDate" type="xs:date" minOccurs="0"/>
154
+ <xs:element name="PostalCode" type="xs:string" minOccurs="0">
155
+ <xs:annotation>
156
+ <xs:documentation>Only used with postal-aware countries.</xs:documentation>
157
+ </xs:annotation>
158
+ </xs:element>
159
+ <xs:element name="CountryCode" type="xs:string" minOccurs="0"/>
160
+ </xs:sequence>
161
+ </xs:complexType>
162
+ <xs:complexType name="PostalCodeServiceAreaDescription">
163
+ <xs:sequence>
164
+ <xs:element name="LocationId" type="xs:string" minOccurs="0"/>
165
+ <xs:element name="StateOrProvinceCode" type="xs:string" minOccurs="0"/>
166
+ <xs:element name="PostalCode" type="xs:string" minOccurs="0"/>
167
+ <xs:element name="ServiceArea" type="xs:string" minOccurs="0"/>
168
+ </xs:sequence>
169
+ </xs:complexType>
170
+ <xs:complexType name="TransactionDetail">
171
+ <xs:sequence>
172
+ <xs:element name="CustomerTransactionId" type="xs:string" minOccurs="0">
173
+ <xs:annotation>
174
+ <xs:documentation>Free form text to be echoed back in the reply. Used to match requests and replies.</xs:documentation>
175
+ </xs:annotation>
176
+ </xs:element>
177
+ <xs:element name="Localization" type="ns:Localization" minOccurs="0">
178
+ <xs:annotation>
179
+ <xs:documentation>Governs data payload language/translations (contrasted with ClientDetail.localization, which governs Notification.localizedMessage language selection).</xs:documentation>
180
+ </xs:annotation>
181
+ </xs:element>
182
+ </xs:sequence>
183
+ </xs:complexType>
184
+ <xs:complexType name="WebAuthenticationDetail">
185
+ <xs:annotation>
186
+ <xs:documentation>Used in authentication of the sender's identity.</xs:documentation>
187
+ </xs:annotation>
188
+ <xs:sequence>
189
+ <xs:element name="UserCredential" type="ns:WebAuthenticationCredential" minOccurs="1">
190
+ <xs:annotation>
191
+ <xs:documentation>Credential used to authenticate a specific software application. This value is provided by FedEx after registration.</xs:documentation>
192
+ </xs:annotation>
193
+ </xs:element>
194
+ </xs:sequence>
195
+ </xs:complexType>
196
+ <xs:complexType name="WebAuthenticationCredential">
197
+ <xs:annotation>
198
+ <xs:documentation>Two part authentication string used for the sender's identity</xs:documentation>
199
+ </xs:annotation>
200
+ <xs:sequence>
201
+ <xs:element name="Key" type="xs:string" minOccurs="1">
202
+ <xs:annotation>
203
+ <xs:documentation>Identifying part of authentication credential. This value is provided by FedEx after registration</xs:documentation>
204
+ </xs:annotation>
205
+ </xs:element>
206
+ <xs:element name="Password" type="xs:string" minOccurs="1">
207
+ <xs:annotation>
208
+ <xs:documentation>Secret part of authentication key. This value is provided by FedEx after registration.</xs:documentation>
209
+ </xs:annotation>
210
+ </xs:element>
211
+ </xs:sequence>
212
+ </xs:complexType>
213
+ <xs:complexType name="VersionId">
214
+ <xs:annotation>
215
+ <xs:documentation>Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply).</xs:documentation>
216
+ </xs:annotation>
217
+ <xs:sequence>
218
+ <xs:element name="ServiceId" type="xs:string" fixed="cnty" minOccurs="1">
219
+ <xs:annotation>
220
+ <xs:documentation>Identifies a system or sub-system which performs an operation.</xs:documentation>
221
+ </xs:annotation>
222
+ </xs:element>
223
+ <xs:element name="Major" type="xs:int" fixed="2" minOccurs="1">
224
+ <xs:annotation>
225
+ <xs:documentation>Identifies the service business level.</xs:documentation>
226
+ </xs:annotation>
227
+ </xs:element>
228
+ <xs:element name="Intermediate" type="xs:int" fixed="0" minOccurs="1">
229
+ <xs:annotation>
230
+ <xs:documentation>Identifies the service interface level.</xs:documentation>
231
+ </xs:annotation>
232
+ </xs:element>
233
+ <xs:element name="Minor" type="xs:int" fixed="0" minOccurs="1">
234
+ <xs:annotation>
235
+ <xs:documentation>Identifies the service code level.</xs:documentation>
236
+ </xs:annotation>
237
+ </xs:element>
238
+ </xs:sequence>
239
+ </xs:complexType>
240
+ </xs:schema>
241
+ </types>
242
+ <message name="PostalCodeInquiryRequest">
243
+ <part name="PostalCodeInquiryRequest" element="ns:PostalCodeInquiryRequest"/>
244
+ </message>
245
+ <message name="PostalCodeInquiryReply">
246
+ <part name="PostalCodeInquiryReply" element="ns:PostalCodeInquiryReply"/>
247
+ </message>
248
+ <portType name="CountryPortType">
249
+ <operation name="postalCodeInquiry" parameterOrder="PostalCodeInquiryRequest">
250
+ <input message="ns:PostalCodeInquiryRequest"/>
251
+ <output message="ns:PostalCodeInquiryReply"/>
252
+ </operation>
253
+ </portType>
254
+ <binding name="CountryServiceSoapBinding" type="ns:CountryPortType">
255
+ <s1:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
256
+ <operation name="postalCodeInquiry">
257
+ <s1:operation soapAction="http://fedex.com/ws/cnty/v2/postalCodeInquiry" style="document"/>
258
+ <input>
259
+ <s1:body use="literal"/>
260
+ </input>
261
+ <output>
262
+ <s1:body use="literal"/>
263
+ </output>
264
+ </operation>
265
+ </binding>
266
+ <service name="CountryService">
267
+ <port name="CountryServicePort" binding="ns:CountryServiceSoapBinding">
268
+ <s1:address location="https://wsbeta.fedex.com:443/web-services/cnty"/>
269
+ </port>
270
+ </service>
271
+ </definitions>
lib/Checkdelivery/fedex-common.php ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Copyright 2009, FedEx Corporation. All rights reserved.
3
+
4
+ /**
5
+ * Print SOAP request and response
6
+ */
7
+ define('Newline',"<br />");
8
+
9
+
10
+ function printSuccess($client, $response) {
11
+ printReply($client, $response);
12
+ }
13
+
14
+ function printReply($client, $response){
15
+ $highestSeverity=$response->HighestSeverity;
16
+ if($highestSeverity=="SUCCESS"){echo '<h2>The transaction was successful.</h2>';}
17
+ if($highestSeverity=="WARNING"){echo '<h2>The transaction returned a warning.</h2>';}
18
+ if($highestSeverity=="ERROR"){echo '<h2>The transaction returned an Error.</h2>';}
19
+ if($highestSeverity=="FAILURE"){echo '<h2>The transaction returned a Failure.</h2>';}
20
+ echo "\n";
21
+ printNotifications($response -> Notifications);
22
+ printRequestResponse($client, $response);
23
+ }
24
+
25
+ function printRequestResponse($client){
26
+ echo '<h2>Request</h2>' . "\n";
27
+ echo '<pre>' . htmlspecialchars($client->__getLastRequest()). '</pre>';
28
+ echo "\n";
29
+
30
+ echo '<h2>Response</h2>'. "\n";
31
+ echo '<pre>' . htmlspecialchars($client->__getLastResponse()). '</pre>';
32
+ echo "\n";
33
+ }
34
+
35
+ /**
36
+ * Print SOAP Fault
37
+ */
38
+ function printFault($exception, $client) {
39
+ echo '<h2>Fault</h2>' . "<br>\n";
40
+ echo "<b>Code:</b>{$exception->faultcode}<br>\n";
41
+ echo "<b>String:</b>{$exception->faultstring}<br>\n";
42
+ writeToLog($client);
43
+
44
+ echo '<h2>Request</h2>' . "\n";
45
+ echo '<pre>' . htmlspecialchars($client->__getLastRequest()). '</pre>';
46
+ echo "\n";
47
+ }
48
+
49
+ /**
50
+ * SOAP request/response logging to a file
51
+ */
52
+ function writeToLog($client){
53
+ /**
54
+ * __DIR__ refers to the directory path of the library file.
55
+ * This location is not relative based on Include/Require.
56
+ */
57
+ if (!$logfile = fopen(__DIR__.'/fedextransactions.log', "a"))
58
+ {
59
+ error_func("Cannot open " . __DIR__.'/fedextransactions.log' . " file.\n", 0);
60
+ exit(1);
61
+ }
62
+ fwrite($logfile, sprintf("\r%s:- %s",date("D M j G:i:s T Y"), $client->__getLastRequest(). "\r\n" . $client->__getLastResponse()."\r\n\r\n"));
63
+ }
64
+
65
+ /**
66
+ * This section provides a convenient place to setup many commonly used variables
67
+ * needed for the php sample code to function.
68
+ */
69
+ function getProperty($var){
70
+ if($var == 'key') Return 'vSjca0wJn4s3Ihvq';
71
+ if($var == 'password') Return 'q5JghKTZWFpxqbw7esWfYyMtY';
72
+ if($var == 'shipaccount') Return '510087020';
73
+ if($var == 'billaccount') Return 'XXX';
74
+ if($var == 'dutyaccount') Return 'XXX';
75
+ if($var == 'freightaccount') Return 'XXX';
76
+ if($var == 'trackaccount') Return 'XXX';
77
+ if($var == 'dutiesaccount') Return 'XXX';
78
+ if($var == 'importeraccount') Return 'XXX';
79
+ if($var == 'brokeraccount') Return 'XXX';
80
+ if($var == 'distributionaccount') Return 'XXX';
81
+ if($var == 'locationid') Return 'PLBA';
82
+ if($var == 'printlabels') Return false;
83
+ if($var == 'printdocuments') Return true;
84
+ if($var == 'packagecount') Return '4';
85
+
86
+ if($var == 'meter') Return '118681523';
87
+
88
+ if($var == 'shiptimestamp') Return mktime(10, 0, 0, date("m"), date("d")+1, date("Y"));
89
+
90
+ if($var == 'spodshipdate') Return '2014-07-21';
91
+ if($var == 'serviceshipdate') Return '2017-07-26';
92
+
93
+ if($var == 'readydate') Return '2014-07-09T08:44:07';
94
+ //if($var == 'closedate') Return date("Y-m-d");
95
+ if($var == 'closedate') Return '2014-07-17';
96
+ if($var == 'pickupdate') Return date("Y-m-d", mktime(8, 0, 0, date("m") , date("d")+1, date("Y")));
97
+ if($var == 'pickuptimestamp') Return mktime(8, 0, 0, date("m") , date("d")+1, date("Y"));
98
+ if($var == 'pickuplocationid') Return 'XXX';
99
+ if($var == 'pickupconfirmationnumber') Return '1';
100
+
101
+ if($var == 'dispatchdate') Return date("Y-m-d", mktime(8, 0, 0, date("m") , date("d")+1, date("Y")));
102
+ if($var == 'dispatchlocationid') Return 'XXX';
103
+ if($var == 'dispatchconfirmationnumber') Return '1';
104
+
105
+ if($var == 'tag_readytimestamp') Return mktime(10, 0, 0, date("m"), date("d")+1, date("Y"));
106
+ if($var == 'tag_latesttimestamp') Return mktime(20, 0, 0, date("m"), date("d")+1, date("Y"));
107
+
108
+ if($var == 'expirationdate') Return date("Y-m-d", mktime(8, 0, 0, date("m"), date("d")+15, date("Y")));
109
+ if($var == 'begindate') Return '2014-07-22';
110
+ if($var == 'enddate') Return '2014-07-25';
111
+
112
+ if($var == 'trackingnumber') Return 'XXX';
113
+
114
+ if($var == 'hubid') Return '5531';
115
+
116
+ if($var == 'jobid') Return 'XXX';
117
+
118
+ if($var == 'searchlocationphonenumber') Return '5555555555';
119
+ if($var == 'customerreference') Return 'Cust_Reference';
120
+
121
+ if($var == 'shipper') Return array(
122
+ 'Contact' => array(
123
+ 'PersonName' => 'Sender Name',
124
+ 'CompanyName' => 'Sender Company Name',
125
+ 'PhoneNumber' => '1234567890'
126
+ ),
127
+ 'Address' => array(
128
+ 'StreetLines' => array('Address Line 1'),
129
+ 'City' => 'Collierville',
130
+ 'StateOrProvinceCode' => 'TN',
131
+ 'PostalCode' => '38017',
132
+ 'CountryCode' => 'US',
133
+ 'Residential' => 1
134
+ )
135
+ );
136
+ if($var == 'recipient') Return array(
137
+ 'Contact' => array(
138
+ 'PersonName' => 'Recipient Name',
139
+ 'CompanyName' => 'Recipient Company Name',
140
+ 'PhoneNumber' => '1234567890'
141
+ ),
142
+ 'Address' => array(
143
+ 'StreetLines' => array('Address Line 1'),
144
+ 'City' => 'Herndon',
145
+ 'StateOrProvinceCode' => 'VA',
146
+ 'PostalCode' => '20171',
147
+ 'CountryCode' => 'US',
148
+ 'Residential' => 1
149
+ )
150
+ );
151
+
152
+ if($var == 'address1') Return array(
153
+ 'StreetLines' => array('10 Fed Ex Pkwy'),
154
+ 'City' => 'Memphis',
155
+ 'StateOrProvinceCode' => 'TN',
156
+ 'PostalCode' => '38115',
157
+ 'CountryCode' => 'US'
158
+ );
159
+ if($var == 'address2') Return array(
160
+ 'StreetLines' => array('13450 Farmcrest Ct'),
161
+ 'City' => 'Herndon',
162
+ 'StateOrProvinceCode' => 'VA',
163
+ 'PostalCode' => '20171',
164
+ 'CountryCode' => 'US'
165
+ );
166
+ if($var == 'searchlocationsaddress') Return array(
167
+ 'StreetLines'=> array('240 Central Park S'),
168
+ 'City'=>'Austin',
169
+ 'StateOrProvinceCode'=>'TX',
170
+ 'PostalCode'=>'78701',
171
+ 'CountryCode'=>'US'
172
+ );
173
+
174
+ if($var == 'shippingchargespayment') Return array(
175
+ 'PaymentType' => 'SENDER',
176
+ 'Payor' => array(
177
+ 'ResponsibleParty' => array(
178
+ 'AccountNumber' => getProperty('billaccount'),
179
+ 'Contact' => null,
180
+ 'Address' => array('CountryCode' => 'US')
181
+ )
182
+ )
183
+ );
184
+ if($var == 'freightbilling') Return array(
185
+ 'Contact'=>array(
186
+ 'ContactId' => 'freight1',
187
+ 'PersonName' => 'Big Shipper',
188
+ 'Title' => 'Manager',
189
+ 'CompanyName' => 'Freight Shipper Co',
190
+ 'PhoneNumber' => '1234567890'
191
+ ),
192
+ 'Address'=>array(
193
+ 'StreetLines'=>array(
194
+ '1202 Chalet Ln',
195
+ 'Do Not Delete - Test Account'
196
+ ),
197
+ 'City' =>'Harrison',
198
+ 'StateOrProvinceCode' => 'AR',
199
+ 'PostalCode' => '72601-6353',
200
+ 'CountryCode' => 'US'
201
+ )
202
+ );
203
+ }
204
+
205
+ function setEndpoint($var){
206
+ if($var == 'changeEndpoint') Return false;
207
+ if($var == 'endpoint') Return 'XXX';
208
+ }
209
+
210
+ function printNotifications($notes){
211
+ foreach($notes as $noteKey => $note){
212
+ if(is_string($note)){
213
+ echo $noteKey . ': ' . $note . Newline;
214
+ }
215
+ else{
216
+ printNotifications($note);
217
+ }
218
+ }
219
+ echo Newline;
220
+ }
221
+
222
+ function printError($client, $response){
223
+ printReply($client, $response);
224
+ }
225
+
226
+ function trackDetails($details, $spacer){
227
+ foreach($details as $key => $value){
228
+ if(is_array($value) || is_object($value)){
229
+ $newSpacer = $spacer. '&nbsp;&nbsp;&nbsp;&nbsp;';
230
+ echo '<tr><td>'. $spacer . $key.'</td><td>&nbsp;</td></tr>';
231
+ trackDetails($value, $newSpacer);
232
+ }elseif(empty($value)){
233
+ echo '<tr><td>'.$spacer. $key .'</td><td>'.$value.'</td></tr>';
234
+ }else{
235
+ echo '<tr><td>'.$spacer. $key .'</td><td>'.$value.'</td></tr>';
236
+ }
237
+ }
238
+ }
239
+ ?>
lib/Checkdelivery/fedextransactions.log ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/cnty/v2"><SOAP-ENV:Body><ns1:PostalCodeInquiryRequest><ns1:WebAuthenticationDetail><ns1:UserCredential><ns1:Key>vSjca0wJn4s3Ihvq</ns1:Key><ns1:Password>q5JghKTZWFpxqbw7esWfYyMtY</ns1:Password></ns1:UserCredential></ns1:WebAuthenticationDetail><ns1:ClientDetail><ns1:AccountNumber>510087020</ns1:AccountNumber><ns1:MeterNumber>118681523</ns1:MeterNumber></ns1:ClientDetail><ns1:TransactionDetail><ns1:CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</ns1:CustomerTransactionId></ns1:TransactionDetail><ns1:Version><ns1:ServiceId>cnty</ns1:ServiceId><ns1:Major>2</ns1:Major><ns1:Intermediate>0</ns1:Intermediate><ns1:Minor>0</ns1:Minor></ns1:Version><ns1:PostalCode>110085</ns1:PostalCode><ns1:CountryCode>IN</ns1:CountryCode></ns1:PostalCodeInquiryRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
3
+
4
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><PostalCodeInquiryReply xmlns="http://fedex.com/ws/cnty/v2"><HighestSeverity>SUCCESS</HighestSeverity><Notifications><Severity>SUCCESS</Severity><Source>cnty</Source><Code>000</Code><Message>SUCCESS</Message><LocalizedMessage>SUCCESS</LocalizedMessage></Notifications><TransactionDetail><CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</CustomerTransactionId></TransactionDetail><Version><ServiceId>cnty</ServiceId><Major>2</Major><Intermediate>0</Intermediate><Minor>0</Minor></Version><ExpressFreightContractorDeliveryArea>true</ExpressFreightContractorDeliveryArea><ExpressDescription><LocationId>DELAZ</LocationId><PostalCode>110085</PostalCode><ServiceArea>AA</ServiceArea></ExpressDescription><ExpressFreightDescription><LocationId>DELRT</LocationId><ServiceArea>H7</ServiceArea></ExpressFreightDescription></PostalCodeInquiryReply></SOAP-ENV:Body></SOAP-ENV:Envelope>
5
+
6
+
7
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/cnty/v2"><SOAP-ENV:Body><ns1:PostalCodeInquiryRequest><ns1:WebAuthenticationDetail><ns1:UserCredential><ns1:Key>vSjca0wJn4s3Ihvq</ns1:Key><ns1:Password>q5JghKTZWFpxqbw7esWfYyMtY</ns1:Password></ns1:UserCredential></ns1:WebAuthenticationDetail><ns1:ClientDetail><ns1:AccountNumber>510087020</ns1:AccountNumber><ns1:MeterNumber>118681523</ns1:MeterNumber></ns1:ClientDetail><ns1:TransactionDetail><ns1:CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</ns1:CustomerTransactionId></ns1:TransactionDetail><ns1:Version><ns1:ServiceId>cnty</ns1:ServiceId><ns1:Major>2</ns1:Major><ns1:Intermediate>0</ns1:Intermediate><ns1:Minor>0</ns1:Minor></ns1:Version><ns1:PostalCode>110085</ns1:PostalCode><ns1:CountryCode>IN</ns1:CountryCode></ns1:PostalCodeInquiryRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
8
+
9
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><PostalCodeInquiryReply xmlns="http://fedex.com/ws/cnty/v2"><HighestSeverity>SUCCESS</HighestSeverity><Notifications><Severity>SUCCESS</Severity><Source>cnty</Source><Code>000</Code><Message>SUCCESS</Message><LocalizedMessage>SUCCESS</LocalizedMessage></Notifications><TransactionDetail><CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</CustomerTransactionId></TransactionDetail><Version><ServiceId>cnty</ServiceId><Major>2</Major><Intermediate>0</Intermediate><Minor>0</Minor></Version><ExpressFreightContractorDeliveryArea>true</ExpressFreightContractorDeliveryArea><ExpressDescription><LocationId>DELAZ</LocationId><PostalCode>110085</PostalCode><ServiceArea>AA</ServiceArea></ExpressDescription><ExpressFreightDescription><LocationId>DELRT</LocationId><ServiceArea>H7</ServiceArea></ExpressFreightDescription></PostalCodeInquiryReply></SOAP-ENV:Body></SOAP-ENV:Envelope>
10
+
11
+
12
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/cnty/v2"><SOAP-ENV:Body><ns1:PostalCodeInquiryRequest><ns1:WebAuthenticationDetail><ns1:UserCredential><ns1:Key>vSjca0wJn4s3Ihvq</ns1:Key><ns1:Password>q5JghKTZWFpxqbw7esWfYyMtY</ns1:Password></ns1:UserCredential></ns1:WebAuthenticationDetail><ns1:ClientDetail><ns1:AccountNumber>510087020</ns1:AccountNumber><ns1:MeterNumber>118681523</ns1:MeterNumber></ns1:ClientDetail><ns1:TransactionDetail><ns1:CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</ns1:CustomerTransactionId></ns1:TransactionDetail><ns1:Version><ns1:ServiceId>cnty</ns1:ServiceId><ns1:Major>2</ns1:Major><ns1:Intermediate>0</ns1:Intermediate><ns1:Minor>0</ns1:Minor></ns1:Version><ns1:PostalCode>110085</ns1:PostalCode><ns1:CountryCode>IN</ns1:CountryCode></ns1:PostalCodeInquiryRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
13
+
14
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><PostalCodeInquiryReply xmlns="http://fedex.com/ws/cnty/v2"><HighestSeverity>SUCCESS</HighestSeverity><Notifications><Severity>SUCCESS</Severity><Source>cnty</Source><Code>000</Code><Message>SUCCESS</Message><LocalizedMessage>SUCCESS</LocalizedMessage></Notifications><TransactionDetail><CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</CustomerTransactionId></TransactionDetail><Version><ServiceId>cnty</ServiceId><Major>2</Major><Intermediate>0</Intermediate><Minor>0</Minor></Version><ExpressFreightContractorDeliveryArea>true</ExpressFreightContractorDeliveryArea><ExpressDescription><LocationId>DELAZ</LocationId><PostalCode>110085</PostalCode><ServiceArea>AA</ServiceArea></ExpressDescription><ExpressFreightDescription><LocationId>DELRT</LocationId><ServiceArea>H7</ServiceArea></ExpressFreightDescription></PostalCodeInquiryReply></SOAP-ENV:Body></SOAP-ENV:Envelope>
15
+
16
+
17
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/cnty/v2"><SOAP-ENV:Body><ns1:PostalCodeInquiryRequest><ns1:WebAuthenticationDetail><ns1:UserCredential><ns1:Key>vSjca0wJn4s3Ihvq</ns1:Key><ns1:Password>q5JghKTZWFpxqbw7esWfYyMtY</ns1:Password></ns1:UserCredential></ns1:WebAuthenticationDetail><ns1:ClientDetail><ns1:AccountNumber>510087020</ns1:AccountNumber><ns1:MeterNumber>118681523</ns1:MeterNumber></ns1:ClientDetail><ns1:TransactionDetail><ns1:CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</ns1:CustomerTransactionId></ns1:TransactionDetail><ns1:Version><ns1:ServiceId>cnty</ns1:ServiceId><ns1:Major>2</ns1:Major><ns1:Intermediate>0</ns1:Intermediate><ns1:Minor>0</ns1:Minor></ns1:Version><ns1:PostalCode>852130</ns1:PostalCode><ns1:CountryCode>IN</ns1:CountryCode></ns1:PostalCodeInquiryRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
18
+
19
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><PostalCodeInquiryReply xmlns="http://fedex.com/ws/cnty/v2"><HighestSeverity>SUCCESS</HighestSeverity><Notifications><Severity>SUCCESS</Severity><Source>cnty</Source><Code>000</Code><Message>SUCCESS</Message><LocalizedMessage>SUCCESS</LocalizedMessage></Notifications><TransactionDetail><CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</CustomerTransactionId></TransactionDetail><Version><ServiceId>cnty</ServiceId><Major>2</Major><Intermediate>0</Intermediate><Minor>0</Minor></Version><ExpressFreightContractorDeliveryArea>false</ExpressFreightContractorDeliveryArea><ExpressDescription><LocationId>PATX </LocationId><PostalCode>852130</PostalCode><ServiceArea>AA</ServiceArea></ExpressDescription><ExpressFreightDescription><LocationId>*****</LocationId><ServiceArea>NS</ServiceArea></ExpressFreightDescription></PostalCodeInquiryReply></SOAP-ENV:Body></SOAP-ENV:Envelope>
20
+
21
+
22
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/cnty/v2"><SOAP-ENV:Body><ns1:PostalCodeInquiryRequest><ns1:WebAuthenticationDetail><ns1:UserCredential><ns1:Key>asffs</ns1:Key><ns1:Password>sdfsdf</ns1:Password></ns1:UserCredential></ns1:WebAuthenticationDetail><ns1:ClientDetail><ns1:AccountNumber>sdfsdf</ns1:AccountNumber><ns1:MeterNumber>sdfsdf</ns1:MeterNumber></ns1:ClientDetail><ns1:TransactionDetail><ns1:CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</ns1:CustomerTransactionId></ns1:TransactionDetail><ns1:Version><ns1:ServiceId>cnty</ns1:ServiceId><ns1:Major>2</ns1:Major><ns1:Intermediate>0</ns1:Intermediate><ns1:Minor>0</ns1:Minor></ns1:Version><ns1:PostalCode>852130</ns1:PostalCode><ns1:CountryCode>IN</ns1:CountryCode></ns1:PostalCodeInquiryRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
23
+
24
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><v2:PostalCodeInquiryReply xmlns:v2="http://fedex.com/ws/cnty/v2"> <v2:HighestSeverity xmlns:v2="http://fedex.com/ws/cnty/v2">ERROR</v2:HighestSeverity> <v2:Notifications xmlns:v2="http://fedex.com/ws/cnty/v2"> <v2:Severity xmlns:v2="http://fedex.com/ws/cnty/v2">ERROR</v2:Severity> <v2:Source xmlns:v2="http://fedex.com/ws/cnty/v2">prof</v2:Source> <v2:Code xmlns:v2="http://fedex.com/ws/cnty/v2">1000</v2:Code> <v2:Message xmlns:v2="http://fedex.com/ws/cnty/v2">Authentication Failed</v2:Message> </v2:Notifications> <v2:TransactionDetail xmlns:v2="http://fedex.com/ws/cnty/v2"><v2:CustomerTransactionId xmlns:v2="http://fedex.com/ws/cnty/v2">*** PostalCodeInquiry Request using PHP ***</v2:CustomerTransactionId> </v2:TransactionDetail> <v2:Version xmlns:v2="http://fedex.com/ws/cnty/v2"> <v2:ServiceId xmlns:v2="http://fedex.com/ws/cnty/v2">cnty</v2:ServiceId> <v2:Major xmlns:v2="http://fedex.com/ws/cnty/v2">2</v2:Major> <v2:Intermediate xmlns:v2="http://fedex.com/ws/cnty/v2">0</v2:Intermediate> <v2:Minor xmlns:v2="http://fedex.com/ws/cnty/v2">0</v2:Minor> </v2:Version> </v2:PostalCodeInquiryReply></SOAP-ENV:Body></SOAP-ENV:Envelope>
25
+
26
+
27
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/cnty/v2"><SOAP-ENV:Body><ns1:PostalCodeInquiryRequest><ns1:WebAuthenticationDetail><ns1:UserCredential><ns1:Key>vSjca0wJn4s3Ihvq</ns1:Key><ns1:Password>q5JghKTZWFpxqbw7esWfYyMtY</ns1:Password></ns1:UserCredential></ns1:WebAuthenticationDetail><ns1:ClientDetail><ns1:AccountNumber>510087020</ns1:AccountNumber><ns1:MeterNumber>q5JghKTZWFpxqbw7esWfYyMtY</ns1:MeterNumber></ns1:ClientDetail><ns1:TransactionDetail><ns1:CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</ns1:CustomerTransactionId></ns1:TransactionDetail><ns1:Version><ns1:ServiceId>cnty</ns1:ServiceId><ns1:Major>2</ns1:Major><ns1:Intermediate>0</ns1:Intermediate><ns1:Minor>0</ns1:Minor></ns1:Version><ns1:PostalCode>852130</ns1:PostalCode><ns1:CountryCode>IN</ns1:CountryCode></ns1:PostalCodeInquiryRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
28
+
29
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><PostalCodeInquiryReply xmlns="http://fedex.com/ws/cnty/v2"><HighestSeverity>SUCCESS</HighestSeverity><Notifications><Severity>SUCCESS</Severity><Source>cnty</Source><Code>000</Code><Message>SUCCESS</Message><LocalizedMessage>SUCCESS</LocalizedMessage></Notifications><TransactionDetail><CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</CustomerTransactionId></TransactionDetail><Version><ServiceId>cnty</ServiceId><Major>2</Major><Intermediate>0</Intermediate><Minor>0</Minor></Version><ExpressFreightContractorDeliveryArea>false</ExpressFreightContractorDeliveryArea><ExpressDescription><LocationId>PATX </LocationId><PostalCode>852130</PostalCode><ServiceArea>AA</ServiceArea></ExpressDescription><ExpressFreightDescription><LocationId>*****</LocationId><ServiceArea>NS</ServiceArea></ExpressFreightDescription></PostalCodeInquiryReply></SOAP-ENV:Body></SOAP-ENV:Envelope>
30
+
31
+
32
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/cnty/v2"><SOAP-ENV:Body><ns1:PostalCodeInquiryRequest><ns1:WebAuthenticationDetail><ns1:UserCredential><ns1:Key>vSjca0wJn4s3Ihvq</ns1:Key><ns1:Password>q5JghKTZWFpxqbw7esWfYyMtY</ns1:Password></ns1:UserCredential></ns1:WebAuthenticationDetail><ns1:ClientDetail><ns1:AccountNumber>510087020</ns1:AccountNumber><ns1:MeterNumber>q5JghKTZWFpxqbw7esWfYyMtY</ns1:MeterNumber></ns1:ClientDetail><ns1:TransactionDetail><ns1:CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</ns1:CustomerTransactionId></ns1:TransactionDetail><ns1:Version><ns1:ServiceId>cnty</ns1:ServiceId><ns1:Major>2</ns1:Major><ns1:Intermediate>0</ns1:Intermediate><ns1:Minor>0</ns1:Minor></ns1:Version><ns1:PostalCode>852130</ns1:PostalCode><ns1:CountryCode>IN</ns1:CountryCode></ns1:PostalCodeInquiryRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
33
+
34
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><PostalCodeInquiryReply xmlns="http://fedex.com/ws/cnty/v2"><HighestSeverity>SUCCESS</HighestSeverity><Notifications><Severity>SUCCESS</Severity><Source>cnty</Source><Code>000</Code><Message>SUCCESS</Message><LocalizedMessage>SUCCESS</LocalizedMessage></Notifications><TransactionDetail><CustomerTransactionId>*** PostalCodeInquiry Request using PHP ***</CustomerTransactionId></TransactionDetail><Version><ServiceId>cnty</ServiceId><Major>2</Major><Intermediate>0</Intermediate><Minor>0</Minor></Version><ExpressFreightContractorDeliveryArea>false</ExpressFreightContractorDeliveryArea><ExpressDescription><LocationId>PATX </LocationId><PostalCode>852130</PostalCode><ServiceArea>AA</ServiceArea></ExpressDescription><ExpressFreightDescription><LocationId>*****</LocationId><ServiceArea>NS</ServiceArea></ExpressFreightDescription></PostalCodeInquiryReply></SOAP-ENV:Body></SOAP-ENV:Envelope>
35
+
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>netsolutions_checkdelivery</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>OSL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Check product is available on the basis of area zip code</summary>
10
+ <description>Check product is available on the basis of area zip code</description>
11
+ <notes>Clear Cache after installation</notes>
12
+ <authors><author><name>Netsol</name><user>net_solutions</user><email>marketing@netsolutionsindia.com</email></author></authors>
13
+ <date>2015-06-26</date>
14
+ <time>12:16:55</time>
15
+ <contents><target name="magecommunity"><dir name="Netsolutions"><dir name="Checkdelivery"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Exportbutton.php" hash="df1d24fbb382ba580236b6272a21ad7d"/></dir></dir></dir><file name="Checkdelivery.php" hash="c10adad82c85a1ffc0b19a6e58fceb5e"/></dir><dir name="Helper"><file name="Data.php" hash="59990576e4ccab6c3fe6fd3a9d97e8b0"/></dir><dir name="Model"><file name="Checkdelivery.php" hash="3725d156695cd499bec4ac04301861be"/><file name="Csv.php" hash="29d70b392c105721f937897e2b3ab60c"/><dir name="Mysql4"><dir name="Checkdelivery"><file name="Collection.php" hash="8929c253547d451a98d3437124e89799"/></dir><file name="Checkdelivery.php" hash="975c0c858d30c5280b5e53515c7e75ef"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Values.php" hash="bbd2a39efe60fa9e3ca3b90e148426b3"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ExportcsvController.php" hash="013bce187418695289997f0e57175758"/></dir><file name="IndexController.php" hash="6ecf93372f517dc01d4549314d43bb97"/></dir><dir name="etc"><file name="adminhtml.xml" hash="90f9530c8b058867a662ba1269d14e43"/><file name="config.xml" hash="0ec1439e4a3a8ff09bc55b9ead0903ba"/><file name="system.xml" hash="971ad50e6d6f2132228704ad001c04bc"/></dir><dir name="sql"><dir name="checkdelivery_setup"><file name="mysql4-install-0.1.0.php" hash="caab1603a16acc1394bbedcdd1410661"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Netsolutions_Checkdelivery.xml" hash="3f744c34bfc2af5665c806681cd6678e"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="checkdelivery.xml" hash="397c9eec1ffabd5dcd28ccfc02341cbb"/></dir><dir name="template"><dir name="checkdelivery"><file name="checkdelivery.phtml" hash="1866c7bfafe74133a7925730fc931db6"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="checkdelivery"><file name="style.css" hash="b5068e0817acda5eef9371cfa39a8fc7"/></dir></dir><dir name="images"><file name="ajax-loader-2.gif" hash="a7cb027c1ed0c4df76e4c38c259853eb"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Checkdelivery"><file name="CountryService_v2.wsdl" hash="7c003e3cd9125d1f17e21b224f86c1a6"/><file name="fedex-common.php" hash="8d63e09f1ab334ef2ba186c2d10f7fb9"/><file name="fedextransactions.log" hash="44a1222c85e8c185272a837a3c884d7b"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/frontend/base/default/css/checkdelivery/style.css ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ .block-check-delivery .block-title strong {background-image:none; font-size: 11px;}
2
+ .block-check-delivery .block-content {padding:0 10px; width:28%;float:right; }
3
+ .block-check-delivery .button {float: right;}
4
+ .block-check-delivery input{width: 107px;float:left;}
5
+ .loading_checkDel{width:22%; float:left;}
6
+ #delivery-message{float:left;}
skin/frontend/base/default/images/ajax-loader-2.gif ADDED
Binary file