Quelques corrections + init du module ClickAndCollect
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
<column name="zipcode" required="true" size="10" type="VARCHAR" />
|
||||
<column name="city" required="true" size="100" type="VARCHAR" />
|
||||
<column name="access_comment" size="400" type="VARCHAR" />
|
||||
<column name="click_and_collect" required="true" type="TINYINT" defaultValue="0" />
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ CREATE TABLE `pdr_places`
|
||||
`zipcode` VARCHAR(10) NOT NULL,
|
||||
`city` VARCHAR(100) NOT NULL,
|
||||
`access_comment` VARCHAR(400),
|
||||
`click_and_collect` TINYINT DEFAULT 0 NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace PointRetrait\Controller\backOffice;
|
||||
use LivraisonParSecteurs\LivraisonParSecteurs;
|
||||
use LivraisonParSecteurs\Model\LpsAreaQuery;
|
||||
use PointRetrait\Model\PdrPlacesQuery;
|
||||
use PointRetrait\PointRetrait;
|
||||
use Thelia\Controller\Admin\BaseAdminController;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Core\Security\Resource\AdminResources;
|
||||
@@ -24,7 +25,7 @@ class ListController extends BaseAdminController
|
||||
public function toggleActive($id)
|
||||
{
|
||||
// Check current user authorization
|
||||
if (null !== $response = $this->checkAuth(AdminResources::MODULE, LivraisonParSecteurs::getModuleCode(), AccessManager::UPDATE))
|
||||
if (null !== $response = $this->checkAuth(AdminResources::MODULE, PointRetrait::getModuleCode(), AccessManager::UPDATE))
|
||||
return $response;
|
||||
|
||||
$place = PdrPlacesQuery::create()->findOneById(($id));
|
||||
|
||||
@@ -23,18 +23,19 @@ return array(
|
||||
'Message no location' => 'Ce point de retrait ne possède pas de coordonnées GPS : pour vos clients, il est conseillé de géolocaliser l\'adresse.',
|
||||
'Message info minimum de commande' => 'Vous n\'avez pas atteint le minimum de commande de %minimum € sur ce point de retrait.',
|
||||
'Minimum amount' => 'Minimum de commande',
|
||||
'Module name' => 'Point de Retrait AuxBieauxLegumes',
|
||||
'Module name' => 'Point de retrait AuxBieauxLegumes',
|
||||
'Module name - customer' => 'Retirez en point retrait AuxBieauxLegumes',
|
||||
'My places' => 'Point de retrait AuxBieauxLegumes',
|
||||
'My withdrawal places' => 'Mes points de retrait AuxBieauxLegumes',
|
||||
'Order to withdraw' => 'Commande à retirer au point retrait suivant',
|
||||
'Order number' => 'N° de commande',
|
||||
'Order number' => 'Commande',
|
||||
'Place name' => 'Nom du point de retrait',
|
||||
'Please select a delivery place' => 'Veuillez sélectionner un point de retrait',
|
||||
'Recenter map' => 'Géolocaliser l\'adresse',
|
||||
'Revert origin position' => 'Revenir à la position d\'origine',
|
||||
'Schedule' => 'Horaires de retrait',
|
||||
'Scheduled date' => 'Date de retrait prévue',
|
||||
'Scheduled withdrawals' => 'Commandes à retirer en Point Retrait',
|
||||
'Scheduled withdrawals' => 'Commandes à livrer en Point Retrait',
|
||||
'Title of config view' => 'Point retrait AuxBieauxLegumes - Configuration',
|
||||
'There is no order to withdraw' => 'Aucune commande à retirer en Point Retrait',
|
||||
'There is no schedule for this place' => 'Aucun créneau de retrait sur ce point de retrait',
|
||||
|
||||
@@ -74,6 +74,7 @@ class GeneralLoop extends BaseLoop implements PropelSearchLoopInterface
|
||||
return new ArgumentCollection(
|
||||
Argument::createIntListTypeArgument('id'),
|
||||
Argument::createIntListTypeArgument('active'),
|
||||
Argument::createIntListTypeArgument('click_and_collect'),
|
||||
Argument::createEnumListTypeArgument('order',
|
||||
['city', 'title'], 'title')
|
||||
);
|
||||
@@ -93,6 +94,9 @@ class GeneralLoop extends BaseLoop implements PropelSearchLoopInterface
|
||||
if (null != $active = $this->getActive()) {
|
||||
$places->filterByActive($active);
|
||||
}
|
||||
if (null != $clickAndCollect = $this->getClickAndCollect()) {
|
||||
$places->filterByClickAndCollect($clickAndCollect);
|
||||
}
|
||||
|
||||
foreach ($this->getOrder() as $order) {
|
||||
switch ($order) {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</caption>
|
||||
|
||||
<tbody>
|
||||
{loop name="places" type="pdr_places"}
|
||||
{loop name="places" type="pdr_places" click_and_collect=0}
|
||||
<tr>
|
||||
<td><a href="{url path="/admin/module/PointRetrait/edit?place_id=$ID"}">{$TITLE}</a></td>
|
||||
<td>
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
<div class="scheduled-withdrawal-list">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th> </th>
|
||||
<th>{intl l="Order number" d="pointretrait"}</th>
|
||||
<th>{intl l="Scheduled date" d="pointretrait"}</th>
|
||||
<th>{intl l="Delivery delay" d="pointretrait"}</th>
|
||||
<th>{intl l="Place" d="pointretrait"}</th>
|
||||
<th>{intl l="Place name" d="pointretrait"}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop name="deliveries-loop" type="scheduled_deliveries" domicile_ou_retrait="retrait" only_future="true" order="date"}
|
||||
{loop name="deliveries-loop" type="scheduled_deliveries" list_type="retrait" only_future="true" order="date"}
|
||||
{if $DELTA <= {module_config module="PlanificationLivraison" key='delay_red_alert' locale="en_US"}}
|
||||
{assign var=path value="{image file='assets/img/drapeau-rouge.png' source='PlanificationLivraison'}"}
|
||||
{assign var=alt value='Drapeau rouge'}
|
||||
@@ -41,20 +40,13 @@
|
||||
{/if}
|
||||
{assign var=title value="{$DELTA} jour(s) de délai"}
|
||||
|
||||
{loop name="order-loop" type="order" id={$ORDER_ID} customer="*"}
|
||||
{loop type="customer" name="customer-loop" current="false" id=$CUSTOMER}
|
||||
{assign var=client value="$FIRSTNAME $LASTNAME"}
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
<tr>
|
||||
<td><img src={$path} alt="{$alt}" title="{$title}" style="margin-left: 30px; width:25px"></td>
|
||||
<td><a href="/admin/order/update/{$ORDER_ID}" target="_blank" title="Client : {$client}">{$ORDER_ID}</a></td>
|
||||
<td style="text-align: center"><a href="/admin/order/update/{$ORDER_ID}" target="_blank" title="Client : {$CUSTOMER}">{$ORDER_ID}</a></td>
|
||||
<td>
|
||||
{format_date date=$START_DATE format="d/m/Y"} entre {format_date date=$START_DATE format="H\hi"} et {format_date date=$END_DATE format="H\hi"}
|
||||
</td>
|
||||
<td>{$DELTA} jour(s)</td>
|
||||
<td>Point de retrait</td>
|
||||
<td><img src={$path} alt="{$alt}" title="{$title}" style="margin-right: 10px; width:25px">{$DELTA} jour(s)</td>
|
||||
<td>{$PLACE}</td>
|
||||
</tr>
|
||||
{if $LOOP_COUNT == $LOOP_TOTAL}{assign var=nbCommandes value=$LOOP_TOTAL}{/if}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{form_field field='delivery-module'}
|
||||
<label for="delivery-method_{$module_id}">
|
||||
<input type="radio" delivery-mode="pdr" name="{$name}" id="delivery-method_{$module_id}" value="{$module_id}">
|
||||
<strong>{intl l="Module name" d="pointretrait"}</strong>
|
||||
<strong>{intl l="Module name - customer" d="pointretrait"}</strong>
|
||||
<br>
|
||||
</label>
|
||||
{/form_field}
|
||||
@@ -25,7 +25,7 @@
|
||||
{form name="thelia.order.delivery"}
|
||||
<div class="table-responsive" style="border: 0px solid gray">
|
||||
<table class="table table-condensed table-main">
|
||||
{loop type="pdr_places" name="places-loop" active=true order="city"}
|
||||
{loop type="pdr_places" name="places-loop" active=true click_and_collect=0 order="city"}
|
||||
<tr class="ligne-pdr">
|
||||
<td>
|
||||
<div class="titre-pdr"><img src="{image file='assets/img/pin.png' source='PointRetrait'}" class="img-pin"><span class="pin-number">{$ID}</span>{$TITLE}</div>
|
||||
@@ -65,7 +65,7 @@
|
||||
<input type="hidden" id="map-center-lon" value={{module_config module='PlanificationLivraison' key='map_center_longitude' locale='en_US'}|default:2.252608244005041} />
|
||||
|
||||
<table id="coordinates" class="hidden">
|
||||
{loop type="pdr_places" name="places-loop" active=true order="city"}
|
||||
{loop type="pdr_places" name="places-loop" active=true click_and_collect=0 order="city"}
|
||||
<tr>
|
||||
<td>{$ID}
|
||||
<td>{$LATITUDE}</td>
|
||||
@@ -94,10 +94,6 @@
|
||||
$('input[type=radio][delivery-mode]').click(function() {
|
||||
$('div[id^="select"]').not($('#select-' + $(this).attr('delivery-mode'))).slideUp();
|
||||
$('#select-' + $(this).attr('delivery-mode')).slideDown('fast');
|
||||
|
||||
if ($('[delivery-mode=pdr]').is(':checked')) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user