Initial commit

This commit is contained in:
2021-03-23 13:54:38 +01:00
commit 82b142ff95
16941 changed files with 2617212 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?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="dynamicproductattributes.attributes" class="DynamicProductAttributes\Loop\Attributes" />
<loop name="dynamicproductattributes.attribute-value" class="DynamicProductAttributes\Loop\AttributeValue" />
</loops>
<services>
<service id="dynamicproductattributes.listener" class="DynamicProductAttributes\EventListeners\EventManager">
<argument type="service" id="request_stack"/>
<argument type="service" id="thelia.translator"/>
<tag name="kernel.event_subscriber"/>
</service>
</services>
<hooks>
<hook id="dynamicproductattributes.hokks" class="DynamicProductAttributes\Hook\HookManager">
<tag name="hook.event_listener" event="cart.javascript-initialization" type="front" />
<tag name="hook.event_listener" event="product.javascript-initialization" type="front"/>
<tag name="hook.event_listener" event="order-invoice.javascript-initialization" type="front"/>
</hook>
</hooks>
</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>DynamicProductAttributes\DynamicProductAttributes</fullnamespace>
<descriptive locale="en_US">
<title>C </title>
</descriptive>
<descriptive locale="fr_FR">
<title>Allows customers to enter additional information before adding a product to the cart</title>
</descriptive>
<languages>
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>0.5.0</version>
<authors>
<author>
<name>Franck Allimant</name>
<company>CQFDev</company>
<email>thelia@cqfdev.fr</email>
<website>www.cqfdev.fr</website>
</author>
</authors>
<type>classic</type>
<thelia>2.3.0</thelia>
<stability>prod</stability>
<mandatory>0</mandatory>
<hidden>0</hidden>
</module>

View File

@@ -0,0 +1,21 @@
<?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="dynamic_product_attribute" namespace="DynamicProductAttributes\Model">
<column name="id" autoIncrement="true" primaryKey="true" required="true" type="INTEGER" />
<column name="cart_item_id" required="true" type="INTEGER" />
<column name="attribute_id" required="true" type="INTEGER" />
<column name="attribute_value" type="CLOB" />
<foreign-key foreignTable="cart_item" name="fk_dynamic_product_attribute_cart_item" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="cart_item_id" />
</foreign-key>
<foreign-key foreignTable="attribute" name="fk_dynamic_product_attribute_attribute" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="attribute_id" />
</foreign-key>
</table>
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
</database>

View File

@@ -0,0 +1,34 @@
# 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;
-- ---------------------------------------------------------------------
-- dynamic_product_attribute
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `dynamic_product_attribute`;
CREATE TABLE `dynamic_product_attribute`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`cart_item_id` INTEGER NOT NULL,
`attribute_id` INTEGER NOT NULL,
`attribute_value` LONGTEXT,
PRIMARY KEY (`id`),
INDEX `FI_dynamic_product_attribute_cart_item` (`cart_item_id`),
INDEX `FI_dynamic_product_attribute_attribute` (`attribute_id`),
CONSTRAINT `fk_dynamic_product_attribute_cart_item`
FOREIGN KEY (`cart_item_id`)
REFERENCES `cart_item` (`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE,
CONSTRAINT `fk_dynamic_product_attribute_attribute`
FOREIGN KEY (`attribute_id`)
REFERENCES `attribute` (`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;