Version Notes
Multi store shipping functionality added
Download this release
Release Info
Developer | selva ganesh |
Extension | soluship_shipping_magento |
Version | 1.0.1 |
Comparing to | |
See all releases |
Version 1.0.1
- app/code/community/Soluship/Shipping1/Helper/Data/Data.php +4 -0
- app/code/community/Soluship/Shipping1/Model/Data.php +4 -0
- app/code/community/Soluship/Shipping1/Model/Demo.php +173 -0
- app/code/community/Soluship/Shipping1/Model/Dropdown/MarkupFlatOption.php +39 -0
- app/code/community/Soluship/Shipping1/Model/Dropdown/MarkupType.php +39 -0
- app/code/community/Soluship/Shipping1/Model/Dropdown/Unitofmeasure.php +20 -0
- app/code/community/Soluship/Shipping1/Model/FreeShipOptions.php +39 -0
- app/code/community/Soluship/Shipping1/Model/Observer.php +239 -0
- app/code/community/Soluship/Shipping1/Model/Observer1.php +104 -0
- app/code/community/Soluship/Shipping1/Model/Option.php +23 -0
- app/code/community/Soluship/Shipping1/Model/PackageOption.php +39 -0
- app/code/community/Soluship/Shipping1/Model/Sales/Order/Grid.php +38 -0
- app/code/community/Soluship/Shipping1/Model/Sales/Order/View.php +35 -0
- app/code/community/Soluship/Shipping1/Model/Sales/Order/ViewTrack.php +56 -0
- app/code/community/Soluship/Shipping1/Model/Weightunit.php +39 -0
- app/code/community/Soluship/Shipping1/Model/printlabel.php +1 -0
- app/code/community/Soluship/Shipping1/controllers/Adminhtml/MassactionController.php +87 -0
- app/code/community/Soluship/Shipping1/etc/config.xml +140 -0
- app/code/community/Soluship/Shipping1/etc/system.xml +206 -0
- app/etc/modules/Soluship_Shipping_Magento.xml +12 -0
- package.xml +34 -0
app/code/community/Soluship/Shipping1/Helper/Data/Data.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soluship_Shipping1_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Data.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soluship_Shipping1_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Demo.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soluship_Shipping1_Model_Demo
|
3 |
+
extends Mage_Shipping_Model_Carrier_Abstract
|
4 |
+
implements Mage_Shipping_Model_Carrier_Interface
|
5 |
+
{
|
6 |
+
protected $_code = 'soluship_shipping1';
|
7 |
+
|
8 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
9 |
+
{
|
10 |
+
$result = Mage::getModel('shipping/rate_result');
|
11 |
+
/* $result->append($this->_getDefaultRate());
|
12 |
+
$result->append($this->_getDefaultRate1());
|
13 |
+
|
14 |
+
*/
|
15 |
+
//http://localhost:9090/solushipRates/rest/soluship/woogetRates
|
16 |
+
Mage::log('getnerice rates.................... ');
|
17 |
+
$carriers=Mage::getStoreConfig('carriers');
|
18 |
+
|
19 |
+
|
20 |
+
$cart = Mage::getModel('checkout/cart')->getQuote();
|
21 |
+
|
22 |
+
$client = new Varien_Http_Client($carriers['soluship_shipping1']['shippingserver'].'/api/v1/genericrates',
|
23 |
+
array(
|
24 |
+
'maxredirects' => 0,
|
25 |
+
'timeout' => 20));
|
26 |
+
|
27 |
+
$client->setMethod(Varien_Http_Client::POST);
|
28 |
+
$request->ship_setting = Mage::getStoreConfig('shipping');
|
29 |
+
$client->setHeaders('x-magento-shop-domain: MAGENTO');
|
30 |
+
/*$client->setHeaders('username: '.$carriers['soluship_shipping1']['apiusername']);
|
31 |
+
$client->setHeaders('password: '.$carriers['soluship_shipping1']['apipassword']);*/
|
32 |
+
$client->setHeaders('SolushipAccessKey: '.$carriers['soluship_shipping1']['solushipaccesstoekn']);
|
33 |
+
$client->setHeaders('SolushipHost: '.$_SERVER['SERVER_NAME']);
|
34 |
+
$weight_unit=$this->getConfigData('unit_of_measure');
|
35 |
+
$result->customer = Mage::getSingleton('customer/session')->getCustomer();
|
36 |
+
$store_info=Mage::getStoreConfig('general');
|
37 |
+
$request->magento_store=$store_info;
|
38 |
+
$request->currency=Mage::getStoreConfig('currency');
|
39 |
+
$request->store_email=Mage::getStoreConfig('trans_email');
|
40 |
+
$request->soluship_setting=Mage::getStoreConfig('carriers');
|
41 |
+
|
42 |
+
$request->cartItems = Mage::getSingleton('checkout/session')->getQuote();
|
43 |
+
$new = array();
|
44 |
+
|
45 |
+
$session = Mage::getSingleton('checkout/session');
|
46 |
+
$i=1;
|
47 |
+
foreach ($session->getQuote()->getAllItems() as $item) {
|
48 |
+
|
49 |
+
$new[$i]=$item->getData();
|
50 |
+
$i=$i+1;
|
51 |
+
|
52 |
+
}
|
53 |
+
$request->items=$new;
|
54 |
+
$config = array();
|
55 |
+
$json =json_encode($config);
|
56 |
+
$request->weight_unit=$weight_unit;
|
57 |
+
$json = Mage::helper('core')->jsonEncode($request);
|
58 |
+
$client->setRawData($json, 'application/json');
|
59 |
+
|
60 |
+
// print_r(json_encode(Mage::getStoreConfig('carriers')));
|
61 |
+
|
62 |
+
//more parameters
|
63 |
+
try{
|
64 |
+
$response = $client->request();
|
65 |
+
$jsond=json_decode($response->getBody());
|
66 |
+
//echo $response;
|
67 |
+
//print_r($jsond);
|
68 |
+
|
69 |
+
|
70 |
+
$ratebody =$jsond;
|
71 |
+
$obj = $ratebody;
|
72 |
+
$last = count($obj->rates);
|
73 |
+
foreach ($obj->rates as $key => $value) {
|
74 |
+
$serviceId = 0;
|
75 |
+
$service = '';
|
76 |
+
$amount = 0.0;
|
77 |
+
$carrier='';
|
78 |
+
$carrierId=0;
|
79 |
+
$showcarrier=false;
|
80 |
+
foreach ($value as $key1 => $value1) {
|
81 |
+
|
82 |
+
// print_r($key1);
|
83 |
+
|
84 |
+
if ($key1 == 'amount') {
|
85 |
+
$amount = $value1;
|
86 |
+
}
|
87 |
+
|
88 |
+
if ($key1 == 'service') {
|
89 |
+
$service = $value1;
|
90 |
+
}
|
91 |
+
|
92 |
+
if ($key1 == 'serviceId') {
|
93 |
+
$serviceId = $value1;
|
94 |
+
}
|
95 |
+
|
96 |
+
if ($key1 == 'carrier') {
|
97 |
+
$carrier = $value1;
|
98 |
+
}
|
99 |
+
|
100 |
+
if ($key1 == 'carrierId') {
|
101 |
+
$carrierId = $value1;
|
102 |
+
}
|
103 |
+
|
104 |
+
if ($showcarrier == 'showcarrier') {
|
105 |
+
$showcarrier = $value1;
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
$service=$carrier.' '.$service;
|
115 |
+
$carrier='';
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
// print_r($service.'<--->'.$serviceId.'<--->'.$amount.'<br />');
|
121 |
+
// print_r($this->_getDefaultRate());
|
122 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
123 |
+
|
124 |
+
$rate->setCarrier($this->_code);
|
125 |
+
$rate->setCarrierTitle($carrier);
|
126 |
+
$rate->setMethod($serviceId);
|
127 |
+
$rate->setMethodTitle($service);
|
128 |
+
$rate->setPrice($amount);
|
129 |
+
$rate->setCost($amount);
|
130 |
+
|
131 |
+
|
132 |
+
$result->append($rate);
|
133 |
+
|
134 |
+
|
135 |
+
Mage::log('rate to check out==> ');
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
|
140 |
+
|
141 |
+
} catch (Exception $e) {
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
|
146 |
+
// print_r($result);
|
147 |
+
return $result;
|
148 |
+
}
|
149 |
+
|
150 |
+
public function getAllowedMethods()
|
151 |
+
{
|
152 |
+
return array(
|
153 |
+
'soluship_shipping1' => $this->getConfigData('name'),
|
154 |
+
);
|
155 |
+
}
|
156 |
+
|
157 |
+
protected function _getDefaultRate()
|
158 |
+
{
|
159 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
160 |
+
|
161 |
+
$rate->setCarrier($this->_code);
|
162 |
+
$rate->setCarrierTitle('Puralator');
|
163 |
+
$rate->setMethod('Fright');
|
164 |
+
$rate->setMethodTitle('Groud');
|
165 |
+
$rate->setPrice(20);
|
166 |
+
$rate->setCost(0);
|
167 |
+
|
168 |
+
return $rate;
|
169 |
+
}
|
170 |
+
|
171 |
+
|
172 |
+
|
173 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Dropdown/MarkupFlatOption.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
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 support@meanbee.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Meanbee
|
16 |
+
* @package Meanbee_Royalmail
|
17 |
+
* @copyright Copyright (c) 2008 Meanbee Internet Solutions (http://www.meanbee.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Soluship_Shipping1_Model_Dropdown_MarkupFlatOption
|
21 |
+
{
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Sets the option array for the weight unit selection
|
25 |
+
* in the admin section of the extension
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public function toOptionArray()
|
30 |
+
{
|
31 |
+
$units = array(
|
32 |
+
array('value' => 'nil', 'label' => 'N/A'),
|
33 |
+
array('value' => 'mFlat', 'label' => 'By Flat Amount'),
|
34 |
+
array('value' => 'mPerc', 'label' => 'By Percentage (%)'),
|
35 |
+
);
|
36 |
+
|
37 |
+
return $units;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Dropdown/MarkupType.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
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 support@meanbee.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Meanbee
|
16 |
+
* @package Meanbee_Royalmail
|
17 |
+
* @copyright Copyright (c) 2008 Meanbee Internet Solutions (http://www.meanbee.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Soluship_Shipping1_Model_Dropdown_MarkupType
|
21 |
+
{
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Sets the option array for the weight unit selection
|
25 |
+
* in the admin section of the extension
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public function toOptionArray()
|
30 |
+
{
|
31 |
+
$units = array(
|
32 |
+
array('value' => 'nil', 'label' => 'N/A'),
|
33 |
+
array('value' => 'markup', 'label' => 'Markup Shipping Cost'),
|
34 |
+
array('value' => 'markdown', 'label' => 'Markdown Shipping Cost'),
|
35 |
+
);
|
36 |
+
|
37 |
+
return $units;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Dropdown/Unitofmeasure.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Soluship_Shipping1_Model_dropdown_unitofmeasure
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Return array of Measure units
|
7 |
+
*
|
8 |
+
* @return array
|
9 |
+
*/
|
10 |
+
public function toOptionArray()
|
11 |
+
{
|
12 |
+
|
13 |
+
$result = array();
|
14 |
+
|
15 |
+
/* $result[] = array('value'=>'lb','label'=>'Pound');
|
16 |
+
$result[] = array('value'=>'kg','label'=>'Kill Gram');
|
17 |
+
*/
|
18 |
+
return $result;
|
19 |
+
}
|
20 |
+
}
|
app/code/community/Soluship/Shipping1/Model/FreeShipOptions.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
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 support@meanbee.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Meanbee
|
16 |
+
* @package Meanbee_Royalmail
|
17 |
+
* @copyright Copyright (c) 2008 Meanbee Internet Solutions (http://www.meanbee.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Soluship_Shipping1_Model_FreeShipOptions
|
21 |
+
{
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Sets the option array for the weight unit selection
|
25 |
+
* in the admin section of the extension
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public function toOptionArray()
|
30 |
+
{
|
31 |
+
$units = array(
|
32 |
+
array('value' => 'nil', 'label' => 'N/A'),
|
33 |
+
array('value' => 'weightfs', 'label' => 'By Minmum Package Weight'),
|
34 |
+
array('value' => 'flatfs', 'label' => 'By Minmum Order Amout')
|
35 |
+
);
|
36 |
+
|
37 |
+
return $units;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Observer.php
ADDED
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soluship_Shipping1_Model_Observer
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
}
|
7 |
+
public function automaticallyInvoiceShipCompleteOrder($observer)
|
8 |
+
{
|
9 |
+
$orderIds = $observer->getData('order_ids');
|
10 |
+
Mage::log('createShipment.................... ');
|
11 |
+
|
12 |
+
|
13 |
+
foreach($orderIds as $_orderId){
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
$order = Mage::getModel('sales/order')->load($_orderId);
|
19 |
+
|
20 |
+
|
21 |
+
$carriers=Mage::getStoreConfig('carriers');
|
22 |
+
|
23 |
+
$converter=Mage::getModel('sales/convert_order');
|
24 |
+
$shipment=$converter->toShipment($order);
|
25 |
+
|
26 |
+
|
27 |
+
$customer = Mage::getModel('customer/customer')->load($order->getData('customer_id'));
|
28 |
+
|
29 |
+
$obj=new Soluship_Shipping1_Model_Observer();
|
30 |
+
|
31 |
+
$billingaddress1=$order->getBillingAddress();
|
32 |
+
$billingaddress = array( 'customerName'=>$order->getData('customer_firstname'),
|
33 |
+
'companyName'=>$billingaddress1->getData('company'),
|
34 |
+
'telephone'=> $billingaddress1->getData('telephone'),
|
35 |
+
'email'=> $billingaddress1->getData('email'),
|
36 |
+
'street'=> $billingaddress1->getData('street'),
|
37 |
+
'city'=> $billingaddress1->getData('city'),
|
38 |
+
'region'=> $billingaddress1->getData('region'),
|
39 |
+
'postcode'=> $billingaddress1->getData('postcode'),
|
40 |
+
'country'=> $billingaddress1->getData('country')
|
41 |
+
);
|
42 |
+
|
43 |
+
$shipaddress=$shipment->getShippingAddress();
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
$ShippingAddress=array(
|
48 |
+
'companyName'=>$shipaddress->getData('company'),
|
49 |
+
'telephone'=> $shipaddress->getData('telephone'),
|
50 |
+
'email'=> $shipaddress->getData('email'),
|
51 |
+
'street'=> $shipaddress->getData('street'),
|
52 |
+
'city'=> $shipaddress->getData('city'),
|
53 |
+
'region'=> $shipaddress->getData('region'),
|
54 |
+
'postcode'=> $shipaddress->getData('postcode'),
|
55 |
+
'country'=> $shipaddress->getCountry()
|
56 |
+
);
|
57 |
+
|
58 |
+
$shipmethod=$order->getShippingMethod();
|
59 |
+
|
60 |
+
|
61 |
+
$ShippingMethod=array(
|
62 |
+
'shipping'=>$order->getData('shipping_method')
|
63 |
+
|
64 |
+
);
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
$obj->biladd=$billingaddress;
|
69 |
+
$obj->grandTotal=$order->getGrandTotal();
|
70 |
+
$obj->shipping_method=$ShippingMethod;
|
71 |
+
|
72 |
+
|
73 |
+
$obj->ShippingAddress=$ShippingAddress;
|
74 |
+
$obj->id=$_orderId;
|
75 |
+
$obj->shippingPackage=$this->createOrderItems($order);
|
76 |
+
|
77 |
+
|
78 |
+
$obj->ship_setting = Mage::getStoreConfig('shipping');
|
79 |
+
|
80 |
+
$carriers=Mage::getStoreConfig('carriers');
|
81 |
+
$obj->soluship_setting=$carriers;
|
82 |
+
|
83 |
+
$store_info=Mage::getStoreConfig('general');
|
84 |
+
$obj->magento_store=$store_info;
|
85 |
+
|
86 |
+
$obj->currency=Mage::getStoreConfig('currency');
|
87 |
+
$obj->store_email=Mage::getStoreConfig('trans_email');
|
88 |
+
|
89 |
+
|
90 |
+
|
91 |
+
try {
|
92 |
+
$client = new Varien_Http_Client($carriers['soluship_shipping1']['shippingserver'].'/api/v1/createShipment');
|
93 |
+
$client->setMethod(Varien_Http_Client::POST);
|
94 |
+
$client->setHeaders('x-magento-shop-domain: MAGENTO');
|
95 |
+
/*$client->setHeaders('username: '.$carriers['soluship_shipping1']['apiusername']);
|
96 |
+
$client->setHeaders('password: '.$carriers['soluship_shipping1']['apipassword']);*/
|
97 |
+
$client->setHeaders('SolushipAccessKey: '.$carriers['soluship_shipping1']['solushipaccesstoekn']);
|
98 |
+
$client->setHeaders('SolushipHost: '.$_SERVER['SERVER_NAME']);
|
99 |
+
|
100 |
+
$json=json_encode($obj);
|
101 |
+
|
102 |
+
$client->setRawData($json, 'application/json');
|
103 |
+
$response = $client->request();
|
104 |
+
} catch (Exception $e) {
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
+
return $this;
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
public function createOrderItems($order)
|
117 |
+
{
|
118 |
+
|
119 |
+
$items=$order->getAllVisibleItems();
|
120 |
+
$i=0;
|
121 |
+
$IO=array();
|
122 |
+
$itemcount=count($items);
|
123 |
+
$ww=0.0;
|
124 |
+
|
125 |
+
$storeId = Mage::app()->getStore()->getStoreId();
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
foreach ($items as $item)
|
130 |
+
{
|
131 |
+
$IO[$i]['name']=$item->getName();
|
132 |
+
$IO[$i]['price']=$item->getPrice();
|
133 |
+
$IO[$i]['sku']=$item->getSku();
|
134 |
+
$IO[$i]['id']=$item->getProductId();
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
+
//$cProduct = Mage::getModel('catalog/product');
|
139 |
+
|
140 |
+
$cProduct = Mage::getModel('catalog/product')->load($item->getProductId());
|
141 |
+
//$cProduct->load($item->getProductId());
|
142 |
+
$json1= Mage::helper('core')->jsonEncode($cProduct);
|
143 |
+
|
144 |
+
$pweight=$cProduct->getWeight();
|
145 |
+
|
146 |
+
|
147 |
+
$IO[$i]['qty']=$item->getQtyOrdered();
|
148 |
+
$IO[$i]['weight']=$pweight;
|
149 |
+
$qty=$item->getQtyOrdered();
|
150 |
+
$ww = $ww + ((double)$pweight* (int)$qty);
|
151 |
+
|
152 |
+
if($itemcount>1)
|
153 |
+
{
|
154 |
+
$IO[$i]['shipping']=$order->getData('shipping_amount')/$itemcount;
|
155 |
+
$IO[$i]['tax'] = $order->getData('tax_amount')/$itemcount;
|
156 |
+
}
|
157 |
+
elseif($itemcount == 1)
|
158 |
+
{
|
159 |
+
$IO[$i]['shipping']=$order->getData('shipping_amount');
|
160 |
+
$IO[$i]['tax'] = $order->getData('tax_amount');
|
161 |
+
}
|
162 |
+
$i++;
|
163 |
+
}
|
164 |
+
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
|
169 |
+
$packs=array(
|
170 |
+
'items'=>$IO,
|
171 |
+
'package_weight'=>$ww
|
172 |
+
|
173 |
+
);
|
174 |
+
|
175 |
+
|
176 |
+
|
177 |
+
|
178 |
+
return $packs;
|
179 |
+
}
|
180 |
+
|
181 |
+
|
182 |
+
public function cancelshipment($observer){
|
183 |
+
|
184 |
+
|
185 |
+
$order = $observer->getEvent()->getOrder();
|
186 |
+
|
187 |
+
//$orderIds = (array)$this->getRequest()->getParam('order_ids');
|
188 |
+
|
189 |
+
$carriers=Mage::getStoreConfig('carriers');
|
190 |
+
|
191 |
+
$json= Mage::helper('core')->jsonEncode($order);
|
192 |
+
|
193 |
+
Mage::log('<br>'.$json.'<br>');
|
194 |
+
|
195 |
+
if($order->getStatusLabel()=='Canceled'){
|
196 |
+
|
197 |
+
try {
|
198 |
+
$client = new Varien_Http_Client($carriers['soluship_shipping1']['shippingserver'].'/api/v1/cancelshipment');
|
199 |
+
$client->setMethod(Varien_Http_Client::POST);
|
200 |
+
$client->setHeaders('x-magento-shop-domain: MAGENTO');
|
201 |
+
/*$client->setHeaders('username: '.$carriers['soluship_shipping1']['apiusername']);
|
202 |
+
$client->setHeaders('password: '.$carriers['soluship_shipping1']['apipassword']);*/
|
203 |
+
$client->setHeaders('SolushipAccessKey: '.$carriers['soluship_shipping1']['solushipaccesstoekn']);
|
204 |
+
$client->setHeaders('SolushipHost: '.$_SERVER['SERVER_NAME']);
|
205 |
+
|
206 |
+
|
207 |
+
$client->setRawData($json, 'application/json');
|
208 |
+
$response = $client->request();
|
209 |
+
} catch (Exception $e) {
|
210 |
+
|
211 |
+
}
|
212 |
+
|
213 |
+
}
|
214 |
+
|
215 |
+
|
216 |
+
}
|
217 |
+
/*
|
218 |
+
public function printlabel($observer)
|
219 |
+
{
|
220 |
+
$block = $observer->getEvent()->getBlock();
|
221 |
+
if(get_class($block) =='Mage_Adminhtml_Block_Widget_Grid_Massaction'
|
222 |
+
&& $block->getRequest()->getControllerName() == 'sales_order')
|
223 |
+
{
|
224 |
+
$block->addItem('newmodule', array(
|
225 |
+
'label' => 'New Mass Action Title',
|
226 |
+
'url' => Mage::app()->getStore()->getUrl('newmodule/controller/action'),
|
227 |
+
));
|
228 |
+
}
|
229 |
+
}*/
|
230 |
+
|
231 |
+
/*
|
232 |
+
private function getBillingAddress1($order){
|
233 |
+
echo "sachin";
|
234 |
+
|
235 |
+
return $billingadd;
|
236 |
+
|
237 |
+
}*/
|
238 |
+
}
|
239 |
+
?>
|
app/code/community/Soluship/Shipping1/Model/Observer1.php
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Author: Hashid Hameed
|
5 |
+
* Email: me@hashid.in
|
6 |
+
* Date: 16 Oct 2014
|
7 |
+
*/
|
8 |
+
|
9 |
+
class Soluship_Shipping1_Model_Observer1
|
10 |
+
{
|
11 |
+
|
12 |
+
|
13 |
+
/* public function addMassAction(Varien_Event_Observer $observer) {
|
14 |
+
$block = $observer->getEvent()->getBlock();
|
15 |
+
|
16 |
+
if (
|
17 |
+
$block instanceof Mage_Adminhtml_Block_Widget_Grid_Massaction
|
18 |
+
&& $block->getRequest()->getControllerName() == 'sales_order'
|
19 |
+
) {
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
$block->addItem('keyup_massshipment_no_emails', array(
|
24 |
+
'label' => 'FullFill Shipping',
|
25 |
+
'url' => Mage::app()->getStore()->getUrl('shipping1/adminhtml_massaction/epayCapture'),
|
26 |
+
));
|
27 |
+
|
28 |
+
|
29 |
+
}
|
30 |
+
}*/
|
31 |
+
|
32 |
+
|
33 |
+
public function trackUpdate(Varien_Event_Observer $observer){
|
34 |
+
|
35 |
+
$block = $observer->getEvent()->getData( 'block' );
|
36 |
+
//
|
37 |
+
if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {
|
38 |
+
|
39 |
+
$tracking_url="";
|
40 |
+
$carriers=Mage::getStoreConfig('carriers');
|
41 |
+
|
42 |
+
$order=$block->getOrder();
|
43 |
+
|
44 |
+
$json= Mage::helper('core')->jsonEncode($order);
|
45 |
+
|
46 |
+
|
47 |
+
if($order->getStatusLabel()!='Canceled'){
|
48 |
+
|
49 |
+
try {
|
50 |
+
$client = new Varien_Http_Client($carriers['soluship_shipping1']['shippingserver'].'/api/v1/fulfillShipment');
|
51 |
+
$client->setMethod(Varien_Http_Client::POST);
|
52 |
+
$client->setHeaders('x-magento-shop-domain: MAGENTO');
|
53 |
+
/*$client->setHeaders('username: '.$carriers['soluship_shipping1']['apiusername']);
|
54 |
+
$client->setHeaders('password: '.$carriers['soluship_shipping1']['apipassword']);*/
|
55 |
+
$client->setHeaders('SolushipAccessKey: '.$carriers['soluship_shipping1']['solushipaccesstoekn']);
|
56 |
+
$client->setHeaders('SolushipHost: '.$_SERVER['SERVER_NAME']);
|
57 |
+
|
58 |
+
|
59 |
+
$client->setRawData($json, 'application/json');
|
60 |
+
$response = $client->request();
|
61 |
+
|
62 |
+
$resp=Mage::helper('core')->jsonDecode($response->getBody());
|
63 |
+
|
64 |
+
$tracking_url=$resp['tracking_url'];
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
} catch (Exception $e) {
|
69 |
+
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
if($tracking_url!=""){
|
74 |
+
|
75 |
+
$block->addButton('do_something_crazy', array(
|
76 |
+
'label' => 'Soluship Shipment Tracking',
|
77 |
+
'onclick' => 'popWin(\'' . $tracking_url . '\')',
|
78 |
+
'class' => 'go'
|
79 |
+
));
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
$url1=$carriers['soluship_shipping1']['shippingserver']."/ecomOrderRepeat.action?SolushipAccessKey=".$carriers['soluship_shipping1']['solushipaccesstoekn']."&ids=".$order->entity_id.",&ecomplatform=magento";
|
90 |
+
/*$url1=$carriers['soluship_shipping1']['shippingserver']."/ecomOrderRepeat.action?ids=".$order->entity_id.",&ecomplatform=magento";*/
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
$block->addButton('do_something_crazy1', array(
|
95 |
+
'label' => 'Recreate / Soluship Shipping Status',
|
96 |
+
'onclick' => 'popWin(\'' . $url1 . '\')',
|
97 |
+
'class' => 'go'
|
98 |
+
));
|
99 |
+
|
100 |
+
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Option.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @author Ashley Schroder (aschroder.com)
|
4 |
+
* @copyright Copyright (c) 2014 Ashley Schroder
|
5 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Aschroder_SMTPPro_Model_System_Config_Source_Smtp_Option extends Varien_Object
|
9 |
+
{
|
10 |
+
|
11 |
+
public function toOptionArray()
|
12 |
+
{
|
13 |
+
$options = array(
|
14 |
+
"disabled" => Mage::helper('smtppro')->__('Disabled'),
|
15 |
+
"google" => Mage::helper('smtppro')->__('Google Apps or Gmail'),
|
16 |
+
"smtp" => Mage::helper('smtppro')->__('Custom SMTP'),
|
17 |
+
"sendgrid" => Mage::helper('smtppro')->__('SendGrid'),
|
18 |
+
"mailup" => Mage::helper('smtppro')->__('MailUp'),
|
19 |
+
"ses" => Mage::helper('smtppro')->__('Amazon SES')
|
20 |
+
);
|
21 |
+
return $options;
|
22 |
+
}
|
23 |
+
}
|
app/code/community/Soluship/Shipping1/Model/PackageOption.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
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 support@meanbee.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Meanbee
|
16 |
+
* @package Meanbee_Royalmail
|
17 |
+
* @copyright Copyright (c) 2008 Meanbee Internet Solutions (http://www.meanbee.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Soluship_Shipping1_Model_PackageOption
|
21 |
+
{
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Sets the option array for the weight unit selection
|
25 |
+
* in the admin section of the extension
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public function toOptionArray()
|
30 |
+
{
|
31 |
+
$units = array(
|
32 |
+
array('value' => 'packlice', 'label' => 'Package By Maximum Weight'),
|
33 |
+
array('value' => 'unitP', 'label' => 'Unit Packaging'),
|
34 |
+
array('value' => 'productg', 'label' => 'Product Group'),
|
35 |
+
);
|
36 |
+
|
37 |
+
return $units;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Sales/Order/Grid.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soluship_Shipping1_Model_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
|
8 |
+
// print_r("sachin");
|
9 |
+
|
10 |
+
|
11 |
+
//echo $this->getRequest()->getRequestUri();
|
12 |
+
parent::__construct();
|
13 |
+
$this->setId('sales_order_grid');
|
14 |
+
$this->setUseAjax(true);
|
15 |
+
$this->setDefaultSort('created_at');
|
16 |
+
$this->setDefaultDir('DESC');
|
17 |
+
$this->setSaveParametersInSession(true);
|
18 |
+
}
|
19 |
+
protected function _prepareMassaction()
|
20 |
+
{
|
21 |
+
parent::_prepareMassaction();
|
22 |
+
|
23 |
+
|
24 |
+
$carriers=Mage::getStoreConfig('carriers');
|
25 |
+
$url=$carriers['soluship_shipping1']['shippingserver']."/ecomPrintLabel.action?SolushipAccessKey=".$carriers['soluship_shipping1']['solushipaccesstoekn']."&ecomplatform=magento";
|
26 |
+
/*$url=$carriers['soluship_shipping1']['shippingserver']."/ecomPrintLabel.action?ecomplatform=magento";*/
|
27 |
+
|
28 |
+
$orderIds = (array)$this->getRequest()->getParam('order_ids');
|
29 |
+
// print_r($this);
|
30 |
+
// Append new mass action option
|
31 |
+
$this->getMassactionBlock()->addItem(
|
32 |
+
'newmodule',
|
33 |
+
array('label' => $this->__('Soluship Print Label'),
|
34 |
+
'url' => $url
|
35 |
+
)
|
36 |
+
);
|
37 |
+
}
|
38 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Sales/Order/View.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soluship_Shipping1_Model_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
|
7 |
+
|
8 |
+
$carriers=Mage::getStoreConfig('carriers');
|
9 |
+
$url=$carriers['soluship_shipping1']['shippingserver']."/ecomPrintLabel.action?SolushipAccessKey=".$carriers['soluship_shipping1']['solushipaccesstoekn']."&ids=".$this->getOrderId().",&ecomplatform=magento";
|
10 |
+
/* $carriers=Mage::getStoreConfig('carriers');
|
11 |
+
$url=$carriers['soluship_shipping1']['shippingserver']."/ecomPrintLabel.action?ids=".$this->getOrderId().",";*/
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
if($this->getOrder()->getStatusLabel()!="Canceled"){
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
$this->_addButton('testbutton', array(
|
20 |
+
'label' => Mage::helper('Sales')->__('Soluship Print Label'),
|
21 |
+
'onclick' => 'setLocation(\'' . $url . '\')',
|
22 |
+
'class' => 'go'
|
23 |
+
), 0, 100, 'header', 'header');
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
parent::__construct();
|
33 |
+
|
34 |
+
}
|
35 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Sales/Order/ViewTrack.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soluship_Shipping1_Model_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
|
7 |
+
/*
|
8 |
+
$carriers=Mage::getStoreConfig('carriers');
|
9 |
+
$url=$carriers['soluship_shipping1']['shippingserver']."/ecomPrintLabel.action?username=".$carriers['soluship_shipping1']['apiusername']."&password=".$carriers['soluship_shipping1']['apipassword']."&ids=".$this->getOrderId().",";
|
10 |
+
$tracking_url="";
|
11 |
+
|
12 |
+
$order=$this->getOrder();
|
13 |
+
$json= Mage::helper('core')->jsonEncode($order);
|
14 |
+
|
15 |
+
Mage::log('<br>'.$json.'<br>');
|
16 |
+
|
17 |
+
if($order->getStatusLabel()!='Canceled'){
|
18 |
+
|
19 |
+
try {
|
20 |
+
$client = new Varien_Http_Client($carriers['soluship_shipping1']['shippingserver'].'/api/v1/fulfillShipment');
|
21 |
+
$client->setMethod(Varien_Http_Client::POST);
|
22 |
+
$client->setHeaders('x-magento-shop-domain: MAGENTO');
|
23 |
+
$client->setHeaders('username: '.$carriers['soluship_shipping1']['apiusername']);
|
24 |
+
$client->setHeaders('password: '.$carriers['soluship_shipping1']['apipassword']);
|
25 |
+
|
26 |
+
|
27 |
+
$client->setRawData($json, 'application/json');
|
28 |
+
$response = $client->request();
|
29 |
+
|
30 |
+
$resp=Mage::helper('core')->jsonDecode($response->getBody());
|
31 |
+
|
32 |
+
$tracking_url=$resp['tracking_url'];
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
} catch (Exception $e) {
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
$this->_addButton('tesddse', array(
|
44 |
+
'label' => Mage::helper('Sales')->__('Soluship Shipment Tracking'),
|
45 |
+
'onclick' => 'setLocation(\'' . $tracking_url . '\')',
|
46 |
+
'class' => 'go'
|
47 |
+
), 0, 100, 'header', 'header');
|
48 |
+
}
|
49 |
+
|
50 |
+
*/
|
51 |
+
|
52 |
+
print_r("ddfdf");
|
53 |
+
parent::__construct();
|
54 |
+
|
55 |
+
}
|
56 |
+
}
|
app/code/community/Soluship/Shipping1/Model/Weightunit.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
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 support@meanbee.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Meanbee
|
16 |
+
* @package Meanbee_Royalmail
|
17 |
+
* @copyright Copyright (c) 2008 Meanbee Internet Solutions (http://www.meanbee.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
class Soluship_Shipping1_Model_Weightunit
|
21 |
+
{
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Sets the option array for the weight unit selection
|
25 |
+
* in the admin section of the extension
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public function toOptionArray()
|
30 |
+
{
|
31 |
+
$units = array(
|
32 |
+
array('value' => 'kg', 'label' => 'Kilograms (kg)'),
|
33 |
+
array('value' => 'g', 'label' => 'Grams (g)'),
|
34 |
+
array('value' => 'lb', 'label' => 'Pounds (lb)'),
|
35 |
+
);
|
36 |
+
|
37 |
+
return $units;
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Soluship/Shipping1/Model/printlabel.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php
|
app/code/community/Soluship/Shipping1/controllers/Adminhtml/MassactionController.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Soluship_Shipping1_Adminhtml_MassactionController extends Mage_Adminhtml_Controller_Action
|
3 |
+
{
|
4 |
+
|
5 |
+
|
6 |
+
public function epayCaptureAction()
|
7 |
+
{
|
8 |
+
$orderIds = $this->getRequest()->getPost('order_ids', array());
|
9 |
+
|
10 |
+
$remoteinterfaceError = false;
|
11 |
+
|
12 |
+
$okIds = array();
|
13 |
+
$ok_invoiceIds = array();
|
14 |
+
$failIds = array();
|
15 |
+
$notfoundIds = array();
|
16 |
+
|
17 |
+
foreach ($orderIds as $orderId)
|
18 |
+
{
|
19 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
//$orderIds = (array)$this->getRequest()->getParam('order_ids');
|
25 |
+
|
26 |
+
$carriers=Mage::getStoreConfig('carriers');
|
27 |
+
|
28 |
+
$json= Mage::helper('core')->jsonEncode($order);
|
29 |
+
|
30 |
+
Mage::log('<br>'.$json.'<br>');
|
31 |
+
|
32 |
+
if($order->getStatusLabel()!='Canceled'){
|
33 |
+
|
34 |
+
try {
|
35 |
+
$client = new Varien_Http_Client($carriers['soluship_shipping1']['shippingserver'].'/api/v1/fulfillShipment');
|
36 |
+
$client->setMethod(Varien_Http_Client::POST);
|
37 |
+
$client->setHeaders('x-magento-shop-domain: MAGENTO');
|
38 |
+
/*$client->setHeaders('username: '.$carriers['soluship_shipping1']['apiusername']);
|
39 |
+
$client->setHeaders('password: '.$carriers['soluship_shipping1']['apipassword']);*/
|
40 |
+
$client->setHeaders('SolushipAccessKey: '.$carriers['soluship_shipping1']['solushipaccesstoekn']);
|
41 |
+
$client->setHeaders('SolushipHost: '.$_SERVER['SERVER_NAME']);
|
42 |
+
|
43 |
+
|
44 |
+
$client->setRawData($json, 'application/json');
|
45 |
+
$response = $client->request();
|
46 |
+
|
47 |
+
$resp=Mage::helper('core')->jsonDecode($response->getBody());
|
48 |
+
|
49 |
+
$tracking_url=$resp['tracking_url'];
|
50 |
+
|
51 |
+
/* $shipment = Mage::getModel('sales/order_shipment');
|
52 |
+
$shipment->load($sc->getId());
|
53 |
+
if($shipment->getId() != '') {
|
54 |
+
$track = Mage::getModel('sales/order_shipment_track')
|
55 |
+
->setShipment($shipment)
|
56 |
+
->setData('title', 'ShippingMethodName')
|
57 |
+
->setData('number', $tracking_url)
|
58 |
+
->setData('carrier_code', 'ShippingCarrierCode')
|
59 |
+
->setData('order_id', $shipment->getData('order_id'))
|
60 |
+
->save();
|
61 |
+
}
|
62 |
+
*/
|
63 |
+
|
64 |
+
$shipmentCollection = Mage::getResourceModel('sales/order_shipment_collection')
|
65 |
+
->setOrderFilter($order)
|
66 |
+
->load();
|
67 |
+
|
68 |
+
print_r(Mage::helper('core')->jsonEncode($order));
|
69 |
+
|
70 |
+
|
71 |
+
} catch (Exception $e) {
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
$ok = 'Order FullFillment Updated';
|
80 |
+
|
81 |
+
|
82 |
+
$this->_getSession()->addSuccess($ok);
|
83 |
+
|
84 |
+
|
85 |
+
//$this->_redirect('adminhtml/sales_order/index');
|
86 |
+
}
|
87 |
+
}
|
app/code/community/Soluship/Shipping1/etc/config.xml
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Soluship_Shipping1>
|
5 |
+
<version>1.0</version>
|
6 |
+
</Soluship_Shipping1>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<models>
|
10 |
+
<soluship_shipping1>
|
11 |
+
<class>Soluship_Shipping1_Model</class>
|
12 |
+
</soluship_shipping1>
|
13 |
+
</models>
|
14 |
+
<helpers>
|
15 |
+
<soluship_shipping1>
|
16 |
+
<class>Soluship_Shipping1_Helper_Data</class>
|
17 |
+
</soluship_shipping1>
|
18 |
+
</helpers>
|
19 |
+
|
20 |
+
|
21 |
+
<events>
|
22 |
+
|
23 |
+
|
24 |
+
<checkout_onepage_controller_success_action>
|
25 |
+
<observers>
|
26 |
+
<postDataTosServer>
|
27 |
+
<type>singleton</type>
|
28 |
+
<class>Soluship_Shipping1_Model_Observer</class>
|
29 |
+
<method>automaticallyInvoiceShipCompleteOrder</method>
|
30 |
+
</postDataTosServer>
|
31 |
+
</observers>
|
32 |
+
</checkout_onepage_controller_success_action>
|
33 |
+
|
34 |
+
<sales_order_save_commit_after>
|
35 |
+
<observers>
|
36 |
+
<Ylli_Cancelemail_Model_Observer>
|
37 |
+
<type>singleton</type>
|
38 |
+
<class>Soluship_Shipping1_Model_Observer</class>
|
39 |
+
<method>cancelshipment</method>
|
40 |
+
</Ylli_Cancelemail_Model_Observer>
|
41 |
+
</observers>
|
42 |
+
</sales_order_save_commit_after>
|
43 |
+
|
44 |
+
</events>
|
45 |
+
|
46 |
+
|
47 |
+
<blocks>
|
48 |
+
<adminhtml>
|
49 |
+
<rewrite>
|
50 |
+
<sales_order_grid>Soluship_Shipping1_Model_Sales_Order_Grid</sales_order_grid>
|
51 |
+
</rewrite>
|
52 |
+
<rewrite>
|
53 |
+
<sales_order_view>Soluship_Shipping1_Model_Sales_Order_View</sales_order_view>
|
54 |
+
|
55 |
+
<!-- <sales_order_view>Soluship_Shipping1_Model_Sales_Order_ViewRecreate</sales_order_view> -->
|
56 |
+
<!-- <sales_order_view>Soluship_Shipping1_Model_Sales_Order_ViewTrack</sales_order_view> -->
|
57 |
+
</rewrite>
|
58 |
+
|
59 |
+
</adminhtml>
|
60 |
+
|
61 |
+
|
62 |
+
</blocks>
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
</global>
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
<!-- <admin>
|
74 |
+
<routers>
|
75 |
+
<adminhtml>
|
76 |
+
<args>
|
77 |
+
<modules>
|
78 |
+
<Soluship_Shipping1 before="Mage_Adminhtml">Soluship_Shipping1</Soluship_Shipping1>
|
79 |
+
<frontname>shipping1</frontname>
|
80 |
+
</modules>
|
81 |
+
</args>
|
82 |
+
</adminhtml>
|
83 |
+
</routers>
|
84 |
+
</admin>
|
85 |
+
-->
|
86 |
+
<frontend>
|
87 |
+
|
88 |
+
<routers>
|
89 |
+
<Soluship_Shipping1>
|
90 |
+
<use>standard</use>
|
91 |
+
<args>
|
92 |
+
<module>Soluship_Shipping1</module>
|
93 |
+
<frontName>shipping1</frontName>
|
94 |
+
</args>
|
95 |
+
</Soluship_Shipping1>
|
96 |
+
</routers>
|
97 |
+
|
98 |
+
</frontend>
|
99 |
+
|
100 |
+
<adminhtml>
|
101 |
+
<events>
|
102 |
+
|
103 |
+
<adminhtml_widget_container_html_before>
|
104 |
+
<observers>
|
105 |
+
<keyup_massshipment_core_block_abstract_prepare_layout_before1>
|
106 |
+
<class>soluship_shipping1/observer1</class>
|
107 |
+
<method>trackUpdate</method>
|
108 |
+
</keyup_massshipment_core_block_abstract_prepare_layout_before1>
|
109 |
+
</observers>
|
110 |
+
</adminhtml_widget_container_html_before>
|
111 |
+
</events>
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
</adminhtml>
|
116 |
+
|
117 |
+
<default>
|
118 |
+
<carriers>
|
119 |
+
<soluship_shipping1>
|
120 |
+
<active>0</active>
|
121 |
+
<model>soluship_shipping1/demo</model>
|
122 |
+
<allowed_methods></allowed_methods>
|
123 |
+
<weight_unit>g</weight_unit>
|
124 |
+
<rounding_rule>none</rounding_rule>
|
125 |
+
<google_checkout_compatible>0</google_checkout_compatible>
|
126 |
+
<name>soluship_shipping1</name>
|
127 |
+
<title>soluship_shipping1</title>
|
128 |
+
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
129 |
+
<sallowspecific>1</sallowspecific>
|
130 |
+
<specificcountry>GB</specificcountry>
|
131 |
+
<showmethod>0</showmethod>
|
132 |
+
<sort_order>0</sort_order>
|
133 |
+
<parcel_size>small</parcel_size>
|
134 |
+
</soluship_shipping1>
|
135 |
+
</carriers>
|
136 |
+
</default>
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
</config>
|
app/code/community/Soluship/Shipping1/etc/system.xml
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<carriers>
|
5 |
+
<groups>
|
6 |
+
<soluship_shipping1 translate="label">
|
7 |
+
<label>Soluship Shipping</label>
|
8 |
+
<sort_order>1</sort_order>
|
9 |
+
<show_in_default>1</show_in_default>
|
10 |
+
<show_in_website>1</show_in_website>
|
11 |
+
<show_in_store>1</show_in_store>
|
12 |
+
|
13 |
+
<comment>
|
14 |
+
<![CDATA[
|
15 |
+
<div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
|
16 |
+
<p><strong>SOLUSHIP SHIPPING</strong></p>
|
17 |
+
Soluship(SOLUtion based SHIPments) is a shipment based project in which service is made globally. We have integrated different shipment service like FEDEX, UPS, DHL, PUROLATOR using SOAP service to get the rates and creating the pickup & Shipment for their corresponding service.
|
18 |
+
</div>
|
19 |
+
]]>
|
20 |
+
</comment>
|
21 |
+
<fields>
|
22 |
+
<active translate="label">
|
23 |
+
<label>Enabled</label>
|
24 |
+
<frontend_type>select</frontend_type>
|
25 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
26 |
+
<sort_order>1</sort_order>
|
27 |
+
<show_in_default>1</show_in_default>
|
28 |
+
<show_in_website>1</show_in_website>
|
29 |
+
<show_in_store>1</show_in_store>
|
30 |
+
</active>
|
31 |
+
|
32 |
+
<shippingserver translate="label">
|
33 |
+
<label>Shipping Domain</label>
|
34 |
+
<frontend_type>text</frontend_type>
|
35 |
+
<sort_order>2</sort_order>
|
36 |
+
<show_in_default>11</show_in_default>
|
37 |
+
<show_in_website>11</show_in_website>
|
38 |
+
<show_in_store>11</show_in_store>
|
39 |
+
</shippingserver>
|
40 |
+
|
41 |
+
<!-- <apiusername translate="label">
|
42 |
+
<label>API Username</label>
|
43 |
+
<frontend_type>text</frontend_type>
|
44 |
+
<sort_order>3</sort_order>
|
45 |
+
<show_in_default>11</show_in_default>
|
46 |
+
<show_in_website>11</show_in_website>
|
47 |
+
<show_in_store>11</show_in_store>
|
48 |
+
</apiusername>
|
49 |
+
|
50 |
+
<apipassword translate="label">
|
51 |
+
<label>API Password </label>
|
52 |
+
<frontend_type>text</frontend_type>
|
53 |
+
<sort_order>4</sort_order>
|
54 |
+
<show_in_default>11</show_in_default>
|
55 |
+
<show_in_website>11</show_in_website>
|
56 |
+
<show_in_store>11</show_in_store>
|
57 |
+
</apipassword> -->
|
58 |
+
|
59 |
+
<solushipaccesstoekn translate="label">
|
60 |
+
<label>Soluship Access Token</label>
|
61 |
+
<frontend_type>text</frontend_type>
|
62 |
+
<sort_order>4</sort_order>
|
63 |
+
<show_in_default>11</show_in_default>
|
64 |
+
<show_in_website>11</show_in_website>
|
65 |
+
<show_in_store>11</show_in_store>
|
66 |
+
</solushipaccesstoekn>
|
67 |
+
|
68 |
+
|
69 |
+
<title translate="label">
|
70 |
+
<label>Shipping Method Name</label>
|
71 |
+
<frontend_type>text</frontend_type>
|
72 |
+
<sort_order>20</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 |
+
</title>
|
77 |
+
<sallowspecific translate="label">
|
78 |
+
<label>For selected countries only</label>
|
79 |
+
<frontend_type>select</frontend_type>
|
80 |
+
<frontend_class>shipping-applicable-country</frontend_class>
|
81 |
+
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
82 |
+
<sort_order>32</sort_order>
|
83 |
+
<show_in_default>1</show_in_default>
|
84 |
+
<show_in_website>1</show_in_website>
|
85 |
+
<show_in_store>1</show_in_store>
|
86 |
+
</sallowspecific>
|
87 |
+
<specificcountry translate="label">
|
88 |
+
<label>Ship to Specific Countries</label>
|
89 |
+
<frontend_type>multiselect</frontend_type>
|
90 |
+
<sort_order>33</sort_order>
|
91 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
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 |
+
<can_be_empty>1</can_be_empty>
|
96 |
+
</specificcountry>
|
97 |
+
<weight_unit translate="label">
|
98 |
+
<label>Unit of Weight</label>
|
99 |
+
<frontend_type>select</frontend_type>
|
100 |
+
<source_model>soluship_shipping1/weightunit</source_model>
|
101 |
+
<sort_order>20</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 |
+
<comment>Select the unit that your store uses to designate the weight of each item. We'll use this to work out which shipping methods are applicable to the customer, based on their total cart weight.</comment>
|
106 |
+
</weight_unit>
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
<pack_unit translate="label">
|
112 |
+
<label>Packaging Method</label>
|
113 |
+
<frontend_type>select</frontend_type>
|
114 |
+
<source_model>soluship_shipping1/PackageOption</source_model>
|
115 |
+
<sort_order>30</sort_order>
|
116 |
+
<show_in_default>5</show_in_default>
|
117 |
+
<show_in_website>1</show_in_website>
|
118 |
+
<show_in_store>1</show_in_store>
|
119 |
+
<comment>
|
120 |
+
<!-- comments about the packageing method -->
|
121 |
+
|
122 |
+
</comment>
|
123 |
+
</pack_unit>
|
124 |
+
|
125 |
+
<packminweight translate="label">
|
126 |
+
<label>Maximum Weight of Package</label>
|
127 |
+
<frontend_type>text</frontend_type>
|
128 |
+
<sort_order>31</sort_order>
|
129 |
+
<show_in_default>11</show_in_default>
|
130 |
+
<show_in_website>11</show_in_website>
|
131 |
+
<show_in_store>11</show_in_store>
|
132 |
+
</packminweight>
|
133 |
+
|
134 |
+
<free_ship_unit translate="label">
|
135 |
+
<label>Free Ship Settings</label>
|
136 |
+
<frontend_type>select</frontend_type>
|
137 |
+
<source_model>soluship_shipping1/FreeShipOptions</source_model>
|
138 |
+
<sort_order>36</sort_order>
|
139 |
+
<show_in_default>1</show_in_default>
|
140 |
+
<show_in_website>1</show_in_website>
|
141 |
+
<show_in_store>1</show_in_store>
|
142 |
+
<comment><!-- comments about the packageing method -->
|
143 |
+
|
144 |
+
</comment>
|
145 |
+
</free_ship_unit>
|
146 |
+
<fsamout translate="label">
|
147 |
+
<label>Minmum order Amount For Free Shipping</label>
|
148 |
+
<frontend_type>text</frontend_type>
|
149 |
+
<sort_order>37</sort_order>
|
150 |
+
<show_in_default>1</show_in_default>
|
151 |
+
<show_in_website>1</show_in_website>
|
152 |
+
<show_in_store>1</show_in_store>
|
153 |
+
</fsamout>
|
154 |
+
<fsweight translate="label">
|
155 |
+
<label>Minmum Package Weight For Free Shipping</label>
|
156 |
+
<frontend_type>text</frontend_type>
|
157 |
+
<sort_order>38</sort_order>
|
158 |
+
<show_in_default>1</show_in_default>
|
159 |
+
<show_in_website>1</show_in_website>
|
160 |
+
<show_in_store>1</show_in_store>
|
161 |
+
</fsweight>
|
162 |
+
|
163 |
+
|
164 |
+
<markup_unit translate="label">
|
165 |
+
<label>Markup Settings</label>
|
166 |
+
<frontend_type>select</frontend_type>
|
167 |
+
<source_model>soluship_shipping1/Dropdown_MarkupType</source_model>
|
168 |
+
<sort_order>39</sort_order>
|
169 |
+
<show_in_default>1</show_in_default>
|
170 |
+
<show_in_website>1</show_in_website>
|
171 |
+
<show_in_store>1</show_in_store>
|
172 |
+
<comment><!-- comments about the packageing method -->
|
173 |
+
|
174 |
+
</comment>
|
175 |
+
</markup_unit>
|
176 |
+
|
177 |
+
<markup_type_unit translate="label">
|
178 |
+
<label>Mark Type </label>
|
179 |
+
<frontend_type>select</frontend_type>
|
180 |
+
<source_model>soluship_shipping1/Dropdown_MarkupFlatOption</source_model>
|
181 |
+
<sort_order>40</sort_order>
|
182 |
+
<show_in_default>1</show_in_default>
|
183 |
+
<show_in_website>1</show_in_website>
|
184 |
+
<show_in_store>1</show_in_store>
|
185 |
+
<comment><!-- comments about the packageing method -->
|
186 |
+
|
187 |
+
</comment>
|
188 |
+
</markup_type_unit>
|
189 |
+
|
190 |
+
<markup_value translate="label">
|
191 |
+
<label>Mark Value</label>
|
192 |
+
<frontend_type>text</frontend_type>
|
193 |
+
<sort_order>41</sort_order>
|
194 |
+
<show_in_default>1</show_in_default>
|
195 |
+
<show_in_website>1</show_in_website>
|
196 |
+
<show_in_store>1</show_in_store>
|
197 |
+
</markup_value>
|
198 |
+
|
199 |
+
</fields>
|
200 |
+
</soluship_shipping1>
|
201 |
+
</groups>
|
202 |
+
</carriers>
|
203 |
+
</sections>
|
204 |
+
|
205 |
+
|
206 |
+
</config>
|
app/etc/modules/Soluship_Shipping_Magento.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Soluship_Shipping1>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<depends>
|
8 |
+
<Mage_Shipping />
|
9 |
+
</depends>
|
10 |
+
</Soluship_Shipping1>
|
11 |
+
</modules>
|
12 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>soluship_shipping_magento</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php"> Magento community website is: OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Soluship(SOLUtion based SHIPments) is a shipment based project in which service is made globally. Its FREE* to use.</summary>
|
10 |
+
<description>FEATURES
|
11 |
+

|
12 |
+
AUTOMATE THE SHIPPING
|
13 |
+

|
14 |
+
With Easy Store configuration Bigcommerce Merchants can avail Soluship shipping will automate the shipping order handle.
|
15 |
+
Once people created sales order from Bigcommerce Store, Soluship will create exact shipping order and update the tracking details to your Bigcommerce Order.
|
16 |
+
CHEAPEST SHIPPING
|
17 |
+

|
18 |
+
If Merchants wants to choose wide variety of shipping rates from many carriers , soluship will provide the shipping rates.
|
19 |
+
PRINT SHIPPING LABELS
|
20 |
+

|
21 |
+
Merchants can able get the Carrier shipping labels from soluship by any order or bulk.
|
22 |
+
CARRIERS WITH SOLUSHIP
|
23 |
+

|
24 |
+
create shipment by getting the predefined rates with respect to the shipment details provided by the customer, from various services such as UPS, DHL, PUROLATOR, FEDEX etc..,
|
25 |
+
There are some additional functionalities such as pick up request ,EDI import (where multiple shipments can be created by importing an edi file), Track and Search which makes the shipments user friendly.
|
26 |
+
*Merchants need not pay nothing for App usages. They will pay only for shipping orders in soluship.</description>
|
27 |
+
<notes>Multi store shipping functionality added</notes>
|
28 |
+
<authors><author><name>selvaganesh</name><user>selva</user><email>ecommerce@justintegrateit.com</email></author></authors>
|
29 |
+
<date>2017-04-04</date>
|
30 |
+
<time>16:58:29</time>
|
31 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Soluship_Shipping_Magento.xml" hash="1a18096cc7c20498f4309178bc94b75b"/></dir></target><target name="magecommunity"><dir name="Soluship"><dir name="Shipping1"><dir name="Helper"><dir name="Data"><file name="Data.php" hash="2e5fa7cb0c497b1394f42299f977e259"/></dir></dir><dir name="Model"><file name="Data.php" hash="2e5fa7cb0c497b1394f42299f977e259"/><file name="Demo.php" hash="9749d4b900fb902d8166a9efb909c74f"/><dir name="Dropdown"><file name="MarkupFlatOption.php" hash="c3dcad22ff96aefc5c0d8fb337b76e72"/><file name="MarkupType.php" hash="cd257aa3181386707781f56440411280"/><file name="Unitofmeasure.php" hash="40941ba42763a599ae6e2fc2f8410208"/></dir><file name="FreeShipOptions.php" hash="440c1e0121575e9f3cf2321831157eb8"/><file name="Observer.php" hash="bb81a845d4ab71521f3736b4fb42ff18"/><file name="Observer1.php" hash="59c279df024213af05750094d619207a"/><file name="Option.php" hash="8da2d8863b128b42344570b32d344622"/><file name="PackageOption.php" hash="5e20eeab541a8901af33bcd771e7fde9"/><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="e908fb2554b19058b710b52d5fca9aa7"/><file name="View.php" hash="df76dc675e766233bf373cc3389ec102"/><file name="ViewTrack.php" hash="0180b81c41ea8345ac8b5f22280f8163"/></dir></dir><file name="Weightunit.php" hash="fa47f1ad50ae4f689a8ede921d9bd140"/><file name="printlabel.php" hash="feabe5cc691b088d6ade3e04d6b120fc"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="MassactionController.php" hash="715f6a5dc0b9362faf4e0cc7935db2a5"/></dir></dir><dir name="etc"><file name="config.xml" hash="44c53dcfd1247390dbb8c078aafa0df7"/><file name="system.xml" hash="65b565f91297f3125379ce2255567080"/></dir></dir></dir></target></contents>
|
32 |
+
<compatible/>
|
33 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
34 |
+
</package>
|