-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrections to fit updated Prestashop coding standards...
- Loading branch information
Showing
24 changed files
with
30 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2017 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
header('Content-type: text/plain'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2017 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
header('Content-type: text/plain'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
|
@@ -146,7 +145,8 @@ public function renderForm() | |
'name' => 'value_to_insure', | ||
'size' => 5, | ||
'class' => 'fixed-width-sm', | ||
'desc' => $this->l('You can leave blank if you do not intend to purchase insurance. Maximum 2000€ total per shipment.'), ), | ||
'desc' => $this->l('You can leave blank if you do not intend to purchase insurance. Maximum 2000€ total per shipment.'), | ||
), | ||
array('type' => 'select', | ||
'label' => $this->l('Currency:'), | ||
'desc' => $this->l('Currency code for the value to insure.'), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
|
@@ -89,7 +88,6 @@ public function renderView() | |
$lce_service = false; | ||
|
||
if ($shipment->api_offer_uuid) { | ||
|
||
$api_offer = Lce\Resource\Offer::find($shipment->api_offer_uuid); | ||
|
||
// We need to keep some sort of backward compatibility for past shipments | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
|
@@ -290,7 +289,6 @@ public function hookUpdateCarrier($params) | |
$lce_service = LceService::findByCarrierId($params['id_carrier']); | ||
$lce_service->id_carrier = $params['carrier']->id; | ||
$lce_service->save(); | ||
|
||
} | ||
|
||
//=============== | ||
|
@@ -430,7 +428,6 @@ public function _refreshLceProducts($shipper_country = null) | |
$products = Lce\Resource\Product::findAll(); | ||
|
||
foreach ($products as $product) { | ||
|
||
$lce_service = LceService::findByCode($product->code); | ||
|
||
if (!$lce_service) { | ||
|
@@ -563,14 +560,11 @@ public function _refreshLceProducts($shipper_country = null) | |
); | ||
} | ||
} | ||
|
||
|
||
} | ||
} catch (Exception $e) { | ||
error_log($e->getMessage()); | ||
$message = $this->displayError($this->purify($e->getMessage())); | ||
} | ||
|
||
return $message; | ||
} | ||
|
||
|
@@ -722,7 +716,6 @@ public function getOrderShippingCost($cart, $shipping_cost) | |
$currency = new Currency($cart->id_currency); | ||
// Getting total order value | ||
$params['parcels'][0]['insured_currency'] = $currency->iso_code; | ||
|
||
} | ||
|
||
$api_quote = Lce\Resource\Quote::request($params); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
class LceDimension extends ObjectModel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
class LceOffer extends ObjectModel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
class LceParcel extends ObjectModel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
class LceQuote extends ObjectModel | ||
|
@@ -108,7 +107,6 @@ public static function getNewForCart($cart) | |
$currency = new Currency($cart->id_currency); | ||
// Getting total order value | ||
$params['parcels'][0]['insured_currency'] = $currency->iso_code; | ||
|
||
} | ||
|
||
$api_quote = Lce\Resource\Quote::request($params); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
class LceService extends ObjectModel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
class LceShipment extends ObjectModel | ||
|
@@ -332,16 +331,13 @@ public function autoselectOffer($order) | |
$lce_service = LceService::findByCarrierId($order->id_carrier); | ||
|
||
if ($lce_service) { | ||
|
||
// $quote = new LceQuote(); | ||
// $quote->id_shipment = $shipment->id; | ||
// $quote->add(); | ||
|
||
// Now we parse the offers and select | ||
foreach ($api_quote->offers as $api_offer) { | ||
|
||
if ($api_offer->product->code == $lce_service->code) { | ||
|
||
// $offer = new LceOffer(); | ||
// $offer->id_quote = $quote->id; | ||
// $offer->lce_service_id = $lce_service->id_service; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
$sql = array(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2017 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2017 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2017 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2017 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,9 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2017 MyFlyingBox | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
var lce_locations = null; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*} | ||
|
||
<div class='panel'> | ||
|
@@ -28,7 +28,7 @@ | |
<p> | ||
<a href="{$var.new_shipment_path|escape:'htmlall':'UTF-8'}"><img src="../img/admin/add.gif" alt="{l s='Add shipment' mod='lowcostexpress'}" /> {l s='Add shipment' mod='lowcostexpress'}</a> | ||
</p> | ||
|
||
<table class="table" width="100%"> | ||
<thead> | ||
<tr> | ||
|
@@ -61,6 +61,6 @@ | |
</tr> | ||
{/foreach} | ||
</table> | ||
|
||
</fieldset> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*} | ||
<div class="myflyingbox-settings"> | ||
<div class='row myflyingbox-settings-header'> | ||
|
@@ -279,7 +279,7 @@ | |
<label for="MOD_LCE_UPDATE_ORDER_STATUS" class="control-label col-lg-3">{l s='Automatically update order status:' mod='lowcostexpress'}</label> | ||
<div class="col-lg-8"> | ||
<input id="MOD_LCE_UPDATE_ORDER_STATUS" name="MOD_LCE_UPDATE_ORDER_STATUS" type="checkbox" value="1"{if $MOD_LCE_UPDATE_ORDER_STATUS eq true} CHECKED{/if} /> | ||
<p class="help-block">{l s="If checked, the status of the order will be automatically set to 'shipped' when you confirm your MyFlyingBox shipment to generate the label." mod='lowcostexpress'}</p> | ||
<p class="help-block">{l s='If checked, the status of the order will be automatically set to \'shipped\' when you confirm your MyFlyingBox shipment to generate the label.' mod='lowcostexpress'}</p> | ||
</div> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*} | ||
|
||
<div class="myflyingbox-settings"> | ||
|
@@ -215,7 +215,7 @@ | |
<label for="MOD_LCE_UPDATE_ORDER_STATUS">{l s='Automatically update order status:' mod='lowcostexpress'}</label> | ||
<div class="margin-form"> | ||
<input id="MOD_LCE_UPDATE_ORDER_STATUS" name="MOD_LCE_UPDATE_ORDER_STATUS" type="checkbox" value="1"{if $MOD_LCE_UPDATE_ORDER_STATUS eq true} CHECKED{/if} /> | ||
<p class="preference_description">{l s="If checked, the status of the order will be automatically set to 'shipped' when you confirm your MyFlyingBox shipment to generate the label." mod='lowcostexpress'}</p> | ||
<p class="preference_description">{l s='If checked, the status of the order will be automatically set to \'shipped\' when you confirm your MyFlyingBox shipment to generate the label.' mod='lowcostexpress'}</p> | ||
</div> | ||
|
||
<p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*} | ||
|
||
{extends file="helpers/form/form.tpl"} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*} | ||
|
||
<form id="select-offer"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*} | ||
|
||
{block name="override_tpl"} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
* | ||
* @author MyFlyingBox <[email protected]> | ||
* @copyright 2016 MyFlyingBox | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* @version 1.0 | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*} | ||
{if !empty($shipments)} | ||
<!-- Tracking --> | ||
|