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,31 @@
<?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">
<hooks>
<hook id="hookwishlist.hook.front">
<tag name="hook.event_listener" event="main.navbar-secondary" templates="wishlist-navbar-secondary.html"/>
</hook>
</hooks>
<loops>
<loop name="wishlist" class="WishList\Loop\WishList" />
</loops>
<services>
<service id="wishList.smarty.plugin" class="WishList\Smarty\Plugins\WishList" scope="request">
<argument type="service" id="request"/>
<tag name="thelia.parser.register_plugin"/>
</service>
<service id="wishList.action" class="WishList\Action\WishList">
<tag name="kernel.event_subscriber"/>
</service>
<service id="wishList.customer.listener" class="WishList\EventListener\CustomerListener">
<argument type="service" id="request_stack"/>
<argument type="service" id="thelia.securityContext"/>
<tag name="kernel.event_subscriber"/>
</service>
</services>
</config>

View File

@@ -0,0 +1,30 @@
<?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>WishList\WishList</fullnamespace>
<descriptive locale="en_US">
<title>Wish list</title>
</descriptive>
<descriptive locale="fr_FR">
<title>Liste de souhaits</title>
</descriptive>
<languages>
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.2.2</version>
<authors>
<author>
<name>Michaël Espeche</name>
<email>mespeche@openstudio.fr</email>
</author>
<author>
<name>Gilles Bourgeat</name>
<email>gbourgeat@openstudio.fr</email>
</author>
</authors>
<type>classic</type>
<thelia>2.3.0</thelia>
<stability>prod</stability>
</module>

View File

@@ -0,0 +1,26 @@
<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="front.wishlist.add" path="/wishlist/add/{productId}/{json}">
<default key="_controller">WishList\Controller\Front\WishListController::addProduct</default>
<requirement key="productId">\d+</requirement>
<default key="json">0</default>
<requirement key="json">[0|1]</requirement>
</route>
<route id="front.wishlist.remove" path="/wishlist/remove/{productId}">
<default key="_controller">WishList\Controller\Front\WishListController::removeProduct</default>
<requirement key="productId">\d+</requirement>
</route>
<route id="front.wishlist.clear" path="/wishlist/clear">
<default key="_controller">WishList\Controller\Front\WishListController::clear</default>
</route>
<route id="front.wishlist.view" path="/wishlist/view">
<default key="_controller">Thelia\Controller\Front\DefaultController::noAction</default>
<default key="_view">view-wishlist</default>
</route>
</routes>

View File

@@ -0,0 +1,21 @@
<?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="wish_list" namespace="WishList\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="product_id" required="true" type="INTEGER" />
<column name="customer_id" required="true" type="INTEGER" />
<index name="idx_wish_list_product_id">
<index-column name="product_id" />
</index>
<index name="idx_wish_list_customer_id">
<index-column name="customer_id" />
</index>
<behavior name="timestampable" />
</table>
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
</database>

View 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;
-- ---------------------------------------------------------------------
-- wish_list
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `wish_list`;
CREATE TABLE `wish_list`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`product_id` INTEGER NOT NULL,
`customer_id` INTEGER NOT NULL,
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`),
INDEX `idx_wish_list_product_id` (`product_id`),
INDEX `idx_wish_list_customer_id` (`customer_id`)
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;