Initial Commit
This commit is contained in:
35
local/modules/FreeShipping/Config/config.xml
Normal file
35
local/modules/FreeShipping/Config/config.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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="free_shipping" class="FreeShipping\Loop\FreeShipping" />
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
<form name="freeShipping.admin.rule.creation" class="FreeShipping\Form\FreeShippingRuleCreationForm"/>
|
||||
<form name="freeShipping.admin.rule.modification" class="FreeShipping\Form\FreeShippingRuleModificationForm"/>
|
||||
</forms>
|
||||
|
||||
<commands>
|
||||
<!--
|
||||
<command class="MyModule\Command\MySuperCommand" />
|
||||
-->
|
||||
</commands>
|
||||
|
||||
<templateDirectives>
|
||||
<!-- Sample definition
|
||||
<templateDirectives class="MyModule\Directive\MyTemplateDirective" name="my_filter"/>
|
||||
-->
|
||||
</templateDirectives>
|
||||
|
||||
<services>
|
||||
<service id="freeShipping.action" class="FreeShipping\Action\FreeShippingAction">
|
||||
<argument type="service" id="service_container"/>
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
</config>
|
||||
18
local/modules/FreeShipping/Config/module.xml
Normal file
18
local/modules/FreeShipping/Config/module.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module>
|
||||
<fullnamespace>FreeShipping\FreeShipping</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>Free Shipping</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Franco de port</title>
|
||||
</descriptive>
|
||||
<version>1.0.1</version>
|
||||
<author>
|
||||
<name>Michaël Espeche</name>
|
||||
<email>mespeche@openstudio.fr</email>
|
||||
</author>
|
||||
<type>delivery</type>
|
||||
<thelia>2.1.0</thelia>
|
||||
<stability>alpha</stability>
|
||||
</module>
|
||||
24
local/modules/FreeShipping/Config/routing.xml
Normal file
24
local/modules/FreeShipping/Config/routing.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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="admin.freeShipping.rule.create" path="/admin/module/FreeShipping/create">
|
||||
<default key="_controller">FreeShipping\Controller\Admin\FreeShippingController::createRuleAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.freeShipping.rule.delete" path="/admin/module/FreeShipping/delete">
|
||||
<default key="_controller">FreeShipping\Controller\Admin\FreeShippingController::deleteAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.freeShipping.rule.edit" path="/admin/module/FreeShipping/update/{ruleId}">
|
||||
<default key="_controller">FreeShipping\Controller\Admin\FreeShippingController::updateAction</default>
|
||||
<requirement key="ruleId">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<route id="admin.freeShipping.rule.save" path="/admin/module/FreeShipping/save">
|
||||
<default key="_controller">FreeShipping\Controller\Admin\FreeShippingController::processUpdateAction</default>
|
||||
</route>
|
||||
|
||||
</routes>
|
||||
16
local/modules/FreeShipping/Config/schema.xml
Normal file
16
local/modules/FreeShipping/Config/schema.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database defaultIdMethod="native" name="thelia" >
|
||||
<!--
|
||||
See propel documentation on http://propelorm.org for all information about schema file
|
||||
-->
|
||||
<table name="free_shipping" namespace="FreeShipping\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="area_id" required="true" type="INTEGER" />
|
||||
<column name="amount" required="true" type="INTEGER" />
|
||||
<foreign-key foreignTable="area" name="fk_area_associated_freeShipping_area_id">
|
||||
<reference foreign="id" local="area_id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
|
||||
</database>
|
||||
2
local/modules/FreeShipping/Config/sqldb.map
Normal file
2
local/modules/FreeShipping/Config/sqldb.map
Normal file
@@ -0,0 +1,2 @@
|
||||
# Sqlfile -> Database map
|
||||
thelia.sql=thelia
|
||||
25
local/modules/FreeShipping/Config/thelia.sql
Normal file
25
local/modules/FreeShipping/Config/thelia.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
# 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_shipping
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `free_shipping`;
|
||||
|
||||
CREATE TABLE `free_shipping`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`area_id` INTEGER NOT NULL,
|
||||
`amount` INTEGER NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FI_area_associated_freeShipping_area_id` (`area_id`),
|
||||
CONSTRAINT `fk_area_associated_freeShipping_area_id`
|
||||
FOREIGN KEY (`area_id`)
|
||||
REFERENCES `area` (`id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
Reference in New Issue
Block a user