Création d'un nouveau module PointRetrait
This commit is contained in:
@@ -41,7 +41,7 @@ return array(
|
|||||||
'There is no city delivered in this area' => 'Aucune commune desservie dans ce secteur',
|
'There is no city delivered in this area' => 'Aucune commune desservie dans ce secteur',
|
||||||
'There is no order to deliver' => 'Aucune commande à livrer à domicile',
|
'There is no order to deliver' => 'Aucune commande à livrer à domicile',
|
||||||
'There is no schedule for this area' => 'Aucune livraison actuellement sur ce secteur',
|
'There is no schedule for this area' => 'Aucune livraison actuellement sur ce secteur',
|
||||||
'Title of config view' => 'Module LivraisonParSecteurs - Confiwguration',
|
'Title of config view' => 'Livraison à domicile - Configuration',
|
||||||
'Zipcode' => 'Code postal',
|
'Zipcode' => 'Code postal',
|
||||||
'Monday' => 'Lundi',
|
'Monday' => 'Lundi',
|
||||||
'Tuesday' => 'Mardi',
|
'Tuesday' => 'Mardi',
|
||||||
|
|||||||
34
local/modules/PointRetrait/Config/config.xml
Normal file
34
local/modules/PointRetrait/Config/config.xml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<config xmlns="http://thelia.net/schema/dic/config"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||||
|
|
||||||
|
<loops>
|
||||||
|
<!-- sample definition
|
||||||
|
<loop name="MySuperLoop" class="PointRetrait\Loop\MySuperLoop" />
|
||||||
|
-->
|
||||||
|
</loops>
|
||||||
|
|
||||||
|
<forms>
|
||||||
|
<!--
|
||||||
|
<form name="MyFormName" class="PointRetrait\Form\MySuperForm" />
|
||||||
|
-->
|
||||||
|
</forms>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<services>
|
||||||
|
|
||||||
|
</services>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<hooks>
|
||||||
|
<hook id="pointretrait.hook" class="PointRetrait\Hook\MySuperHook">
|
||||||
|
<tag name="hook.event_listener" event="main.body.bottom" type="front|back|pdf|email" method="onMainBodyBottom" />
|
||||||
|
</hook>
|
||||||
|
</hooks>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</config>
|
||||||
28
local/modules/PointRetrait/Config/module.xml
Normal file
28
local/modules/PointRetrait/Config/module.xml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module xmlns="http://thelia.net/schema/dic/module"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://thelia.net/schema/dic/module http://thelia.net/schema/dic/module/module-2_2.xsd">
|
||||||
|
<fullnamespace>PointRetrait\PointRetrait</fullnamespace>
|
||||||
|
<descriptive locale="en_US">
|
||||||
|
<title>AuxBieauxLegumes widthdrawal locations</title>
|
||||||
|
</descriptive>
|
||||||
|
<descriptive locale="fr_FR">
|
||||||
|
<title>Point de retrait AuxBieauxLegumes</title>
|
||||||
|
</descriptive>
|
||||||
|
<languages>
|
||||||
|
<language>en_US</language>
|
||||||
|
<language>fr_FR</language>
|
||||||
|
</languages>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<authors>
|
||||||
|
<author>
|
||||||
|
<name>Laurent LE CORRE</name>
|
||||||
|
<email>laurent@thecoredev.fr</email>
|
||||||
|
</author>
|
||||||
|
</authors>
|
||||||
|
<type>delivery</type>
|
||||||
|
<thelia>2.3.x</thelia>
|
||||||
|
<stability>beta</stability>
|
||||||
|
<mandatory>0</mandatory>
|
||||||
|
<hidden>0</hidden>
|
||||||
|
</module>
|
||||||
31
local/modules/PointRetrait/Config/routing.xml
Normal file
31
local/modules/PointRetrait/Config/routing.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<routes xmlns="http://symfony.com/schema/routing"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
if a /admin/module/pointretrait/ route is provided, a "Configuration" button will be displayed
|
||||||
|
for the module in the module list. Clicking this button will invoke this route.
|
||||||
|
|
||||||
|
<route id="my_route_id" path="/admin/module/pointretrait">
|
||||||
|
<default key="_controller">PointRetrait\Full\Class\Name\Of\YourConfigurationController::methodName</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<route id="my_route_id" path="/admin/module/pointretrait/route-name">
|
||||||
|
<default key="_controller">PointRetrait\Full\Class\Name\Of\YourAdminController::methodName</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<route id="my_route_id" path="/my/route/name">
|
||||||
|
<default key="_controller">PointRetrait\Full\Class\Name\Of\YourOtherController::methodName</default>
|
||||||
|
</route>
|
||||||
|
|
||||||
|
...add as many routes as required.
|
||||||
|
|
||||||
|
<route>
|
||||||
|
...
|
||||||
|
</route>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</routes>
|
||||||
25
local/modules/PointRetrait/Config/schema.xml
Normal file
25
local/modules/PointRetrait/Config/schema.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<database defaultIdMethod="native" name="thelia"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="../../../core/vendor/thelia/propel/resources/xsd/database.xsd" >
|
||||||
|
<!--
|
||||||
|
See propel documentation on http://propelorm.org for all information about schema file
|
||||||
|
|
||||||
|
<table name="product_rel" namespace="PointRetrait\Model">
|
||||||
|
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||||
|
<column defaultValue="0" name="visible" required="true" type="TINYINT" />
|
||||||
|
<column defaultValue="0" name="position" required="true" type="INTEGER" />
|
||||||
|
<column name="title" size="255" type="VARCHAR" />
|
||||||
|
<column name="description" type="CLOB" />
|
||||||
|
<column name="chapo" type="LONGVARCHAR" />
|
||||||
|
<column name="postscriptum" type="LONGVARCHAR" />
|
||||||
|
<foreign-key foreignTable="product" name="fk_product_id" onDelete="CASCADE" onUpdate="RESTRICT">
|
||||||
|
<reference foreign="id" local="product_id" />
|
||||||
|
</foreign-key>
|
||||||
|
<behavior name="timestampable" />
|
||||||
|
<behavior name="i18n">
|
||||||
|
<parameter name="i18n_columns" value="title, description, chapo, postscriptum" />
|
||||||
|
</behavior>
|
||||||
|
</table>
|
||||||
|
-->
|
||||||
|
</database>
|
||||||
4
local/modules/PointRetrait/I18n/en_US.php
Normal file
4
local/modules/PointRetrait/I18n/en_US.php
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
return array(
|
||||||
|
// 'an english string' => 'The displayed english string',
|
||||||
|
);
|
||||||
4
local/modules/PointRetrait/I18n/fr_FR.php
Normal file
4
local/modules/PointRetrait/I18n/fr_FR.php
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
return array(
|
||||||
|
// 'an english string' => 'La traduction française de la chaine',
|
||||||
|
);
|
||||||
28
local/modules/PointRetrait/PointRetrait.php
Normal file
28
local/modules/PointRetrait/PointRetrait.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* This file is part of the Thelia package. */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : dev@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||||
|
/* file that was distributed with this source code. */
|
||||||
|
/*************************************************************************************/
|
||||||
|
|
||||||
|
namespace PointRetrait;
|
||||||
|
|
||||||
|
use Thelia\Module\BaseModule;
|
||||||
|
|
||||||
|
class PointRetrait extends BaseModule
|
||||||
|
{
|
||||||
|
/** @var string */
|
||||||
|
const DOMAIN_NAME = 'pointretrait';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* You may now override BaseModuleInterface methods, such as:
|
||||||
|
* install, destroy, preActivation, postActivation, preDeactivation, postDeactivation
|
||||||
|
*
|
||||||
|
* Have fun !
|
||||||
|
*/
|
||||||
|
}
|
||||||
55
local/modules/PointRetrait/Readme.md
Normal file
55
local/modules/PointRetrait/Readme.md
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# Point Retrait
|
||||||
|
|
||||||
|
Add a short description here. You can also add a screenshot if needed.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Manually
|
||||||
|
|
||||||
|
* Copy the module into ```<thelia_root>/local/modules/``` directory and be sure that the name of the module is PointRetrait.
|
||||||
|
* Activate it in your thelia administration panel
|
||||||
|
|
||||||
|
### Composer
|
||||||
|
|
||||||
|
Add it in your main thelia composer.json file
|
||||||
|
|
||||||
|
```
|
||||||
|
composer require your-vendor/point-retrait-module:~1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Explain here how to use your module, how to configure it, etc.
|
||||||
|
|
||||||
|
## Hook
|
||||||
|
|
||||||
|
If your module use one or more hook, fill this part. Explain which hooks are used.
|
||||||
|
|
||||||
|
|
||||||
|
## Loop
|
||||||
|
|
||||||
|
If your module declare one or more loop, describe them here like this :
|
||||||
|
|
||||||
|
[loop name]
|
||||||
|
|
||||||
|
### Input arguments
|
||||||
|
|
||||||
|
|Argument |Description |
|
||||||
|
|--- |--- |
|
||||||
|
|**arg1** | describe arg1 with an exemple. |
|
||||||
|
|**arg2** | describe arg2 with an exemple. |
|
||||||
|
|
||||||
|
### Output arguments
|
||||||
|
|
||||||
|
|Variable |Description |
|
||||||
|
|--- |--- |
|
||||||
|
|$VAR1 | describe $VAR1 variable |
|
||||||
|
|$VAR2 | describe $VAR2 variable |
|
||||||
|
|
||||||
|
### Exemple
|
||||||
|
|
||||||
|
Add a complete exemple of your loop
|
||||||
|
|
||||||
|
## Other ?
|
||||||
|
|
||||||
|
If you have other think to put, feel free to complete your readme as you want.
|
||||||
12
local/modules/PointRetrait/composer.json
Normal file
12
local/modules/PointRetrait/composer.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "your-vendor/point-retrait-module",
|
||||||
|
"description": "PointRetrait module for Thelia",
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"type": "thelia-module",
|
||||||
|
"require": {
|
||||||
|
"thelia/installer": "~1.1"
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"installer-name": "PointRetrait"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user