Colissimo module + countires areas
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="alert alert-info">
|
||||
<p>{intl l="Colissimo Module allows to send your products all around the world with La Poste."}</p>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger">
|
||||
<p>{intl l="Prices are not dynamically editable yet."}</p>
|
||||
<p>{intl l="Prices below can be edited in Colissmo module code."}</p>
|
||||
</div>
|
||||
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l="Collismo prices"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" module="colissimo" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create a new price slice'}" href="#price_slice_create_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{intl l="Weight lower than ... (kg)"}</th>
|
||||
<th class="col-md-5">{intl l="Price (€)"}</th>
|
||||
<th class="col-md-1">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" role="ADMIN" module="colissimo" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this price slice'}" href="#price_slice_delete_dialog" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- Add price slice confirmation dialog ----------------------------------- *}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "price_slice_create_dialog"
|
||||
dialog_title = {intl l="Create a price slice"}
|
||||
dialog_body = "Not available yet."
|
||||
|
||||
dialog_ok_label = {intl l="Create"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
}
|
||||
|
||||
{* -- Delete price slice confirmation dialog ----------------------------------- *}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "price_slice_delete_dialog"
|
||||
dialog_title = {intl l="Delete a price slice"}
|
||||
dialog_body = "Not available yet."
|
||||
|
||||
dialog_ok_label = {intl l="Delete"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
|
||||
})
|
||||
</script>
|
||||
@@ -34,6 +34,62 @@ class Colissimo extends BaseModule implements DeliveryModuleInterface
|
||||
protected $request;
|
||||
protected $dispatcher;
|
||||
|
||||
protected $prices = array(
|
||||
"1" => array( // area 1 : France
|
||||
"slices" => array( // max_weight => price
|
||||
'0.25' => 5.23,
|
||||
'0.5' => 5.8,
|
||||
'0.75' => 6.56,
|
||||
'1' => 7.13,
|
||||
'2' => 8.08,
|
||||
'3' => 9.22,
|
||||
'5' => 11.31,
|
||||
'7' => 13.40,
|
||||
'10' => 16.53,
|
||||
'15' => 19.14,
|
||||
'30' => 26.93,
|
||||
),
|
||||
),
|
||||
"6" => array( // area 10 : France OM1
|
||||
"slices" => array( // max_weight => price
|
||||
'0.5' => 8.27,
|
||||
'1' => 12.49,
|
||||
'2' => 17.05,
|
||||
'3' => 21.61,
|
||||
'4' => 26.17,
|
||||
'5' => 30.73,
|
||||
'6' => 35.29,
|
||||
'7' => 39.85,
|
||||
'8' => 44.41,
|
||||
'9' => 48.97,
|
||||
'10' => 53.53,
|
||||
'15' => 76.33,
|
||||
'20' => 99.13,
|
||||
'25' => 121.93,
|
||||
'30' => 144.73,
|
||||
),
|
||||
),
|
||||
"7" => array( // area 10 : France OM2
|
||||
"slices" => array( // max_weight => price
|
||||
'0.5' => 9.88,
|
||||
'1' => 14.92,
|
||||
'2' => 26.32,
|
||||
'3' => 37.72,
|
||||
'4' => 49.12,
|
||||
'5' => 60.52,
|
||||
'6' => 71.92,
|
||||
'7' => 83.32,
|
||||
'8' => 94.72,
|
||||
'9' => 106.12,
|
||||
'10' => 117.52,
|
||||
'15' => 174.52,
|
||||
'20' => 231.52,
|
||||
'25' => 288.52,
|
||||
'30' => 345.52,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public function setRequest(Request $request)
|
||||
{
|
||||
$this->request = $request;
|
||||
|
||||
Reference in New Issue
Block a user