[11/05/2025] On remplace les modules Colissimo par le combo ColissimoHomeDelivery + ColissimoPickupPoint + ColissimoLabel
This commit is contained in:
36
local/modules/ColissimoHomeDelivery/Config/config.xml
Normal file
36
local/modules/ColissimoHomeDelivery/Config/config.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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>
|
||||
<loop name="colissimo.homedelivery.price-slices" class="ColissimoHomeDelivery\Loop\PriceSlicesLoop" />
|
||||
<loop name="colissimo.homedelivery.freeshipping" class="ColissimoHomeDelivery\Loop\ColissimoHomeDeliveryFreeShippingLoop" />
|
||||
<loop name="colissimo.homedelivery.area.freeshipping" class="ColissimoHomeDelivery\Loop\ColissimoHomeDeliveryAreaFreeShippingLoop" />
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
<form name="colissimo.homedelivery.configuration.form" class="ColissimoHomeDelivery\Form\ConfigurationForm" />
|
||||
<form name="colissimo.homedelivery.freeshipping.form" class="ColissimoHomeDelivery\Form\FreeShippingForm" />
|
||||
</forms>
|
||||
|
||||
<services>
|
||||
<service id="colissimo.homedelivery.notification_mail" class="ColissimoHomeDelivery\EventListeners\ShippingNotificationSender">
|
||||
<argument type="service" id="thelia.parser" />
|
||||
<argument type="service" id="mailer"/>
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
<service id="api.colissimo.homedelivery" class="ColissimoHomeDelivery\EventListeners\APIListener" scope="request">
|
||||
<argument type="service" id="service_container"/>
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
<hooks>
|
||||
<hook id="colissimo.homedelivery.hooks" class="ColissimoHomeDelivery\Hook\HookManager">
|
||||
<tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfigure" />
|
||||
<tag name="hook.event_listener" event="module.config-js" type="back" method="onModuleConfigJs" />
|
||||
</hook>
|
||||
</hooks>
|
||||
</config>
|
||||
24
local/modules/ColissimoHomeDelivery/Config/module.xml
Normal file
24
local/modules/ColissimoHomeDelivery/Config/module.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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>ColissimoHomeDelivery\ColissimoHomeDelivery</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>Home delivery with Colissimo</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Livraison à domicile avec Colissimo</title>
|
||||
</descriptive>
|
||||
<languages>
|
||||
<language>en_US</language>
|
||||
<language>fr_FR</language>
|
||||
</languages>
|
||||
<version>1.0.2</version>
|
||||
<author>
|
||||
<name>Thelia</name>
|
||||
<email>info@thelia.net</email>
|
||||
</author>
|
||||
<type>delivery</type>
|
||||
<thelia>2.3.3</thelia>
|
||||
<stability>other</stability>
|
||||
</module>
|
||||
29
local/modules/ColissimoHomeDelivery/Config/routing.xml
Normal file
29
local/modules/ColissimoHomeDelivery/Config/routing.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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">
|
||||
|
||||
<route id="colissimo.home.delivery.config" path="/admin/module/ColissimoHomeDelivery/configure">
|
||||
<default key="_controller">ColissimoHomeDelivery\Controller\ConfigurationController::configure</default>
|
||||
</route>
|
||||
|
||||
<!-- Price Slices -->
|
||||
|
||||
<route id="colissimo.home.delivery.toggle.freeshipping" path="/admin/module/ColissimoHomeDelivery/freeshipping" methods="post">
|
||||
<default key="_controller">ColissimoHomeDelivery\Controller\FreeShippingController::toggleFreeShippingActivation</default>
|
||||
</route>
|
||||
|
||||
<route id="colissimo.home.delivery.edit.areafreeshipping" path="/admin/module/ColissimoHomeDelivery/area_freeshipping" methods="post">
|
||||
<default key="_controller">ColissimoHomeDelivery\Controller\FreeShippingController::setAreaFreeShipping</default>
|
||||
</route>
|
||||
|
||||
<route id="colissimo.home.delivery.add.price-slice" path="/admin/module/ColissimoHomeDelivery/price-slice/save" methods="post">
|
||||
<default key="_controller">ColissimoHomeDelivery\Controller\PriceSliceController::savePriceSliceAction</default>
|
||||
</route>
|
||||
|
||||
<route id="colissimo.home.delivery.update.price-slice" path="/admin/module/ColissimoHomeDelivery/price-slice/delete" methods="post">
|
||||
<default key="_controller">ColissimoHomeDelivery\Controller\PriceSliceController::deletePriceSliceAction</default>
|
||||
</route>
|
||||
|
||||
</routes>
|
||||
34
local/modules/ColissimoHomeDelivery/Config/schema.xml
Normal file
34
local/modules/ColissimoHomeDelivery/Config/schema.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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/propel/propel/resources/xsd/database.xsd" >
|
||||
|
||||
<table name="colissimo_home_delivery_price_slices" namespace="ColissimoHomeDelivery\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="area_id" type="INTEGER" required="true"/>
|
||||
<column name="max_weight" type="FLOAT"/>
|
||||
<column name="max_price" type="FLOAT"/>
|
||||
<column name="shipping" type="FLOAT" required="true"/>
|
||||
|
||||
<foreign-key foreignTable="area" name="fk_colissimo_home_delivery_price_slices_area_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="area_id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<table name="colissimo_home_delivery_freeshipping" namespace="ColissimoHomeDelivery\Model">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="active" type="BOOLEAN" default="0"/>
|
||||
<column name="freeshipping_from" size="18" scale="2" type="DECIMAL" />
|
||||
</table>
|
||||
|
||||
<table name="colissimo_home_delivery_area_freeshipping" namespace="ColissimoHomeDelivery\Model">
|
||||
<column name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="area_id" required="true" type="INTEGER" />
|
||||
<column name="cart_amount" defaultValue="0.00" size="18" scale="2" type="DECIMAL" />
|
||||
<foreign-key foreignTable="area" name="fk_colissimo_home_delivery_area_freeshipping_area_id" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||
<reference foreign="id" local="area_id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
|
||||
</database>
|
||||
2
local/modules/ColissimoHomeDelivery/Config/sqldb.map
Normal file
2
local/modules/ColissimoHomeDelivery/Config/sqldb.map
Normal file
@@ -0,0 +1,2 @@
|
||||
# Sqlfile -> Database map
|
||||
thelia.sql=thelia
|
||||
63
local/modules/ColissimoHomeDelivery/Config/thelia.sql
Normal file
63
local/modules/ColissimoHomeDelivery/Config/thelia.sql
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- colissimo_home_delivery_price_slices
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `colissimo_home_delivery_price_slices`;
|
||||
|
||||
CREATE TABLE `colissimo_home_delivery_price_slices`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`area_id` INTEGER NOT NULL,
|
||||
`max_weight` FLOAT,
|
||||
`max_price` FLOAT,
|
||||
`shipping` FLOAT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FI_colissimo_home_delivery_price_slices_area_id` (`area_id`),
|
||||
CONSTRAINT `fk_colissimo_home_delivery_price_slices_area_id`
|
||||
FOREIGN KEY (`area_id`)
|
||||
REFERENCES `area` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- colissimo_home_delivery_freeshipping
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `colissimo_home_delivery_freeshipping`;
|
||||
|
||||
CREATE TABLE `colissimo_home_delivery_freeshipping`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`active` TINYINT(1) DEFAULT 0,
|
||||
`freeshipping_from` DECIMAL(18,2),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- colissimo_home_delivery_area_freeshipping
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `colissimo_home_delivery_area_freeshipping`;
|
||||
|
||||
CREATE TABLE `colissimo_home_delivery_area_freeshipping`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`area_id` INTEGER NOT NULL,
|
||||
`cart_amount` DECIMAL(18,2) DEFAULT 0.00,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FI_colissimo_home_delivery_area_freeshipping_area_id` (`area_id`),
|
||||
CONSTRAINT `fk_colissimo_home_delivery_area_freeshipping_area_id`
|
||||
FOREIGN KEY (`area_id`)
|
||||
REFERENCES `area` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
Reference in New Issue
Block a user