Version Notes
Added debug logging option to help with installations
Download this release
Release Info
Developer | Freightquote |
Extension | Freightquote_com_Shipping_Module |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.2.0
- app/code/community/Freightquote/Shipping/Helper/Data.php +0 -15
- app/code/community/Freightquote/Shipping/Model/Carrier/Shipping.php +0 -603
- app/code/community/Freightquote/Shipping/Model/Carrier/Source/Class.php +0 -25
- app/code/community/Freightquote/Shipping/Model/Carrier/Source/Commodity.php +0 -25
- app/code/community/Freightquote/Shipping/Model/Carrier/Source/Content.php +0 -25
- app/code/community/Freightquote/Shipping/Model/Carrier/Source/Locationtype.php +0 -25
- app/code/community/Freightquote/Shipping/Model/Carrier/Source/Packaging.php +0 -25
- app/code/community/Freightquote/Shipping/Model/Carrier/Source/Servicetype.php +0 -25
- app/code/community/Freightquote/Shipping/Model/Resource/Eav/Mysql4/Setup.php +0 -239
- app/code/community/Freightquote/Shipping/etc/config.xml +0 -94
- app/code/community/Freightquote/Shipping/etc/system.xml +0 -252
- app/code/community/Freightquote/Shipping/sql/freightquote_setup/mysql4-install-1.0.0.php +0 -14
- app/etc/modules/Freightquote_Shipping.xml +0 -18
- package.xml +10 -9
app/code/community/Freightquote/Shipping/Helper/Data.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Helper_Data extends Mage_Core_Helper_Abstract {
|
13 |
-
|
14 |
-
}
|
15 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/Model/Carrier/Shipping.php
DELETED
@@ -1,603 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Model_Carrier_Shipping
|
13 |
-
extends Mage_Shipping_Model_Carrier_Abstract {
|
14 |
-
|
15 |
-
protected $_code = 'freightquote';
|
16 |
-
protected $_request = null;
|
17 |
-
protected $_response = null;
|
18 |
-
protected $_result = null;
|
19 |
-
protected $_gatewayUrl = 'https://b2b.Freightquote.com/WebService/QuoteService.asmx';
|
20 |
-
|
21 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
22 |
-
if (!$this->getConfigData('active')) {
|
23 |
-
Mage::log('The ' . $this->_code . ' shipping method is not active.');
|
24 |
-
|
25 |
-
return false;
|
26 |
-
}
|
27 |
-
|
28 |
-
$this->_request = $this->setRequest($request);
|
29 |
-
|
30 |
-
$this->_getQuotes();
|
31 |
-
|
32 |
-
//$this->_updateFreeMethodQuote($request);
|
33 |
-
|
34 |
-
return $this->_result;
|
35 |
-
}
|
36 |
-
|
37 |
-
public function setRequest(Mage_Shipping_Model_Rate_Request $request) {
|
38 |
-
$r = new Varien_Object();
|
39 |
-
|
40 |
-
if ($request->getLimitMethod()) {
|
41 |
-
$r->setService($request->getLimitMethod());
|
42 |
-
}
|
43 |
-
|
44 |
-
$storeId = Mage::app()->getStore()->getId();
|
45 |
-
$websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
|
46 |
-
|
47 |
-
$store = new Mage_Adminhtml_Model_System_Store();
|
48 |
-
$storeName = strtolower($store->getStoreName($storeId));
|
49 |
-
|
50 |
-
unset($store, $storeId, $websiteId);
|
51 |
-
|
52 |
-
$r->setOrigName($storeName);
|
53 |
-
|
54 |
-
$r->setUsername($this->getConfigData('username'));
|
55 |
-
$r->setPassword($this->getConfigData('password'));
|
56 |
-
|
57 |
-
if ($request->getFreightquotePackaging()) {
|
58 |
-
$packaging = $request->getFreightquotePackaging();
|
59 |
-
}
|
60 |
-
|
61 |
-
//$r->setPackaging($packaging);
|
62 |
-
$r->setServiceType($this->getConfigData('service_type'));
|
63 |
-
|
64 |
-
$r->setOrigLocationType($this->getConfigData('origin_location_type'));
|
65 |
-
$r->setOrigLiftgate(($this->getConfigData('origin_liftgate') == 1 ? 'true' : 'false'));
|
66 |
-
|
67 |
-
$r->setDestLocationType($this->getConfigData('destination_location_type'));
|
68 |
-
$r->setDestLiftgate(($this->getConfigData('destination_liftgate') == 1 ? 'true' : 'false'));
|
69 |
-
|
70 |
-
$r->setOrigName(Mage::getStoreConfig('design/head/default_title'));
|
71 |
-
if ($request->getOrigPostcode()) {
|
72 |
-
$r->setOrigPostcode($request->getOrigPostcode());
|
73 |
-
} else {
|
74 |
-
$r->setOrigPostcode(Mage::getStoreConfig('shipping/origin/postcode', $this->getStore()));
|
75 |
-
}
|
76 |
-
|
77 |
-
if ($request->getOrigCountry()) {
|
78 |
-
$origCountry = $request->getOrigCountry();
|
79 |
-
} else {
|
80 |
-
$origCountry = Mage::getStoreConfig('shipping/origin/country_id', $this->getStore());
|
81 |
-
}
|
82 |
-
$r->setOrigCountry(Mage::getModel('directory/country')->load($origCountry)->getIso2Code());
|
83 |
-
|
84 |
-
$r->setOrigDock(($this->getConfigData('origin_dock') ? 'true' : 'false'));
|
85 |
-
$r->setOrigConstruction(($this->getConfigData('origin_construction') ? 'true' : 'false'));
|
86 |
-
$r->setOrigResidence(($this->getConfigData('origin_residence') ? 'true' : 'false'));
|
87 |
-
|
88 |
-
|
89 |
-
if ($request->getDestCountryId()) {
|
90 |
-
$destCountry = $request->getDestCountryId();
|
91 |
-
} else {
|
92 |
-
$destCountry = self::USA_COUNTRY_ID;
|
93 |
-
}
|
94 |
-
|
95 |
-
$r->setDestCountry($destCountry);
|
96 |
-
|
97 |
-
if ($request->getDestPostcode()) {
|
98 |
-
if ($destCountry == 'US') {
|
99 |
-
$destPostcode = preg_replace('/[^0-9]/', '', $request->getDestPostcode());
|
100 |
-
$destPostcode = substr($destPostcode, 0, 5);
|
101 |
-
} elseif ($destCountry == 'CA') {
|
102 |
-
$destPostcode = preg_replace('/[^0-9A-Z]/', '', strtoupper($request->getDestPostcode()));
|
103 |
-
$destPostcode = substr($destPostcode, 0, 6);
|
104 |
-
}
|
105 |
-
$r->setDestPostcode($destPostcode);
|
106 |
-
} else {
|
107 |
-
Mage::log('Freightquote.com Shipping Module missing destination postcode.');
|
108 |
-
return false;
|
109 |
-
}
|
110 |
-
|
111 |
-
$r->setDestResidence(($this->getConfigData('destination_residence') == 1 ? 'true' : 'false'));
|
112 |
-
$r->setDestConstruction(($this->getConfigData('destination_construction') == 1 ? 'true' : 'false'));
|
113 |
-
$r->setDestDock(($this->getConfigData('destination_dock') == 1 ? 'true' : 'false'));
|
114 |
-
|
115 |
-
$weight = $this->getTotalNumOfBoxes($request->getPackageWeight());
|
116 |
-
$r->setWeight($weight);
|
117 |
-
|
118 |
-
if ($request->getFreeMethodWeight()!= $request->getPackageWeight()) {
|
119 |
-
$r->setFreeMethodWeight($request->getFreeMethodWeight());
|
120 |
-
}
|
121 |
-
|
122 |
-
$r->setValue($request->getPackageValue());
|
123 |
-
$r->setValueWithDiscount($request->getPackageValueWithDiscount());
|
124 |
-
|
125 |
-
return $r;
|
126 |
-
}
|
127 |
-
|
128 |
-
protected function _getQuotes() {
|
129 |
-
$r =& $this->_request;
|
130 |
-
|
131 |
-
$customerName = trim(Mage::getSingleton('customer/session')->getCustomer()->getName());
|
132 |
-
|
133 |
-
/* Set up initial XML structure */
|
134 |
-
$requestXml = array(
|
135 |
-
'GetRatingEngineQuote' => array(
|
136 |
-
'request' => array(
|
137 |
-
'CustomerId' => (int)$r->getUserId(),
|
138 |
-
'QuoteType' => 'B2B',
|
139 |
-
'ServiceType' => $r->getServiceType(),
|
140 |
-
'QuoteShipment' => array(
|
141 |
-
'ShipmentLabel' => $this->getConfigData('shipment_label'),
|
142 |
-
'IsBlind' => ($this->getConfigData('blind_ship') ? 'true' : 'false'),
|
143 |
-
'ShipmentLocations' => array(
|
144 |
-
'Location' => array(
|
145 |
-
array(
|
146 |
-
'LocationName' => $r->getOrigName(),
|
147 |
-
'LocationType' => $r->getOrigLocationType(),
|
148 |
-
'HasLoadingDock' => $r->getOrigDock(),
|
149 |
-
'RequiresLiftgate' => $r->getOrigLiftgate(),
|
150 |
-
'IsConstructionSite' => $r->getOrigConstruction(),
|
151 |
-
'IsResidential' => $r->getOrigResidence(),
|
152 |
-
'LocationAddress' => array(
|
153 |
-
'PostalCode' => $r->getOrigPostcode(),
|
154 |
-
'CountryCode' => $r->getOrigCountry()
|
155 |
-
)
|
156 |
-
),
|
157 |
-
array(
|
158 |
-
'LocationName' => ($customerName == '' ? 'Guest' : $customerName),
|
159 |
-
'LocationType' => $r->getDestLocationType(),
|
160 |
-
'HasLoadingDock' => $r->getDestDock(),
|
161 |
-
'RequiresLiftgate' => $r->getDestLiftgate(),
|
162 |
-
'IsConstructionSite' => $r->getDestConstruction(),
|
163 |
-
'IsResidential' => $r->getDestResidence(),
|
164 |
-
'LocationAddress' => array(
|
165 |
-
'PostalCode' => $r->getDestPostcode(),
|
166 |
-
'CountryCode' => $r->getDestCountry()
|
167 |
-
)
|
168 |
-
)
|
169 |
-
)
|
170 |
-
),
|
171 |
-
'ShipmentProducts' => array(
|
172 |
-
'Product' => array()
|
173 |
-
)
|
174 |
-
)
|
175 |
-
),
|
176 |
-
'user' => array(
|
177 |
-
'Name' => $r->getUsername(),
|
178 |
-
'Password' => $r->getPassword()
|
179 |
-
)
|
180 |
-
)
|
181 |
-
);
|
182 |
-
|
183 |
-
/* Process cart items */
|
184 |
-
$cartItems = Mage::getModel('checkout/session')->getQuote()->getAllItems();
|
185 |
-
$shipmentProducts = array();
|
186 |
-
$counter = 1;
|
187 |
-
$excluded = 0;
|
188 |
-
|
189 |
-
foreach ($cartItems as $item) {
|
190 |
-
$product = $item->getProduct();
|
191 |
-
|
192 |
-
if ($product->getData('freightquote_enable') == 1) {
|
193 |
-
$shipmentProducts[] = array(
|
194 |
-
'Class' => $product->getData('freightquote_class'),
|
195 |
-
'ProductDescription' => $item->getName(),
|
196 |
-
'Weight' => ceil($item->getQty() * (int)$item->getWeight()),
|
197 |
-
'Length' => ceil($product->getData('freightquote_length')),
|
198 |
-
'Width' => ceil($product->getData('freightquote_width')),
|
199 |
-
'Height' => ceil($product->getData('freightquote_height')),
|
200 |
-
'PackageType' => ($product->getData('freightquote_packaging') ? $product->getData('freightquote_packaging') : 'Boxes'),
|
201 |
-
'DeclaredValue' => round($item->getPrice()),
|
202 |
-
'CommodityType' => ($product->getData('freightquote_commodity') ? $product->getData('freightquote_commodity') : 'GeneralMerchandise'),
|
203 |
-
'ContentType' => ($product->getData('freightquote_content') ? $product->getData('freightquote_content') : 'NewCommercialGoods'),
|
204 |
-
'IsHazardousMaterial' => ($product->getData('freightquote_hzmt') == 1 ? 'true' : 'false'),
|
205 |
-
'NMFC' => $product->getData('freightquote_nmfc'),
|
206 |
-
'PieceCount' => $item->getQty(),
|
207 |
-
'ItemNumber' => $counter
|
208 |
-
);
|
209 |
-
$counter++;
|
210 |
-
} else {
|
211 |
-
$excluded++;
|
212 |
-
}
|
213 |
-
}
|
214 |
-
|
215 |
-
$totalProducts = count($shipmentProducts);
|
216 |
-
|
217 |
-
/* Don't continue if there are no valid products */
|
218 |
-
if ($totalProducts < 1) {
|
219 |
-
return false;
|
220 |
-
}
|
221 |
-
|
222 |
-
/* Maximum 6 products allowed per query, so repeat the query multiple times if necessary */
|
223 |
-
$responses = array();
|
224 |
-
|
225 |
-
/* Only 6 items allowed per query */
|
226 |
-
for ($x = 0; $x < $totalProducts; $x+=6) {
|
227 |
-
$productRequest = array();
|
228 |
-
|
229 |
-
for ($n = 1; $n <= 6; $n++) {
|
230 |
-
$ret = ($n + $x) - 1;
|
231 |
-
if (isset($shipmentProducts[$ret])) {
|
232 |
-
$productRequest[] = $shipmentProducts[$ret];
|
233 |
-
}
|
234 |
-
}
|
235 |
-
|
236 |
-
$requestXml['GetRatingEngineQuote']['request']['QuoteShipment']['ShipmentProducts']['Product'] = $productRequest;
|
237 |
-
|
238 |
-
$response = $this->_executeRequest($requestXml);
|
239 |
-
|
240 |
-
if (!$response) {
|
241 |
-
Mage::log('Freightquote.com: Invalid response from Freightquote.com');
|
242 |
-
return false;
|
243 |
-
}
|
244 |
-
|
245 |
-
if (isset($response['GetRatingEngineQuoteResponse'])) {
|
246 |
-
$responses[] = $response['GetRatingEngineQuoteResponse'][0]['GetRatingEngineQuoteResult'][0];
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
$totalShippingPrice = array(
|
251 |
-
'rate' => 0,
|
252 |
-
'shipment_id' => ''
|
253 |
-
);
|
254 |
-
|
255 |
-
$errors = array();
|
256 |
-
|
257 |
-
foreach ($responses as $quote) {
|
258 |
-
if (@is_array($quote['QuoteCarrierOptions'])) {
|
259 |
-
if ($totalShippingPrice['shipment_id'] != '') $totalShippingPrice['shipment_id'] .= ' & ';
|
260 |
-
$totalShippingPrice['shipment_id'] .= $quote['QuoteId'];
|
261 |
-
|
262 |
-
$totalShippingPrice['rate'] += preg_replace('/[^0-9\.]/', '', $quote['QuoteCarrierOptions'][0]['CarrierOption'][0]['QuoteAmount']);
|
263 |
-
} elseif (@count($quote['ValidationErrors']) > 0) {
|
264 |
-
foreach ($quote['ValidationErrors'][0]['B2BError'] as $errorMsg) {
|
265 |
-
$errors[] = $errorMsg['ErrorMessage'];
|
266 |
-
}
|
267 |
-
}
|
268 |
-
}
|
269 |
-
|
270 |
-
/* If there are any validation errors, don't display this shipping option */
|
271 |
-
if (count($errors) > 0) {
|
272 |
-
Mage::log('Freightquote.com: Validation errors. No rate was returned.');
|
273 |
-
return false;
|
274 |
-
}
|
275 |
-
|
276 |
-
|
277 |
-
/* If the shipping price is 0 and no errors were returned, don't display this shipping option */
|
278 |
-
if ($totalShippingPrice['rate'] <= 0 && count($errors) < 1) {
|
279 |
-
Mage::log('Freightquote.com: Total shipping price returned was 0');
|
280 |
-
return false;
|
281 |
-
}
|
282 |
-
|
283 |
-
//Add price modifier
|
284 |
-
if ($this->getConfigData('rate_modifier') > 0) {
|
285 |
-
$totalShippingPrice['rate'] = $totalShippingPrice['rate'] * $this->getConfigData('rate_modifier');
|
286 |
-
}
|
287 |
-
|
288 |
-
//Add handling charges
|
289 |
-
if ($this->getConfigData('handling_fee') > 0) {
|
290 |
-
if ($this->getConfigData('handling_action') == 'O') {
|
291 |
-
$totalShippingPrice['rate'] += $this->getConfigData('handling_fee');
|
292 |
-
} elseif ($this->getConfigData('handling_action') == 'P') {
|
293 |
-
$totalShippingPrice['rate'] += $this->getConfigData('handling_fee') * $totalProducts;
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
$this->_result = Mage::getModel('shipping/rate_result');
|
298 |
-
|
299 |
-
$method = Mage::getModel('shipping/rate_result_method');
|
300 |
-
$method->setCarrier($this->_code);
|
301 |
-
$method->setCarrierTitle($this->getConfigData('title'));
|
302 |
-
$method->setMethod('default');
|
303 |
-
$method->setMethodTitle('Quote #: ' . $totalShippingPrice['shipment_id']);
|
304 |
-
$method->setPrice($totalShippingPrice['rate']);
|
305 |
-
|
306 |
-
$this->_result->append($method);
|
307 |
-
|
308 |
-
return true;
|
309 |
-
}
|
310 |
-
|
311 |
-
protected function _executeRequest($arr) {
|
312 |
-
//Make sure cURL exists
|
313 |
-
if (!function_exists('curl_init')) {
|
314 |
-
Mage::log('Freightquote.com: cURL not found on the server.');
|
315 |
-
return false;
|
316 |
-
}
|
317 |
-
|
318 |
-
//XML template file used for request
|
319 |
-
$xml = $this->_arrayToXml($arr);
|
320 |
-
|
321 |
-
//Initialize curl
|
322 |
-
$ch = curl_init();
|
323 |
-
|
324 |
-
$headers = array(
|
325 |
-
'Content-Type: text/xml; charset=utf-8',
|
326 |
-
'Content-Length: ' . strlen($xml),
|
327 |
-
'SOAPAction: "http://tempuri.org/GetRatingEngineQuote"'
|
328 |
-
);
|
329 |
-
|
330 |
-
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
331 |
-
curl_setopt($ch, CURLOPT_HEADER, 0);
|
332 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
333 |
-
curl_setopt($ch, CURLOPT_TIMEOUT, 180);
|
334 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
335 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
336 |
-
curl_setopt($ch, CURLOPT_POST, 1);
|
337 |
-
curl_setopt($ch, CURLOPT_URL, $this->_gatewayUrl);
|
338 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
|
339 |
-
|
340 |
-
$this->_response = curl_exec($ch);
|
341 |
-
|
342 |
-
if (curl_errno($ch) == 0) {
|
343 |
-
curl_close($ch);
|
344 |
-
|
345 |
-
//Simple check to make sure that this is a valid XML response
|
346 |
-
if (strpos(strtolower($this->_response), 'soap:envelope') === false) {
|
347 |
-
Mage::log('Freightquote.com: Invalid response from server.');
|
348 |
-
return false;
|
349 |
-
}
|
350 |
-
|
351 |
-
if ($this->_response) {
|
352 |
-
//Convert the XML into an easy-to-use associative array
|
353 |
-
$this->_response = $this->_parseXml($this->_response);
|
354 |
-
}
|
355 |
-
|
356 |
-
return $this->_response;
|
357 |
-
} else {
|
358 |
-
//Collect the error returned
|
359 |
-
$curlErrors = curl_error($ch) . ' (Error No. ' . curl_errno($ch) . ')';
|
360 |
-
|
361 |
-
curl_close($ch);
|
362 |
-
|
363 |
-
Mage::log('Freightquote.com: ' . $curlErrors);
|
364 |
-
return false;
|
365 |
-
}
|
366 |
-
}
|
367 |
-
|
368 |
-
protected function _getPickupDate() {
|
369 |
-
$nextDate = date("U")+86400;
|
370 |
-
|
371 |
-
$workDay = date("w", $nextDate);
|
372 |
-
|
373 |
-
if ($workDay > 0 && $workDay < 6) {
|
374 |
-
while ($this->_isHoliday($nextDate)) {
|
375 |
-
$nextDate += 86400;
|
376 |
-
$workDay = date("w", $nextDate);
|
377 |
-
}
|
378 |
-
return date(DATE_ATOM, $nextDate);
|
379 |
-
} else {
|
380 |
-
while ($workDay < 1 || $workDay > 5) {
|
381 |
-
$nextDate += 86400;
|
382 |
-
$workDay = date("w", $nextDate);
|
383 |
-
if ($workDay > 0 && $workDay < 6) {
|
384 |
-
while ($this->_isHoliday($nextDate)) {
|
385 |
-
$nextDate += 86400;
|
386 |
-
$workDay = date("w", $nextDate);
|
387 |
-
}
|
388 |
-
return date(DATE_ATOM, $nextDate);
|
389 |
-
}
|
390 |
-
}
|
391 |
-
}
|
392 |
-
}
|
393 |
-
|
394 |
-
protected function _isHoliday($date) {
|
395 |
-
$fed_holidays = array(
|
396 |
-
"2010-01-01", "2010-01-18", "2010-02-15", "2010-05-31",
|
397 |
-
"2010-07-05", "2010-09-06", "2010-10-11", "2010-11-11",
|
398 |
-
"2010-11-25", "2010-12-24",
|
399 |
-
|
400 |
-
"2010-12-31", "2011-01-17", "2011-02-21", "2011-05-30",
|
401 |
-
"2011-07-04", "2011-09-05", "2011-10-10", "2011-11-11",
|
402 |
-
"2011-11-24", "2011-12-26",
|
403 |
-
|
404 |
-
"2012-01-02", "2012-01-16", "2012-02-20", "2012-05-28",
|
405 |
-
"2012-07-04", "2012-09-03", "2012-10-08", "2012-11-12",
|
406 |
-
"2012-11-22", "2012-12-25"
|
407 |
-
);
|
408 |
-
|
409 |
-
if (in_array(date("Y-m-d", $date), $fed_holidays)) {
|
410 |
-
return true;
|
411 |
-
}
|
412 |
-
|
413 |
-
return false;
|
414 |
-
}
|
415 |
-
|
416 |
-
protected function _arrayToXml($array, $wrapper = true) {
|
417 |
-
$xml = '';
|
418 |
-
|
419 |
-
if ($wrapper) {
|
420 |
-
$xml = '<?xml version="1.0" encoding="utf-8"?>' . "\n" .
|
421 |
-
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' . "\n" .
|
422 |
-
'xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' . "\n" .
|
423 |
-
'<soap:Body>' . "\n";
|
424 |
-
}
|
425 |
-
|
426 |
-
$first_key = true;
|
427 |
-
|
428 |
-
foreach ($array as $key => $value) {
|
429 |
-
$position = 0;
|
430 |
-
|
431 |
-
if (is_array($value)) {
|
432 |
-
$is_value_assoc = $this->_isAssoc($value);
|
433 |
-
$xml .= "<$key" . ($first_key && $wrapper ? ' xmlns="http://tempuri.org/"' : '') . ">\n";
|
434 |
-
$first_key = false;
|
435 |
-
|
436 |
-
foreach ($value as $key2 => $value2) {
|
437 |
-
if (is_array($value2)) {
|
438 |
-
if ($is_value_assoc) {
|
439 |
-
$xml .= "<$key2>\n" . $this->_arrayToXml($value2, false) . "</$key2>\n";
|
440 |
-
} elseif (is_array($value2)) {
|
441 |
-
$xml .= $this->_arrayToXml($value2, false);
|
442 |
-
$position++;
|
443 |
-
|
444 |
-
if ($position < count($value) && count($value) > 1) $xml .= "</$key>\n<$key>\n";
|
445 |
-
}
|
446 |
-
} else {
|
447 |
-
$xml .= "<$key2>" . $this->_xmlSafe($value2) . "</$key2>\n";
|
448 |
-
}
|
449 |
-
}
|
450 |
-
$xml .= "</$key>\n";
|
451 |
-
} else {
|
452 |
-
|
453 |
-
$xml .= "<$key>" . $this->_xmlSafe($value) . "</$key>\n";
|
454 |
-
}
|
455 |
-
}
|
456 |
-
|
457 |
-
if ($wrapper) {
|
458 |
-
$xml .= '</soap:Body>' . "\n" .
|
459 |
-
'</soap:Envelope>';
|
460 |
-
}
|
461 |
-
|
462 |
-
return $xml;
|
463 |
-
}
|
464 |
-
|
465 |
-
protected function _isAssoc($array) {
|
466 |
-
return (is_array($array) && 0 !== count(array_diff_key($array, array_keys(array_keys($array)))));
|
467 |
-
}
|
468 |
-
|
469 |
-
protected function _parseXml($text) {
|
470 |
-
$reg_exp = '/<(\w+)[^>]*>(.*?)<\/\\1>/s';
|
471 |
-
preg_match_all($reg_exp, $text, $match);
|
472 |
-
foreach ($match[1] as $key=>$val) {
|
473 |
-
if ( preg_match($reg_exp, $match[2][$key]) ) {
|
474 |
-
$array[$val][] = $this->_parseXml($match[2][$key]);
|
475 |
-
} else {
|
476 |
-
$array[$val] = $match[2][$key];
|
477 |
-
}
|
478 |
-
}
|
479 |
-
return $array;
|
480 |
-
}
|
481 |
-
|
482 |
-
protected function _xmlSafe($str) {
|
483 |
-
//The 5 evil characters in XML
|
484 |
-
$str = str_replace('<', '<', $str);
|
485 |
-
$str = str_replace('>', '>', $str);
|
486 |
-
$str = str_replace('&', '&', $str);
|
487 |
-
$str = str_replace("'", ''', $str);
|
488 |
-
$str = str_replace('"', '"', $str);
|
489 |
-
|
490 |
-
return $str;
|
491 |
-
}
|
492 |
-
|
493 |
-
public function getCode($type, $code = '') {
|
494 |
-
$codes = array(
|
495 |
-
'classes' => array(
|
496 |
-
array('value' => '50', 'label' => '50'),
|
497 |
-
array('value' => '55', 'label' => '55'),
|
498 |
-
array('value' => '60', 'label' => '60'),
|
499 |
-
array('value' => '65', 'label' => '65'),
|
500 |
-
array('value' => '70', 'label' => '70'),
|
501 |
-
array('value' => '77.5', 'label' => '77.5'),
|
502 |
-
array('value' => '85', 'label' => '85'),
|
503 |
-
array('value' => '92.5', 'label' => '92.5'),
|
504 |
-
array('value' => '100', 'label' => '100'),
|
505 |
-
array('value' => '110', 'label' => '110'),
|
506 |
-
array('value' => '125', 'label' => '125'),
|
507 |
-
array('value' => '150', 'label' => '150'),
|
508 |
-
array('value' => '175', 'label' => '175'),
|
509 |
-
array('value' => '200', 'label' => '200'),
|
510 |
-
array('value' => '250', 'label' => '250'),
|
511 |
-
array('value' => '300', 'label' => '300'),
|
512 |
-
array('value' => '400', 'label' => '400'),
|
513 |
-
array('value' => '500', 'label' => '500')
|
514 |
-
),
|
515 |
-
|
516 |
-
'packaging' => array(
|
517 |
-
array('value' => 'Bags', 'label' => 'Bags'),
|
518 |
-
array('value' => 'Bales', 'label' => 'Bales'),
|
519 |
-
array('value' => 'Boxes', 'label' => 'Boxes'),
|
520 |
-
array('value' => 'Bundles', 'label' => 'Bundles'),
|
521 |
-
array('value' => 'Carpets', 'label' => 'Carpets'),
|
522 |
-
array('value' => 'Coils', 'label' => 'Coils'),
|
523 |
-
array('value' => 'Crates', 'label' => 'Crates'),
|
524 |
-
array('value' => 'Cylinders', 'label' => 'Cylinders'),
|
525 |
-
array('value' => 'Drums', 'label' => 'Drums'),
|
526 |
-
array('value' => 'Pails', 'label' => 'Pails'),
|
527 |
-
array('value' => 'Reels', 'label' => 'Reels'),
|
528 |
-
array('value' => 'Rolls', 'label' => 'Rolls'),
|
529 |
-
array('value' => 'TubesPipes', 'label' => 'Tubes/Pipes'),
|
530 |
-
array('value' => 'Motorcycle', 'label' => 'Motorcycle'),
|
531 |
-
array('value' => 'ATV', 'label' => 'ATV'),
|
532 |
-
array('value' => 'Pallets_48x40', 'label' => 'Pallets 48x40'),
|
533 |
-
array('value' => 'Pallets_other', 'label' => 'Pallets Other'),
|
534 |
-
array('value' => 'Pallets_120x120', 'label' => 'Pallets 120x120'),
|
535 |
-
array('value' => 'Pallets_120x100', 'label' => 'Pallets 120x100'),
|
536 |
-
array('value' => 'Pallets_120x80', 'label' => 'Pallets 120x80'),
|
537 |
-
array('value' => 'Pallets_europe', 'label' => 'Pallets Europe'),
|
538 |
-
array('value' => 'Pallets_48x48', 'label' => 'Pallets 48x48'),
|
539 |
-
array('value' => 'Pallets_60x48', 'label' => 'Pallets 60x48')
|
540 |
-
),
|
541 |
-
|
542 |
-
'commodities' => array(
|
543 |
-
array('value' => 'GeneralMerchandise', 'label' => 'General Merchandise'),
|
544 |
-
array('value' => 'Machinery', 'label' => 'Machinery'),
|
545 |
-
array('value' => 'HouseholdGoods', 'label' => 'Household Goods'),
|
546 |
-
array('value' => 'FragileGoods', 'label' => 'Fragile Goods'),
|
547 |
-
array('value' => 'ComputerHardware', 'label' => 'Computer Hardware'),
|
548 |
-
array('value' => 'BottledProducts', 'label' => 'Bottled Products'),
|
549 |
-
array('value' => 'BottleBeverages', 'label' => 'Bottle Beverages'),
|
550 |
-
array('value' => 'NonPerishableFood', 'label' => 'Non Perishable Food'),
|
551 |
-
array('value' => 'SteelSheet', 'label' => 'Steel Sheet'),
|
552 |
-
array('value' => 'BrandedGoods', 'label' => 'Branded Goods'),
|
553 |
-
array('value' => 'PrecisionInstruments', 'label' => 'Precision Instruments'),
|
554 |
-
array('value' => 'ChemicalsHazardous', 'label' => 'Chemicals Hazardous'),
|
555 |
-
array('value' => 'FineArt', 'label' => 'Fine Art'),
|
556 |
-
array('value' => 'Automobiles', 'label' => 'Automobiles'),
|
557 |
-
array('value' => 'CellPhones', 'label' => 'Cell Phones'),
|
558 |
-
array('value' => 'NewMachinery', 'label' => 'New Machinery'),
|
559 |
-
array('value' => 'UsedMachinery', 'label' => 'Used Machinery'),
|
560 |
-
array('value' => 'HotTubs', 'label' => 'Hot Tubs')
|
561 |
-
),
|
562 |
-
|
563 |
-
'contents' => array(
|
564 |
-
array('value' => 'NewCommercialGoods', 'label' => 'New Commercial Goods'),
|
565 |
-
array('value' => 'UsedCommercialGoods', 'label' => 'Used Commercial Goods'),
|
566 |
-
array('value' => 'HouseholdGoods', 'label' => 'Household Goods'),
|
567 |
-
array('value' => 'FragileGoods', 'label' => 'Fragile Goods'),
|
568 |
-
array('value' => 'Automobile', 'label' => 'Automobile'),
|
569 |
-
array('value' => 'Motorcycle', 'label' => 'Motorcycle'),
|
570 |
-
array('value' => 'AutoOrMotorcycle', 'label' => 'Auto or Motorcycle')
|
571 |
-
),
|
572 |
-
|
573 |
-
'location_type' => array(
|
574 |
-
array('value' => 'Origin', 'label' => 'Origin'),
|
575 |
-
array('value' => 'Destination', 'label' => 'Destination'),
|
576 |
-
array('value' => 'StopoffPickupDelivery', 'label' => 'Stopoff Pickup Delivery'),
|
577 |
-
array('value' => 'StopoffDelivery', 'label' => 'Stopoff Delivery'),
|
578 |
-
array('value' => 'StopoffPickup', 'label' => 'Stopoff Pickup'),
|
579 |
-
),
|
580 |
-
|
581 |
-
'service_type' => array(
|
582 |
-
array('value' => 'LTL', 'label' => 'LTL'),
|
583 |
-
array('value' => 'Truckload', 'label' => 'Truckload')
|
584 |
-
//array('value' => 'Europe', 'label' => 'Europe'),
|
585 |
-
//array('value' => 'Groupage', 'label' => 'Groupage'),
|
586 |
-
//array('value' => 'Haulage', 'label' => 'Haulage')
|
587 |
-
)
|
588 |
-
);
|
589 |
-
|
590 |
-
if (!isset($codes[$type])) {
|
591 |
-
return false;
|
592 |
-
} elseif ('' === $code) {
|
593 |
-
return $codes[$type];
|
594 |
-
}
|
595 |
-
|
596 |
-
if (!isset($codes[$type][$code])) {
|
597 |
-
return false;
|
598 |
-
} else {
|
599 |
-
return $codes[$type][$code];
|
600 |
-
}
|
601 |
-
}
|
602 |
-
}
|
603 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Model_Carrier_Source_Class extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
13 |
-
public function toOptionArray() {
|
14 |
-
$freightquote = Mage::getSingleton('freightquote/carrier_shipping');
|
15 |
-
|
16 |
-
$arr = $freightquote->getCode('classes');
|
17 |
-
|
18 |
-
return $arr;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function getAllOptions() {
|
22 |
-
return $this->toOptionArray();
|
23 |
-
}
|
24 |
-
}
|
25 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/Model/Carrier/Source/Commodity.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Model_Carrier_Source_Commodity extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
13 |
-
public function toOptionArray() {
|
14 |
-
$freightquote = Mage::getSingleton('freightquote/carrier_shipping');
|
15 |
-
|
16 |
-
$arr = $freightquote->getCode('commodities');
|
17 |
-
|
18 |
-
return $arr;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function getAllOptions() {
|
22 |
-
return $this->toOptionArray();
|
23 |
-
}
|
24 |
-
}
|
25 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/Model/Carrier/Source/Content.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Model_Carrier_Source_Content extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
13 |
-
public function toOptionArray() {
|
14 |
-
$freightquote = Mage::getSingleton('freightquote/carrier_shipping');
|
15 |
-
|
16 |
-
$arr = $freightquote->getCode('contents');
|
17 |
-
|
18 |
-
return $arr;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function getAllOptions() {
|
22 |
-
return $this->toOptionArray();
|
23 |
-
}
|
24 |
-
}
|
25 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/Model/Carrier/Source/Locationtype.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Model_Carrier_Source_Locationtype extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
13 |
-
public function toOptionArray() {
|
14 |
-
$freightquote = Mage::getSingleton('freightquote/carrier_shipping');
|
15 |
-
|
16 |
-
$arr = $freightquote->getCode('location_type');
|
17 |
-
|
18 |
-
return $arr;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function getAllOptions() {
|
22 |
-
return $this->toOptionArray();
|
23 |
-
}
|
24 |
-
}
|
25 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/Model/Carrier/Source/Packaging.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Model_Carrier_Source_Packaging extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
13 |
-
public function toOptionArray() {
|
14 |
-
$freightquote = Mage::getSingleton('freightquote/carrier_shipping');
|
15 |
-
|
16 |
-
$arr = $freightquote->getCode('packaging');
|
17 |
-
|
18 |
-
return $arr;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function getAllOptions() {
|
22 |
-
return $this->toOptionArray();
|
23 |
-
}
|
24 |
-
}
|
25 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/Model/Carrier/Source/Servicetype.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Model_Carrier_Source_Servicetype extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
13 |
-
public function toOptionArray() {
|
14 |
-
$freightquote = Mage::getSingleton('freightquote/carrier_shipping');
|
15 |
-
|
16 |
-
$arr = $freightquote->getCode('service_type');
|
17 |
-
|
18 |
-
return $arr;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function getAllOptions() {
|
22 |
-
return $this->toOptionArray();
|
23 |
-
}
|
24 |
-
}
|
25 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/Model/Resource/Eav/Mysql4/Setup.php
DELETED
@@ -1,239 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Freightquote_Shipping_Model_Resource_Eav_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup {
|
13 |
-
|
14 |
-
public function getDefaultEntities() {
|
15 |
-
return array(
|
16 |
-
'catalog_product' => array(
|
17 |
-
'entity_model' => 'catalog/product',
|
18 |
-
'attribute_model' => 'catalog/resource_eav_attribute',
|
19 |
-
'table' => 'catalog/product',
|
20 |
-
'additional_attribute_table' => 'catalog/eav_attribute',
|
21 |
-
'entity_attribute_collection' => 'catalog/product_attribute_collection',
|
22 |
-
'attributes' => array(
|
23 |
-
'freightquote_enable' => array(
|
24 |
-
'group' => 'Freightquote.com',
|
25 |
-
'type' => 'int',
|
26 |
-
'backend' => '',
|
27 |
-
'frontend' => '',
|
28 |
-
'label' => 'Ship with Freightquote.com',
|
29 |
-
'input' => 'select',
|
30 |
-
'class' => '',
|
31 |
-
'source' => 'eav/entity_attribute_source_boolean',
|
32 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
33 |
-
'visible' => true,
|
34 |
-
'required' => true,
|
35 |
-
'user_defined' => false,
|
36 |
-
'default' => '0',
|
37 |
-
'searchable' => false,
|
38 |
-
'filterable' => false,
|
39 |
-
'comparable' => false,
|
40 |
-
'visible_on_front' => false,
|
41 |
-
'unique' => false,
|
42 |
-
'apply_to' => 'simple'
|
43 |
-
),
|
44 |
-
'freightquote_class' => array(
|
45 |
-
'group' => 'Freightquote.com',
|
46 |
-
'type' => 'varchar',
|
47 |
-
'backend' => '',
|
48 |
-
'frontend' => '',
|
49 |
-
'label' => 'Freight Class',
|
50 |
-
'input' => 'select',
|
51 |
-
'class' => '',
|
52 |
-
'source' => 'Freightquote_Shipping_Model_Carrier_Source_Class',
|
53 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
54 |
-
'visible' => true,
|
55 |
-
'required' => true,
|
56 |
-
'user_defined' => false,
|
57 |
-
'default' => '50',
|
58 |
-
'searchable' => false,
|
59 |
-
'filterable' => false,
|
60 |
-
'comparable' => false,
|
61 |
-
'visible_on_front' => false,
|
62 |
-
'unique' => false,
|
63 |
-
'apply_to' => 'simple'
|
64 |
-
),
|
65 |
-
'freightquote_length' => array(
|
66 |
-
'group' => 'Freightquote.com',
|
67 |
-
'type' => 'int',
|
68 |
-
'backend' => '',
|
69 |
-
'frontend' => '',
|
70 |
-
'label' => 'Length (inches)',
|
71 |
-
'input' => 'text',
|
72 |
-
'width' => '50',
|
73 |
-
'class' => '',
|
74 |
-
'source' => '',
|
75 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
76 |
-
'visible' => true,
|
77 |
-
'required' => true,
|
78 |
-
'user_defined' => false,
|
79 |
-
'default' => '0',
|
80 |
-
'searchable' => false,
|
81 |
-
'filterable' => false,
|
82 |
-
'comparable' => false,
|
83 |
-
'visible_on_front' => false,
|
84 |
-
'unique' => false,
|
85 |
-
'apply_to' => 'simple'
|
86 |
-
),
|
87 |
-
'freightquote_width' => array(
|
88 |
-
'group' => 'Freightquote.com',
|
89 |
-
'type' => 'int',
|
90 |
-
'backend' => '',
|
91 |
-
'frontend' => '',
|
92 |
-
'label' => 'Width (inches)',
|
93 |
-
'input' => 'text',
|
94 |
-
'class' => '',
|
95 |
-
'source' => '',
|
96 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
97 |
-
'visible' => true,
|
98 |
-
'required' => true,
|
99 |
-
'user_defined' => false,
|
100 |
-
'default' => '0',
|
101 |
-
'searchable' => false,
|
102 |
-
'filterable' => false,
|
103 |
-
'comparable' => false,
|
104 |
-
'visible_on_front' => false,
|
105 |
-
'unique' => false,
|
106 |
-
'apply_to' => 'simple'
|
107 |
-
),
|
108 |
-
'freightquote_height' => array(
|
109 |
-
'group' => 'Freightquote.com',
|
110 |
-
'type' => 'int',
|
111 |
-
'backend' => '',
|
112 |
-
'frontend' => '',
|
113 |
-
'label' => 'Height (inches)',
|
114 |
-
'input' => 'text',
|
115 |
-
'class' => '',
|
116 |
-
'source' => '',
|
117 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
118 |
-
'visible' => true,
|
119 |
-
'required' => true,
|
120 |
-
'user_defined' => false,
|
121 |
-
'default' => '0',
|
122 |
-
'searchable' => false,
|
123 |
-
'filterable' => false,
|
124 |
-
'comparable' => false,
|
125 |
-
'visible_on_front' => false,
|
126 |
-
'unique' => false,
|
127 |
-
'apply_to' => 'simple'
|
128 |
-
),
|
129 |
-
'freightquote_nmfc' => array(
|
130 |
-
'group' => 'Freightquote.com',
|
131 |
-
'type' => 'varchar',
|
132 |
-
'backend' => '',
|
133 |
-
'frontend' => '',
|
134 |
-
'label' => 'NMFC (optional)',
|
135 |
-
'input' => 'text',
|
136 |
-
'class' => '',
|
137 |
-
'source' => '',
|
138 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
139 |
-
'visible' => true,
|
140 |
-
'required' => false,
|
141 |
-
'user_defined' => false,
|
142 |
-
'default' => '',
|
143 |
-
'searchable' => false,
|
144 |
-
'filterable' => false,
|
145 |
-
'comparable' => false,
|
146 |
-
'visible_on_front' => false,
|
147 |
-
'unique' => false,
|
148 |
-
'apply_to' => 'simple'
|
149 |
-
),
|
150 |
-
'freightquote_hzmt' => array(
|
151 |
-
'group' => 'Freightquote.com',
|
152 |
-
'type' => 'int',
|
153 |
-
'backend' => '',
|
154 |
-
'frontend' => '',
|
155 |
-
'label' => 'Hazardous Material',
|
156 |
-
'input' => 'select',
|
157 |
-
'class' => '',
|
158 |
-
'source' => 'eav/entity_attribute_source_boolean',
|
159 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
160 |
-
'visible' => true,
|
161 |
-
'required' => true,
|
162 |
-
'user_defined' => false,
|
163 |
-
'default' => '0',
|
164 |
-
'searchable' => false,
|
165 |
-
'filterable' => false,
|
166 |
-
'comparable' => false,
|
167 |
-
'visible_on_front' => false,
|
168 |
-
'unique' => false,
|
169 |
-
'apply_to' => 'simple'
|
170 |
-
),
|
171 |
-
'freightquote_packaging' => array(
|
172 |
-
'group' => 'Freightquote.com',
|
173 |
-
'type' => 'varchar',
|
174 |
-
'backend' => '',
|
175 |
-
'frontend' => '',
|
176 |
-
'label' => 'Packaging Type',
|
177 |
-
'input' => 'select',
|
178 |
-
'class' => '',
|
179 |
-
'source' => 'Freightquote_Shipping_Model_Carrier_Source_Packaging',
|
180 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
181 |
-
'visible' => true,
|
182 |
-
'required' => true,
|
183 |
-
'user_defined' => false,
|
184 |
-
'default' => 'Boxes',
|
185 |
-
'searchable' => false,
|
186 |
-
'filterable' => false,
|
187 |
-
'comparable' => false,
|
188 |
-
'visible_on_front' => false,
|
189 |
-
'unique' => false,
|
190 |
-
'apply_to' => 'simple'
|
191 |
-
),
|
192 |
-
'freightquote_commodity' => array(
|
193 |
-
'group' => 'Freightquote.com',
|
194 |
-
'type' => 'varchar',
|
195 |
-
'backend' => '',
|
196 |
-
'frontend' => '',
|
197 |
-
'label' => 'Commodity Type',
|
198 |
-
'input' => 'select',
|
199 |
-
'class' => '',
|
200 |
-
'source' => 'Freightquote_Shipping_Model_Carrier_Source_Commodity',
|
201 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
202 |
-
'visible' => true,
|
203 |
-
'required' => true,
|
204 |
-
'user_defined' => false,
|
205 |
-
'default' => 'GeneralMerchandise',
|
206 |
-
'searchable' => false,
|
207 |
-
'filterable' => false,
|
208 |
-
'comparable' => false,
|
209 |
-
'visible_on_front' => false,
|
210 |
-
'unique' => false,
|
211 |
-
'apply_to' => 'simple'
|
212 |
-
),
|
213 |
-
'freightquote_content' => array(
|
214 |
-
'group' => 'Freightquote.com',
|
215 |
-
'type' => 'varchar',
|
216 |
-
'backend' => '',
|
217 |
-
'frontend' => '',
|
218 |
-
'label' => 'Contents Type',
|
219 |
-
'input' => 'select',
|
220 |
-
'class' => '',
|
221 |
-
'source' => 'Freightquote_Shipping_Model_Carrier_Source_Content',
|
222 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
223 |
-
'visible' => true,
|
224 |
-
'required' => true,
|
225 |
-
'user_defined' => false,
|
226 |
-
'default' => 'NewCommercialGoods',
|
227 |
-
'searchable' => false,
|
228 |
-
'filterable' => false,
|
229 |
-
'comparable' => false,
|
230 |
-
'visible_on_front' => false,
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/etc/config.xml
DELETED
@@ -1,94 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
-->
|
11 |
-
<config>
|
12 |
-
<modules>
|
13 |
-
<Freightquote_Shipping>
|
14 |
-
<version>1.0.0</version>
|
15 |
-
<depends>
|
16 |
-
<Mage_Shipping />
|
17 |
-
</depends>
|
18 |
-
</Freightquote_Shipping>
|
19 |
-
</modules>
|
20 |
-
<global>
|
21 |
-
<models>
|
22 |
-
<freightquote>
|
23 |
-
<class>Freightquote_Shipping_Model</class>
|
24 |
-
</freightquote>
|
25 |
-
</models>
|
26 |
-
<resources>
|
27 |
-
<freightquote_setup>
|
28 |
-
<setup>
|
29 |
-
<module>Freightquote_Shipping</module>
|
30 |
-
<class>Freightquote_Shipping_Model_Resource_Eav_Mysql4_Setup</class>
|
31 |
-
</setup>
|
32 |
-
<connection>
|
33 |
-
<use>core_setup</use>
|
34 |
-
</connection>
|
35 |
-
</freightquote_setup>
|
36 |
-
<freightquote_write>
|
37 |
-
<connection>
|
38 |
-
<use>core_write</use>
|
39 |
-
</connection>
|
40 |
-
</freightquote_write>
|
41 |
-
<freightquote_read>
|
42 |
-
<connection>
|
43 |
-
<use>core_read</use>
|
44 |
-
</connection>
|
45 |
-
</freightquote_read>
|
46 |
-
</resources>
|
47 |
-
<!-- No longer necessary
|
48 |
-
<events>
|
49 |
-
<core_block_abstract_prepare_layout_after>
|
50 |
-
<observers>
|
51 |
-
<freightquote_carrier_observer>
|
52 |
-
<type>Model</type>
|
53 |
-
<class>freightquote/carrier_observer</class>
|
54 |
-
<method>addProductInformationTab</method>
|
55 |
-
</freightquote_carrier_observer>
|
56 |
-
</observers>
|
57 |
-
</core_block_abstract_prepare_layout_after>
|
58 |
-
</events>
|
59 |
-
-->
|
60 |
-
<sales>
|
61 |
-
<quote>
|
62 |
-
<item>
|
63 |
-
<product_attributes>
|
64 |
-
<freightquote_enable/>
|
65 |
-
<freightquote_class/>
|
66 |
-
<freightquote_length/>
|
67 |
-
<freightquote_width/>
|
68 |
-
<freightquote_height/>
|
69 |
-
<freightquote_nmfc/>
|
70 |
-
<freightquote_hzmt/>
|
71 |
-
<freightquote_packaging/>
|
72 |
-
<freightquote_commodity/>
|
73 |
-
<freightquote_content/>
|
74 |
-
</product_attributes>
|
75 |
-
</item>
|
76 |
-
</quote>
|
77 |
-
</sales>
|
78 |
-
</global>
|
79 |
-
<default>
|
80 |
-
<carriers>
|
81 |
-
<freightquote>
|
82 |
-
<model>Freightquote_Shipping_Model_Carrier_Shipping</model>
|
83 |
-
<title>Freightquote.com</title>
|
84 |
-
<username>Xmltest@freightquote.com</username>
|
85 |
-
<password>XML</password>
|
86 |
-
<shipment_label>Thank you for shopping with us!</shipment_label>
|
87 |
-
<origin_country>US</origin_country>
|
88 |
-
<origin_location_type>Origin</origin_location_type>
|
89 |
-
<destination_location_type>Destination</destination_location_type>
|
90 |
-
<rate_modifier>1</rate_modifier>
|
91 |
-
</freightquote>
|
92 |
-
</carriers>
|
93 |
-
</default>
|
94 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/etc/system.xml
DELETED
@@ -1,252 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
-->
|
11 |
-
<config>
|
12 |
-
<sections>
|
13 |
-
<carriers>
|
14 |
-
<groups>
|
15 |
-
<freightquote translate="label" module="shipping">
|
16 |
-
<label>Freightquote.com</label>
|
17 |
-
<frontend_type>text</frontend_type>
|
18 |
-
<sort_order>13</sort_order>
|
19 |
-
<show_in_default>1</show_in_default>
|
20 |
-
<show_in_website>1</show_in_website>
|
21 |
-
<show_in_store>1</show_in_store>
|
22 |
-
<fields>
|
23 |
-
<active translate="label">
|
24 |
-
<label>Enabled</label>
|
25 |
-
<frontend_type>select</frontend_type>
|
26 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
27 |
-
<sort_order>1</sort_order>
|
28 |
-
<show_in_default>1</show_in_default>
|
29 |
-
<show_in_website>1</show_in_website>
|
30 |
-
<show_in_store>0</show_in_store>
|
31 |
-
</active>
|
32 |
-
<title translate="label">
|
33 |
-
<label>Title</label>
|
34 |
-
<frontend_type>text</frontend_type>
|
35 |
-
<sort_order>2</sort_order>
|
36 |
-
<show_in_default>1</show_in_default>
|
37 |
-
<show_in_website>1</show_in_website>
|
38 |
-
<show_in_store>1</show_in_store>
|
39 |
-
<comment>This is the shipping method title your customers will see.</comment>
|
40 |
-
</title>
|
41 |
-
<username translate="label">
|
42 |
-
<label>Username</label>
|
43 |
-
<frontend_type>text</frontend_type>
|
44 |
-
<sort_order>3</sort_order>
|
45 |
-
<show_in_default>1</show_in_default>
|
46 |
-
<show_in_website>1</show_in_website>
|
47 |
-
<show_in_store>0</show_in_store>
|
48 |
-
<comment>Enter the e-mail address used to log into Freightquote.com.</comment>
|
49 |
-
</username>
|
50 |
-
<password translate="label">
|
51 |
-
<label>Password</label>
|
52 |
-
<frontend_type>text</frontend_type>
|
53 |
-
<sort_order>4</sort_order>
|
54 |
-
<show_in_default>1</show_in_default>
|
55 |
-
<show_in_website>1</show_in_website>
|
56 |
-
<show_in_store>0</show_in_store>
|
57 |
-
<comment>Enter the password used to log into Freightquote.com.</comment>
|
58 |
-
</password>
|
59 |
-
<shipment_label translate="label">
|
60 |
-
<label>Shipping Label</label>
|
61 |
-
<frontend_type>text</frontend_type>
|
62 |
-
<sort_order>5</sort_order>
|
63 |
-
<show_in_default>1</show_in_default>
|
64 |
-
<show_in_website>1</show_in_website>
|
65 |
-
<show_in_store>0</show_in_store>
|
66 |
-
<comment>This can be used to assign a label to the shipment that will be meaningful to the end user.</comment>
|
67 |
-
</shipment_label>
|
68 |
-
<service_type translate="label">
|
69 |
-
<label>Service Type</label>
|
70 |
-
<frontend_type>select</frontend_type>
|
71 |
-
<source_model>Freightquote_Shipping_Model_Carrier_Source_Servicetype</source_model>
|
72 |
-
<sort_order>6</sort_order>
|
73 |
-
<show_in_default>1</show_in_default>
|
74 |
-
<show_in_website>1</show_in_website>
|
75 |
-
<show_in_store>0</show_in_store>
|
76 |
-
<comment>Select the service type you will use for your shipments.</comment>
|
77 |
-
</service_type>
|
78 |
-
<origin_location_type translate="label">
|
79 |
-
<label><![CDATA[<b>ORIGIN:</b> Location Type]]></label>
|
80 |
-
<frontend_type>select</frontend_type>
|
81 |
-
<source_model>Freightquote_Shipping_Model_Carrier_Source_Locationtype</source_model>
|
82 |
-
<sort_order>7</sort_order>
|
83 |
-
<show_in_default>1</show_in_default>
|
84 |
-
<show_in_website>1</show_in_website>
|
85 |
-
<show_in_store>0</show_in_store>
|
86 |
-
<comment>Choose the location type that best fits. (Recommended: "Origin")</comment>
|
87 |
-
</origin_location_type>
|
88 |
-
<origin_dock translate="label">
|
89 |
-
<label><![CDATA[<b>ORIGIN:</b> Loading Dock]]></label>
|
90 |
-
<frontend_type>select</frontend_type>
|
91 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
92 |
-
<sort_order>8</sort_order>
|
93 |
-
<show_in_default>1</show_in_default>
|
94 |
-
<show_in_website>1</show_in_website>
|
95 |
-
<show_in_store>0</show_in_store>
|
96 |
-
<comment>Does your shipping location have a loading dock?</comment>
|
97 |
-
</origin_dock>
|
98 |
-
<origin_liftgate translate="label">
|
99 |
-
<label><![CDATA[<b>ORIGIN:</b> Liftgate Required?]]></label>
|
100 |
-
<frontend_type>select</frontend_type>
|
101 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
102 |
-
<sort_order>9</sort_order>
|
103 |
-
<show_in_default>1</show_in_default>
|
104 |
-
<show_in_website>1</show_in_website>
|
105 |
-
<show_in_store>0</show_in_store>
|
106 |
-
<comment>Do you require a liftgate?</comment>
|
107 |
-
</origin_liftgate>
|
108 |
-
<origin_residence translate="label">
|
109 |
-
<label><![CDATA[<b>ORIGIN:</b> Residential]]></label>
|
110 |
-
<frontend_type>select</frontend_type>
|
111 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
112 |
-
<sort_order>10</sort_order>
|
113 |
-
<show_in_default>1</show_in_default>
|
114 |
-
<show_in_website>1</show_in_website>
|
115 |
-
<show_in_store>0</show_in_store>
|
116 |
-
<comment>Is your shipping location a residence?</comment>
|
117 |
-
</origin_residence>
|
118 |
-
<origin_construction translate="label">
|
119 |
-
<label><![CDATA[<b>ORIGIN:</b> Construction Site]]></label>
|
120 |
-
<frontend_type>select</frontend_type>
|
121 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
122 |
-
<sort_order>11</sort_order>
|
123 |
-
<show_in_default>1</show_in_default>
|
124 |
-
<show_in_website>1</show_in_website>
|
125 |
-
<show_in_store>0</show_in_store>
|
126 |
-
<comment>Is your shipping location a construction site?</comment>
|
127 |
-
</origin_construction>
|
128 |
-
<destination_location_type translate="label">
|
129 |
-
<label><![CDATA[<b>DESTINATION:</b> Location Type]]></label>
|
130 |
-
<frontend_type>select</frontend_type>
|
131 |
-
<source_model>Freightquote_Shipping_Model_Carrier_Source_Locationtype</source_model>
|
132 |
-
<sort_order>12</sort_order>
|
133 |
-
<show_in_default>1</show_in_default>
|
134 |
-
<show_in_website>1</show_in_website>
|
135 |
-
<show_in_store>0</show_in_store>
|
136 |
-
<comment>Choose the location type that best fits. (Recommended: "Destination")</comment>
|
137 |
-
</destination_location_type>
|
138 |
-
<destination_dock translate="label">
|
139 |
-
<label><![CDATA[<b>DESTINATION:</b> Loading Dock]]></label>
|
140 |
-
<frontend_type>select</frontend_type>
|
141 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
142 |
-
<sort_order>13</sort_order>
|
143 |
-
<show_in_default>1</show_in_default>
|
144 |
-
<show_in_website>1</show_in_website>
|
145 |
-
<show_in_store>0</show_in_store>
|
146 |
-
<comment>Do your recipients typically have loading docks?</comment>
|
147 |
-
</destination_dock>
|
148 |
-
<destination_liftgate translate="label">
|
149 |
-
<label><![CDATA[<b>DESTINATION:</b> Liftgate Required?]]></label>
|
150 |
-
<frontend_type>select</frontend_type>
|
151 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
152 |
-
<sort_order>14</sort_order>
|
153 |
-
<show_in_default>1</show_in_default>
|
154 |
-
<show_in_website>1</show_in_website>
|
155 |
-
<show_in_store>0</show_in_store>
|
156 |
-
<comment>Do your customers typically require a liftgate?</comment>
|
157 |
-
</destination_liftgate>
|
158 |
-
<destination_residence translate="label">
|
159 |
-
<label><![CDATA[<b>DESTINATION:</b> Residential]]></label>
|
160 |
-
<frontend_type>select</frontend_type>
|
161 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
162 |
-
<sort_order>15</sort_order>
|
163 |
-
<show_in_default>1</show_in_default>
|
164 |
-
<show_in_website>1</show_in_website>
|
165 |
-
<show_in_store>0</show_in_store>
|
166 |
-
<comment>Do you typically ship to residences? (Prices will be higher)</comment>
|
167 |
-
</destination_residence>
|
168 |
-
<destination_construction translate="label">
|
169 |
-
<label><![CDATA[<b>DESTINATION:</b> Construction Site]]></label>
|
170 |
-
<frontend_type>select</frontend_type>
|
171 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
172 |
-
<sort_order>16</sort_order>
|
173 |
-
<show_in_default>1</show_in_default>
|
174 |
-
<show_in_website>1</show_in_website>
|
175 |
-
<show_in_store>0</show_in_store>
|
176 |
-
<comment>Do you typically ship to construction sites?</comment>
|
177 |
-
</destination_construction>
|
178 |
-
<blind_ship translate="label">
|
179 |
-
<label>Blind Ship</label>
|
180 |
-
<frontend_type>select</frontend_type>
|
181 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
182 |
-
<sort_order>17</sort_order>
|
183 |
-
<show_in_default>1</show_in_default>
|
184 |
-
<show_in_website>1</show_in_website>
|
185 |
-
<show_in_store>0</show_in_store>
|
186 |
-
<comment>Blind shipping prevents the recipient of the shipment from seeing the address of the place of origin.</comment>
|
187 |
-
</blind_ship>
|
188 |
-
<handling_action translate="label">
|
189 |
-
<label>Handling Applied</label>
|
190 |
-
<frontend_type>select</frontend_type>
|
191 |
-
<source_model>shipping/source_handlingAction</source_model>
|
192 |
-
<sort_order>18</sort_order>
|
193 |
-
<show_in_default>1</show_in_default>
|
194 |
-
<show_in_website>1</show_in_website>
|
195 |
-
<show_in_store>0</show_in_store>
|
196 |
-
</handling_action>
|
197 |
-
<handling_fee translate="label">
|
198 |
-
<label>Handling Fee</label>
|
199 |
-
<frontend_type>text</frontend_type>
|
200 |
-
<sort_order>19</sort_order>
|
201 |
-
<show_in_default>1</show_in_default>
|
202 |
-
<show_in_website>1</show_in_website>
|
203 |
-
<show_in_store>0</show_in_store>
|
204 |
-
<can_be_empty>1</can_be_empty>
|
205 |
-
</handling_fee>
|
206 |
-
<rate_modifier translate="label">
|
207 |
-
<label>Rate Modifier</label>
|
208 |
-
<frontend_type>text</frontend_type>
|
209 |
-
<sort_order>20</sort_order>
|
210 |
-
<show_in_default>1</show_in_default>
|
211 |
-
<show_in_website>1</show_in_website>
|
212 |
-
<show_in_store>0</show_in_store>
|
213 |
-
<can_be_empty>1</can_be_empty>
|
214 |
-
<comment>If you'd like to increase or decrease the rate returned, enter a number that will be multiplied with the rate. e.g. For a 10% rate increase, enter "1.1" or for a 30% decrease in the rate, enter "0.7"</comment>
|
215 |
-
</rate_modifier>
|
216 |
-
<!--
|
217 |
-
<sallowspecific translate="label">
|
218 |
-
<label>Ship to applicable countries</label>
|
219 |
-
<frontend_type>select</frontend_type>
|
220 |
-
<sort_order>19</sort_order>
|
221 |
-
<frontend_class>shipping-applicable-country</frontend_class>
|
222 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
223 |
-
<show_in_default>1</show_in_default>
|
224 |
-
<show_in_website>1</show_in_website>
|
225 |
-
<show_in_store>1</show_in_store>
|
226 |
-
</sallowspecific>
|
227 |
-
<specificcountry translate="label">
|
228 |
-
<label>Ship to Specific countries</label>
|
229 |
-
<frontend_type>multiselect</frontend_type>
|
230 |
-
<sort_order>20</sort_order>
|
231 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
232 |
-
<show_in_default>1</show_in_default>
|
233 |
-
<show_in_website>1</show_in_website>
|
234 |
-
<show_in_store>1</show_in_store>
|
235 |
-
</specificcountry>
|
236 |
-
-->
|
237 |
-
<sort_order translate="label">
|
238 |
-
<label>Sort Order</label>
|
239 |
-
<frontend_type>text</frontend_type>
|
240 |
-
<sort_order>21</sort_order>
|
241 |
-
<show_in_default>1</show_in_default>
|
242 |
-
<show_in_website>1</show_in_website>
|
243 |
-
<show_in_store>0</show_in_store>
|
244 |
-
<can_be_empty>1</can_be_empty>
|
245 |
-
<comment>Entering a numeric value here will move this module higher or lower in the selection of shipping methods presented to the customer.</comment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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Freightquote/Shipping/sql/freightquote_setup/mysql4-install-1.0.0.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
*/
|
11 |
-
|
12 |
-
$installer = $this;
|
13 |
-
$installer->installEntities();
|
14 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Freightquote_Shipping.xml
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
Freightquote.com Shipping Module for Magento Commerce
|
4 |
-
|
5 |
-
Copyright (c) 2010 Freightquote.com
|
6 |
-
|
7 |
-
Developed by Dynamo Effects - sales [at] dynamoeffects.com
|
8 |
-
|
9 |
-
Released under the Open Software License (OSL 3.0)
|
10 |
-
-->
|
11 |
-
<config>
|
12 |
-
<modules>
|
13 |
-
<Freightquote_Shipping>
|
14 |
-
<active>true</active>
|
15 |
-
<codePool>community</codePool>
|
16 |
-
</Freightquote_Shipping>
|
17 |
-
</modules>
|
18 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Freightquote_com_Shipping_Module</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>This is the official Freightquote
|
10 |
-
<description
|
11 |
-
|
12 |
-
<
|
13 |
-
<
|
14 |
-
<
|
15 |
-
<
|
|
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Freightquote_com_Shipping_Module</name>
|
4 |
+
<version>1.2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>This is the official Freightquote extension, maintained by Freightquote.</summary>
|
10 |
+
<description><p>Freightquote makes freight shipping easy with instant freight quotes from hundreds of carriers. Choose the best freight rates for all of your shipping needs including less than truckload (LTL), truckload and more. The user-friendly tools automate the entire shipping process- quoting, BOL creation, carrier dispatching, and tracking.</p>
|
11 |
+
<p>Note: This is the only shipping module maintained by Freightquote</p></description>
|
12 |
+
<notes>Added debug logging option to help with installations</notes>
|
13 |
+
<authors><author><name>Freightquote</name><user>MAG000030254</user><email>fqconnect@freightquote.com</email></author></authors>
|
14 |
+
<date>2015-09-14</date>
|
15 |
+
<time>14:22:00</time>
|
16 |
+
<contents><target name="mageetc"><dir name="."><dir name="app"><dir name="etc"><file name="modules" hash=""/></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|