Download the PHP package thelia/customer-group-module without Composer

On this page you can find all versions of the php package thelia/customer-group-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package customer-group-module

CustomerGroup

This module adds customer groups, in which you can put customers.

Installation

Manually

Composer

Add it in your main Thelia composer.json file

Configuration

Modules that use customer groups must define them in the customer-group.xml file in the module configuration directory. The groups will be created when the module is activated.

One the groups can be defined as the default group. All new customers will be automatically added to this group.

Events

Events should be used to perform actions related to customer groups.

The CustomerGroup\Event\CustomerGroupEvents class contains event name constants for this module. Event classes are also in the CustomerGroup\Event namespace.

Add a customer to a group

Handler

The customer_group.handler service provide functions to check if a customer belongs to a group. See the CustomerGroupHandler class for available methods.

Get handler (service)

Get session customer's customerGroup info

Check if a customer belongs to a group

Loops

customergroup

This loop list customer groups.

Input arguments

Argument Description
id Id or list of customer group ids.
is_default List only the default group.
code Code or list of customer group codes.
order Order of the results.
lang Locale of the results.

The order can be one of these:

Output variables

Variable Description
$CUSTOMER_GROUP_ID Group id.
$CODE Group code.
$TITLE Group title in the selected locale.
$DESCRIPTION Group description in the selected locale.
$IS_DEFAULT Whether the group is the default group or not.
$POSITION Group position.
$LOCALE Locale of the results.

customercustomergroup

This group lists the associations between customers and customer groups.

Input arguments

Argument Description
customer Id or list of customer ids.
customer_group Id or list of customer group ids.

Output variables

Variable Description
$CUSTOMER_ID Id of the customer.
$CUSTOMER_GROUP_ID Id of the group the customer belongs to.

customer

This module also adds group information to the customer loop and allows filtering the customers using groups.

Additional input arguments

Argument Description
customer_group_id Id or list of customer group ids.
customer_group_code Code or list of customer group codes.
customer_group_is_default List only customers in the default group.

Additional output variables

Variable Description
$CUSTOMER_GROUP_ID Id of the customer's group.
$CUSTOMER_GROUP_CODE Code of the customer's group.
$CUSTOMER_GROUP_DEFAULT Whether the customer's group is the default group.

Query

CustomerQuery

This module provides a CustomerQuery class that extends the base Thelia query and provides methods to filter customers by group.

It can be used in replacement of the base CustomerQuery.

Or mixed in your own query class by using the static methods. These methods take a ModelCriteria query class and will act on it.

They assume that the customer table is already present in the query scope, so your query must for exemple extends CustomerQuery or make a join to the customer table.


All versions of customer-group-module with dependencies

PHP Build Version
Package Version
Requires thelia/installer Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thelia/customer-group-module contains the following files

Loading the files please wait ....