|
7 | 7 | <loops>
|
8 | 8 | <loop name="customer_family" class="CustomerFamily\Loop\CustomerFamilyLoop" />
|
9 | 9 | <loop name="customer_customer_family" class="CustomerFamily\Loop\CustomerCustomerFamilyLoop" />
|
| 10 | + <loop name="customer_family_price" class="CustomerFamily\Loop\CustomerFamilyPriceLoop" /> |
| 11 | + <loop name="product_purchase_price" class="CustomerFamily\Loop\ProductPurchasePriceLoop" /> |
| 12 | + <loop name="customer_family_pse_calculated_prices" class="CustomerFamily\Loop\CustomerFamilyProductPriceLoop" /> |
10 | 13 | </loops>
|
11 | 14 |
|
12 | 15 | <forms>
|
13 | 16 | <form name="customer.family.create.form" class="CustomerFamily\Form\CustomerFamilyCreateForm" />
|
14 | 17 | <form name="customer.family.update.form" class="CustomerFamily\Form\CustomerFamilyUpdateForm" />
|
| 18 | + <form name="customer_family_update_default_form" class="CustomerFamily\Form\CustomerFamilyUpdateDefaultForm" /> |
15 | 19 | <form name="customer.family.delete.form" class="CustomerFamily\Form\CustomerFamilyDeleteForm" />
|
16 | 20 |
|
17 | 21 | <form name="customer.customer.family.form" class="CustomerFamily\Form\CustomerCustomerFamilyForm" />
|
18 |
| - </forms> |
19 | 22 |
|
20 |
| - <commands> |
21 |
| - <!-- |
22 |
| - <command class="MyModule\Command\MySuperCommand" /> |
23 |
| - --> |
24 |
| - </commands> |
| 23 | + <form name="customer_family_price_update" class="CustomerFamily\Form\CustomerFamilyPriceForm" /> |
| 24 | + </forms> |
25 | 25 |
|
26 | 26 | <services>
|
27 |
| - <service id="customer.family.action" class="CustomerFamily\EventListeners\CustomerFamilyListener" scope="request"> |
| 27 | + <!-- Service class --> |
| 28 | + <service id="customer.family.service" class="CustomerFamily\Service\CustomerFamilyService"> |
| 29 | + <argument type="service" id="thelia.securityContext"/> |
| 30 | + <argument type="service" id="thelia.taxEngine"/> |
| 31 | + </service> |
| 32 | + |
| 33 | + <!-- Main listener --> |
| 34 | + <service id="customer.family.action" class="CustomerFamily\EventListeners\CustomerFamilyListener"> |
28 | 35 | <argument type="service" id="request" />
|
29 | 36 | <argument type="service" id="thelia.parser" />
|
30 | 37 | <argument type="service" id="mailer"/>
|
31 | 38 | <tag name="kernel.event_subscriber"/>
|
32 | 39 | </service>
|
33 | 40 |
|
34 | 41 | <!-- Listening to create and update customer form actions -->
|
35 |
| - <service id="customer.family.form.action" class="CustomerFamily\EventListeners\CustomerFamilyFormListener" scope="request"> |
| 42 | + <service id="customer.family.form.action" class="CustomerFamily\EventListeners\CustomerFamilyFormListener"> |
36 | 43 | <argument type="service" id="request" />
|
37 | 44 | <tag name="kernel.event_subscriber"/>
|
38 | 45 | </service>
|
| 46 | + |
| 47 | + <!-- Listening produt price edition --> |
| 48 | + <service id="customer.family.product.purchase.price" class="CustomerFamily\EventListeners\PseExtendPriceFormListener"> |
| 49 | + <tag name="kernel.event_subscriber"/> |
| 50 | + </service> |
| 51 | + |
| 52 | + <!-- Listening PSE price edition --> |
| 53 | + <service id="customer.family.pse.purchase.price" class="CustomerFamily\EventListeners\ProductExtendPriceFormListener"> |
| 54 | + <tag name="kernel.event_subscriber"/> |
| 55 | + </service> |
| 56 | + |
| 57 | + <!-- Listening product loop creation --> |
| 58 | + <service id="customer.family.price" class="CustomerFamily\EventListeners\CustomerFamilyPriceListener"> |
| 59 | + <argument type="service" id="thelia.securityContext"/> |
| 60 | + <argument type="service" id="thelia.taxEngine"/> |
| 61 | + <argument type="service" id="customer.family.service"/> |
| 62 | + <tag name="kernel.event_subscriber"/> |
| 63 | + </service> |
| 64 | + |
| 65 | + <!-- Listening cart product adding & loop creation --> |
| 66 | + <service id="customer.family.cart" class="CustomerFamily\EventListeners\CustomerFamilyCartListener"> |
| 67 | + <argument type="service" id="customer.family.service"/> |
| 68 | + <tag name="kernel.event_subscriber"/> |
| 69 | + </service> |
| 70 | + |
| 71 | + <!-- Listening order creation --> |
| 72 | + <service id="customer.family.order" class="CustomerFamily\EventListeners\CustomerFamilyOrderListener"> |
| 73 | + <argument type="service" id="customer.family.service"/> |
| 74 | + <tag name="kernel.event_subscriber"/> |
| 75 | + </service> |
| 76 | + |
| 77 | + <!-- Listening customer login / logout tu update cart items prices --> |
| 78 | + <service id="customer.family.customer.connection" class="CustomerFamily\EventListeners\CustomerFamilyCustomerConnectionListener"> |
| 79 | + <argument type="service" id="request" /> |
| 80 | + <argument type="service" id="customer.family.service"/> |
| 81 | + <tag name="kernel.event_subscriber"/> |
| 82 | + </service> |
39 | 83 | </services>
|
40 | 84 |
|
41 | 85 | <hooks>
|
| 86 | + <!-- Global hook class --> |
| 87 | + <hook id="customer.family.hook" class="CustomerFamily\Hook\CustomerFamilyHook"> |
| 88 | + <tag name="hook.event_listener" event="main.head-css" type="back" method="onAddCss"/> |
| 89 | + </hook> |
| 90 | + |
| 91 | + <!-- Admin configuration templates --> |
| 92 | + <hook id="customer.family.config"> |
| 93 | + <tag name="hook.event_listener" event="module.configuration" type="back" templates="render:module_configuration.html" /> |
| 94 | + <tag name="hook.event_listener" event="module.config-js" type="back" templates="render:assets/js/module-config-js.html" /> |
| 95 | + </hook> |
| 96 | + |
| 97 | + <!-- Admin customer edit --> |
| 98 | + <hook id="customer.family.customer.edit"> |
| 99 | + <tag name="hook.event_listener" event="customer.edit" type="back" templates="render:customer-edit.html" /> |
| 100 | + </hook> |
| 101 | + |
| 102 | + <!-- Admin product edit purchase price --> |
| 103 | + <hook id="customer.family.product.price.edit" class="CustomerFamily\Hook\CustomerFamilyProductPriceHook"> |
| 104 | + <tag name="hook.event_listener" event="product.combinations-row" type="back" method="onPsePriceEdit" /> |
| 105 | + <tag name="hook.event_listener" event="product.details-pricing-form" type="back" templates="render:product-details-pricing.html" /> |
| 106 | + <tag name="hook.event_listener" event="product.details-promotion-form" type="back" templates="render:product-details-promo.html" /> |
| 107 | + <tag name="hook.event_listener" event="product.edit-js" type="back" templates="render:assets/js/product-edit-js.html" /> |
| 108 | + </hook> |
| 109 | + |
42 | 110 | <!-- Additional fields for the register form -->
|
43 |
| - <hook id="customer.family.register.form" class="CustomerFamily\Hook\CustomerFamilyRegisterFormHook" scope="request"> |
| 111 | + <hook id="customer.family.register.form" class="CustomerFamily\Hook\CustomerFamilyRegisterFormHook"> |
44 | 112 | <tag name="hook.event_listener" event="register.form-bottom" type="front" method="onRegisterFormBottom"/>
|
45 | 113 | <tag name="hook.event_listener" event="register.after-javascript-include" type="front" method="onRegisterAfterJSInclude"/>
|
46 | 114 | </hook>
|
47 | 115 |
|
48 |
| - <!-- Showing customer family informations --> |
49 |
| - <hook id="customer.family.account.display" class="CustomerFamily\Hook\CustomerFamilyAccountDisplayHook" scope="request"> |
| 116 | + <!-- Showing customer family information --> |
| 117 | + <hook id="customer.family.account.display" class="CustomerFamily\Hook\CustomerFamilyAccountDisplayHook"> |
50 | 118 | <tag name="hook.event_listener" event="account.additional" type="front" method="onAccountAdditional"/>
|
51 | 119 | </hook>
|
52 | 120 |
|
53 | 121 | <!-- Additional fields for the account update form -->
|
54 |
| - <hook id="customer.family.update.form" class="CustomerFamily\Hook\CustomerFamilyUpdateFormHook" scope="request"> |
| 122 | + <hook id="customer.family.update.form" class="CustomerFamily\Hook\CustomerFamilyUpdateFormHook"> |
55 | 123 | <tag name="hook.event_listener" event="account-update.form-bottom" type="front" method="onAccountUpdateFormBottom"/>
|
56 | 124 | <tag name="hook.event_listener" event="account-update.after-javascript-include" type="front" method="onAccountUpdateAfterJSInclude"/>
|
57 | 125 | </hook>
|
58 | 126 | </hooks>
|
59 | 127 |
|
60 |
| - <!-- |
61 |
| - <exports> |
62 |
| -
|
63 |
| - </exports> |
64 |
| - --> |
65 |
| - |
66 |
| - <!-- |
67 |
| - <imports> |
68 |
| -
|
69 |
| - </imports> |
70 |
| - --> |
71 | 128 | </config>
|
0 commit comments