Initial commit

This commit is contained in:
2019-05-26 15:57:49 +02:00
commit 9f74ec1089
34290 changed files with 5059123 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?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">
<services>
<service id="freedelivery.eventlistener" class="FreeDelivery\EventListener\FreeDeliveryEventListener" scope="request">
<tag name="kernel.event_subscriber" />
</service>
<service id="freedelivery.plugin" class="FreeDelivery\Smarty\Plugins\FreeDelivery">
<argument type="service" id="service_container" />
<tag name="thelia.parser.register_plugin"/>
</service>
</services>
<hooks>
<hook id="freedelivery.hook" class="FreeDelivery\Hook\HookManager">
<tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfiguration" />
<tag name="hook.event_listener" event="module.config-js" type="back" templates="render:assets/js/module-configuration-js.html" />
</hook>
</hooks>
</config>

View File

@@ -0,0 +1,26 @@
<?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>FreeDelivery\FreeDelivery</fullnamespace>
<descriptive locale="en_US">
<title>Free delivery for all delivery modules from a specific amount by area</title>
</descriptive>
<descriptive locale="fr_FR">
<title>Gérer la livraison gratuite des modules de livraisons par zone et à partir d'un montant</title>
</descriptive>
<languages>
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.0.6</version>
<authors>
<author>
<name>Théophile Pumain</name>
<email>tpumain@openstudio.fr</email>
</author>
</authors>
<type>classic</type>
<thelia>2.3.0</thelia>
<stability>other</stability>
</module>

View File

@@ -0,0 +1,10 @@
<?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="freedelivery.save" path="/admin/module/freedelivery/save">
<default key="_controller">FreeDelivery\Controller\ConfigurationController::saveAction</default>
</route>
</routes>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<database defaultIdMethod="native" name="thelia">
<table name="free_delivery_condition" namespace="FreeDelivery\Model">
<column name="area_id" primaryKey="true" required="true" type="INTEGER" />
<column name="module_id" primaryKey="true" required="true" type="INTEGER" />
<column name="amount" required="true" scale="6" size="16" type="DECIMAL" />
<foreign-key foreignTable="area" name="fk_free_delivery_condition_area_id" onDelete="CASCADE">
<reference foreign="id" local="area_id" />
</foreign-key>
<foreign-key foreignTable="module" name="fk_free_delivery_condition_module_id" onDelete="CASCADE">
<reference foreign="id" local="module_id" />
</foreign-key>
</table>
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
</database>

View File

@@ -0,0 +1,2 @@
# Sqlfile -> Database map
thelia.sql=thelia

View File

@@ -0,0 +1,30 @@
# 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;
-- ---------------------------------------------------------------------
-- free_delivery_condition
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `free_delivery_condition`;
CREATE TABLE `free_delivery_condition`
(
`area_id` INTEGER NOT NULL,
`module_id` INTEGER NOT NULL,
`amount` DECIMAL(16,6) NOT NULL,
PRIMARY KEY (`area_id`,`module_id`),
INDEX `FI_free_delivery_condition_module_id` (`module_id`),
CONSTRAINT `fk_free_delivery_condition_area_id`
FOREIGN KEY (`area_id`)
REFERENCES `area` (`id`)
ON DELETE CASCADE,
CONSTRAINT `fk_free_delivery_condition_module_id`
FOREIGN KEY (`module_id`)
REFERENCES `module` (`id`)
ON DELETE CASCADE
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;