thelia/group-order-module

dev-master 2020-09-29 12:03 UTC

This package is auto-updated.

Last update: 2024-11-30 01:37:56 UTC


README

This Module allow you to create group orders

Installation

Manually

  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is GroupOrder.
  • Activate it in your thelia administration panel

Composer

Add it in your main thelia composer.json file

composer require thelia/group-order-module:~0.0.1

Usage

During register or in back office you have the possibility to create Main Customers. A main customer can create sub-customers and can fill the cart of the sub-customer.

A sub-customer can connect via the login and password set by the main customer, they have restricted right, they can add items to their cart and once they decide to validate their cart, the cart is sent to the cart of the main-customer.

Hook

Front

  • register.form-bottom is used to add the main customer checkbox on the register page
  • account.additional and account.javascript-initialization is used to add the new panel allowing a main customer to create sub customers
  • main.footer-bottom, main.stylesheet and main.javascript-initialization is used to display the sticky window for main customers
  • login.main-bottom is used to add the login form for sub customers connections

Back

  • customer.edit-js is used to add the main customer checkbox on the customer edit page

Loop

[group_order_sub_customer]

Input arguments

Output arguments

Exemple

<ul>
    {loop type="group_order_sub_customer" name="my_group_order_sub_customer_loop" main_customer=$mainCustomerId}
        <li>{$FIRSTNAME} {$LASTNAME}</li>
    {/loop}
</ul>

[group_order_main_customer]

Input arguments

Output arguments

Exemple

{loop type="group_order_main_customer" name="main_customer_loop" customer_id=$customer_id active=true}
    {assign "isMainCustomer" 1}
{/loop}

[group_order_sub_order]

Input arguments

Output arguments

Example

Add a complete exemple of your loop

Smarty plugin

groupOrderSubCustomerName

Input arguments

Output arguments