Initial commit

This commit is contained in:
2020-01-27 08:56:08 +01:00
commit b7525048d6
27129 changed files with 3409855 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="config.xml" server="51.254.220.106//web/" local="131351948400000000" remote="131351948400000000" />
<file name="module.xml" server="51.254.220.106//web/" local="131351948400000000" remote="131351948400000000" />
<file name="routing.xml" server="51.254.220.106//web/" local="131351948400000000" remote="131351948400000000" />
<file name="schema.xml" server="51.254.220.106//web/" local="131351948400000000" remote="131351948400000000" />
<file name="thelia.sql" server="51.254.220.106//web/" local="131351948400000000" remote="131351948400000000" />
</dwsync>

View File

@@ -0,0 +1,39 @@
<?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="order.comment.comment" class="OrderComment\Loop\OrderCommentLoop"/>
<loop name="order.comment.session.comment" class="OrderComment\Loop\SessionOrderCommentLoop"/>
</loops>
<forms>
<form name="order.comment.form" class="OrderComment\Form\CommentForm" />
</forms>
<services>
<service id="order.comment.order.info" class="OrderComment\EventListeners\OrderInfo" scope="request">
<argument type="service" id="request" />
<tag name="kernel.event_subscriber" />
</service>
</services>
<hooks>
<hook id="order.comment.hook.back" class="OrderComment\Hook\BackHook" scope="request">
<tag name="hook.event_listener" type="back" event="order-edit.after-order-product-list" method="onOrderEditAfterOrderProductList"/>
<tag name="hook.event_listener" type="back" event="order-edit.bill-bottom" method="onOrderEditBillBottom"/>
<tag name="hook.event_listener" type="back" event="order.tab-content" method="onOrderTabContent"/>
</hook>
<hook id="order.comment.hook.front" class="OrderComment\Hook\FrontHook" scope="request">
<tag name="hook.event_listener" type="front" event="cart.bottom" method="onCartBottom"/>
<tag name="hook.event_listener" type="front" event="cart.after-javascript-include" method="onCartIncludeJs"/>
<tag name="hook.event_listener" type="front" event="order-delivery.bottom" method="onDeliveryBottom"/>
</hook>
<hook id="order.comment.hook.pdf" class="OrderComment\Hook\PdfHook" scope="request">
<tag name="hook.event_listener" type="pdf" event="delivery.after-summary" method="onDeliveryAfterSummary"/>
</hook>
</hooks>
</config>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<module>
<fullnamespace>OrderComment\OrderComment</fullnamespace>
<descriptive locale="en_US">
<title>Allow customer to add comment to this order</title>
</descriptive>
<descriptive locale="fr_FR">
<title>Permet au client d'ajouter un commentaire à sa commande</title>
</descriptive>
<version>1.2.1</version>
<author>
<name>Vincent Lopes-Vicente</name>
<email>vlopes@openstudio.fr</email>
</author>
<type>classic</type>
<thelia>2.1.</thelia>
<stability>other</stability>
</module>

View File

@@ -0,0 +1,11 @@
<?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="ordercomment.set.comment" path="/ordercomment/set/comment">
<default key="_controller">OrderComment\Controller\OrderCommentController::setComment</default>
</route>
</routes>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<database defaultIdMethod="native" name="thelia" namespace="OrderComment\Model">
<table name="order_comment">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="order_id" required="true" type="INTEGER" />
<column name="comment" required="true" type="LONGVARCHAR" />
<foreign-key foreignTable="order" name="fk_order_comment_order_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="order_id" />
</foreign-key>
</table>
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
</database>

View File

@@ -0,0 +1,27 @@
# 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;
-- ---------------------------------------------------------------------
-- order_comment
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `order_comment`;
CREATE TABLE `order_comment`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`order_id` INTEGER NOT NULL,
`comment` TEXT NOT NULL,
PRIMARY KEY (`id`),
INDEX `FI_order_comment_order_id` (`order_id`),
CONSTRAINT `fk_order_comment_order_id`
FOREIGN KEY (`order_id`)
REFERENCES `order` (`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;