create export for expeditor
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
|
||||
{elseloop rel="checkrights.colissimo"}
|
||||
|
||||
<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="modal fade" id="freeshipping-failed" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -25,124 +29,213 @@
|
||||
</div>
|
||||
|
||||
|
||||
<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="general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ul id="tabbed-menu" class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#export">{intl l="Export expeditor inet file"}</a> </li>
|
||||
<li class="{if $tab eq "1"}active{/if}"><a data-toggle="tab" href="#prices_slices_tab">{intl l="Price slices"}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="export" class="tab-pane active form-container">
|
||||
{form name="colissimo.export.form"}
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
<form action="{url path='/admin/module/colissimo/export'}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
<div class="panel panel-default">
|
||||
{form_field form=$form field="status_id"}
|
||||
<div class="panel-heading clearfix">
|
||||
{intl l="Change orders status after export"}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="general-block-decorator">
|
||||
<!-- checkbox free shipping -->
|
||||
{assign var="isColissimoFreeShipping" value=0}
|
||||
{form name="colissimo.freeshipping.form"}
|
||||
<form action="{url path="/admin/module/colissimo/freeshipping"}" method="post" id="freeshippingform">
|
||||
{form_hidden_fields form=$form}
|
||||
<table>
|
||||
|
||||
{form_field form=$form field="freeshipping"}
|
||||
<label>
|
||||
{$label}
|
||||
</label>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="nochange">{intl l="Do not change"}</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" id="nochange" name="{$name}" value="nochange"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="processing">{intl l="Processing"}</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" id="processing" name="{$name}" value="processing"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="sent">{intl l="Sent"}*</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" id="sent" name="{$name}" value="sent"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/form_field}
|
||||
<span class="p">{intl l="*If you choose this option, the exported orders would not be available on this page anymore"}</span>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<th class="object-title">
|
||||
{intl l="REF"}
|
||||
</th>
|
||||
<th class="object-title">
|
||||
{intl l="Date"}
|
||||
</th>
|
||||
<th class="object-title">
|
||||
{intl l="Total taxed amount"}
|
||||
</th>
|
||||
<th class="object-title">
|
||||
{intl l="Export"}
|
||||
</th>
|
||||
</thead>
|
||||
|
||||
<div class="switch-small freeshipping-activation-Colissimo" data-id="0" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox" name="{$name}" value="true" {if $data}checked{assign var="isColissimoFreeShipping" value=1}{/if} />
|
||||
</div>
|
||||
{/form_field}
|
||||
</form>
|
||||
{/form}
|
||||
<div id="table-prices-colissimo" {if $isColissimoFreeShipping eq 1} style="display:none;" {/if}>
|
||||
<!-- Prices editing -->
|
||||
{* -- Add price slice confirmation dialog ----------------------------------- *}
|
||||
{loop type="area" name="list area" backend_context=true}
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
<tbody>
|
||||
{loop name="colissimo.notsend.loop" type="colissimo.notsend.loop"}
|
||||
{form_field form=$form field="order_"|cat:$ID}
|
||||
<tr>
|
||||
<td>
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
{$CREATE_DATE|date_format}
|
||||
</td>
|
||||
<td>
|
||||
{$TOTAL_TAXED_AMOUNT} {loop name="list.socolissimo.getcurrency" type="currency" id=$CURRENCY}{$SYMBOL}{/loop}
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="true" class="form-control"/>
|
||||
</td>
|
||||
</tr>
|
||||
{/form_field}
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="submit" name="export_socolissimo_form" value="stay" class="form-submit-button btn btn-sm btn-default" title="{intl l='Export'}">{intl l='Export'}</button>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
<div id="prices_slices_tab" class="tab-pane {if $tab eq 1}active{/if} form-container">
|
||||
<!-- checkbox free shipping -->
|
||||
{assign var="isColissimoFreeShipping" value=0}
|
||||
{form name="colissimo.freeshipping.form"}
|
||||
<form action="{url path="/admin/module/colissimo/freeshipping"}" method="post" id="freeshippingform">
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
dialog_id = "price_slice_create_dialog_{$ID}"
|
||||
dialog_title = {intl l="Create a price slice"}
|
||||
dialog_body = "<input type=\"hidden\" name=\"operation\" value=\"add\"/>
|
||||
<input type=\"hidden\" name=\"area\" value=\"{$ID}\" />
|
||||
<label for=\"weight_{$ID}\">{intl l="Weight up to ... (kg)"}</label></label>
|
||||
<input type=\"number\" id=\"weight_{$ID}\" name=\"weight\" value=\"1\" class=\"form-control\" pattern=\"\\d+\\.?\\d*\" required/>
|
||||
<label for=\"price_{$ID}\">{intl l="Price (€)"}</label></label>
|
||||
<input type=\"number\" id=\"price_{$ID}\" name=\"price\" value=\"1\" class=\"form-control\" pattern=\"\\d+\\.?\\d*\" required/>"
|
||||
{form_field form=$form field="freeshipping"}
|
||||
<label>
|
||||
{$label}
|
||||
</label>
|
||||
|
||||
form_action="{url path="/admin/module/colissimo/prices"}"
|
||||
|
||||
dialog_ok_label = {intl l="Create"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l="Area : "}{$NAME}
|
||||
{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_{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{intl l="Weight up to ... (kg)"}</th>
|
||||
<th class="col-md-5">{intl l="Price (€)"}</th>
|
||||
<th class="col-md-1">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="colissimo" name="colissimo" area=$ID}
|
||||
{* -- EDIT price slice confirmation dialog ----------------------------------- *}
|
||||
<div class="switch-small freeshipping-activation-Colissimo" data-id="0" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox" name="{$name}" value="true" {if $data}checked{assign var="isColissimoFreeShipping" value=1}{/if} />
|
||||
</div>
|
||||
{/form_field}
|
||||
</form>
|
||||
{/form}
|
||||
<div id="table-prices-colissimo" {if $isColissimoFreeShipping eq 1} style="display:none;" {/if}>
|
||||
<!-- Prices editing -->
|
||||
{* -- Add price slice confirmation dialog ----------------------------------- *}
|
||||
{loop type="area" name="list area" backend_context=true}
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "price_slice_edit_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}"
|
||||
dialog_title = {intl l="Edit a price slice"}
|
||||
dialog_message = "<input type=\"hidden\" name=\"operation\" value=\"add\"/>
|
||||
<input type=\"hidden\" name=\"area\" value=\"{$ID}\"/>
|
||||
<input type=\"hidden\" name=\"weight\" value=\"{$MAX_WEIGHT}\"/>
|
||||
<label for=\"price_edit_{$ID}_{$MAX_WEIGHT}\">{intl l='Price (€)'}</label>
|
||||
<input type=\"number\" id=\"price_edit_{$ID}_{$MAX_WEIGHT}\" class=\"form-control\" name=\"price\" value=\"{$PRICE}\" pattern=\"\\d+\\.?\\d*\" required/>"
|
||||
dialog_id = "price_slice_create_dialog_{$ID}"
|
||||
dialog_title = {intl l="Create a price slice"}
|
||||
dialog_body = "<input type=\"hidden\" name=\"operation\" value=\"add\"/>
|
||||
<input type=\"hidden\" name=\"area\" value=\"{$ID}\" />
|
||||
<label for=\"weight_{$ID}\">{intl l="Weight up to ... (kg)"}</label></label>
|
||||
<input type=\"number\" id=\"weight_{$ID}\" name=\"weight\" value=\"1\" class=\"form-control\" pattern=\"\\d+\\.?\\d*\" required/>
|
||||
<label for=\"price_{$ID}\">{intl l="Price (€)"}</label></label>
|
||||
<input type=\"number\" id=\"price_{$ID}\" name=\"price\" value=\"1\" class=\"form-control\" pattern=\"\\d+\\.?\\d*\" required/>"
|
||||
|
||||
form_action="{url path="/admin/module/colissimo/prices"}"
|
||||
dialog_ok_label = {intl l="Edit"}
|
||||
|
||||
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_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}"
|
||||
dialog_title = {intl l="Delete a price slice"}
|
||||
dialog_message = "<input type=\"hidden\" name=\"operation\" value=\"delete\"/>
|
||||
<input type=\"hidden\" name=\"area\" value=\"{$ID}\"/>
|
||||
<input type=\"hidden\" name=\"weight\" value=\"{$MAX_WEIGHT}\"/>
|
||||
{intl l="Do you really want to delete this slice ?"}"
|
||||
|
||||
form_action="{url path="/admin/module/colissimo/prices"}"
|
||||
dialog_ok_label = {intl l="Delete"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
}
|
||||
|
||||
<tr>
|
||||
<td>{$MAX_WEIGHT}</td>
|
||||
<td>{$PRICE}</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='Edit this price slice'}" href="#price_slice_edit_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this price slice'}" href="#price_slice_delete_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l="Area : "}{$NAME}
|
||||
{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_{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{intl l="Weight up to ... (kg)"}</th>
|
||||
<th class="col-md-5">{intl l="Price (€)"}</th>
|
||||
<th class="col-md-1">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="colissimo" name="colissimo" area=$ID}
|
||||
{* -- EDIT price slice confirmation dialog ----------------------------------- *}
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "price_slice_edit_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}"
|
||||
dialog_title = {intl l="Edit a price slice"}
|
||||
dialog_message = "<input type=\"hidden\" name=\"operation\" value=\"add\"/>
|
||||
<input type=\"hidden\" name=\"area\" value=\"{$ID}\"/>
|
||||
<input type=\"hidden\" name=\"weight\" value=\"{$MAX_WEIGHT}\"/>
|
||||
<label for=\"price_edit_{$ID}_{$MAX_WEIGHT}\">{intl l='Price (€)'}</label>
|
||||
<input type=\"number\" id=\"price_edit_{$ID}_{$MAX_WEIGHT}\" class=\"form-control\" name=\"price\" value=\"{$PRICE}\" pattern=\"\\d+\\.?\\d*\" required/>"
|
||||
|
||||
form_action="{url path="/admin/module/colissimo/prices"}"
|
||||
dialog_ok_label = {intl l="Edit"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
}
|
||||
{* -- Delete price slice confirmation dialog ----------------------------------- *}
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "price_slice_delete_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}"
|
||||
dialog_title = {intl l="Delete a price slice"}
|
||||
dialog_message = "<input type=\"hidden\" name=\"operation\" value=\"delete\"/>
|
||||
<input type=\"hidden\" name=\"area\" value=\"{$ID}\"/>
|
||||
<input type=\"hidden\" name=\"weight\" value=\"{$MAX_WEIGHT}\"/>
|
||||
{intl l="Do you really want to delete this slice ?"}"
|
||||
|
||||
form_action="{url path="/admin/module/colissimo/prices"}"
|
||||
dialog_ok_label = {intl l="Delete"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
}
|
||||
|
||||
<tr>
|
||||
<td>{$MAX_WEIGHT}</td>
|
||||
<td>{$PRICE}</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='Edit this price slice'}" href="#price_slice_edit_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this price slice'}" href="#price_slice_delete_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
<loops>
|
||||
<loop class="Colissimo\Loop\Price" name="colissimo"/>
|
||||
<loop class="Colissimo\Loop\CheckRightsLoop" name="colissimo.check.rights" />
|
||||
<loop class="Colissimo\Loop\NotSendLoop" name="colissimo.notsend.loop" />
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
<form name="colissimo.freeshipping.form" class="Colissimo\Form\FreeShipping" />
|
||||
<form name="colissimo.export.form" class="Colissimo\Form\Export" />
|
||||
</forms>
|
||||
|
||||
<commands>
|
||||
|
||||
@@ -10,4 +10,8 @@
|
||||
<route id="colissimo.edit.freeshipping" path="/admin/module/colissimo/freeshipping" methods="post">
|
||||
<default key="_controller">Colissimo\Controller\FreeShipping::set</default>
|
||||
</route>
|
||||
|
||||
<route id="colissimo.export" path="/admin/module/colissimo/export" methods="post">
|
||||
<default key="_controller">Colissimo\Controller\Export::exportAction</default>
|
||||
</route>
|
||||
</routes>
|
||||
|
||||
Reference in New Issue
Block a user