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

On this page you can find all versions of the php package thelia/customer-family-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-family-module

Customer Family

Create customer families (professional, private individual, ...) and manage specific prices.

Also allow to define purchase prices for products.

Compatibility

Thelia >= 2.3.x

For use with lower version of Thelia look for older tags on this module.

Installation

Manually

Composer

Add it in your main thelia composer.json file

Usage

This module is visible in the BackOffice Customer Edit.

Use the first tab to create, edit or remove families. You can also define default family, use to show specific price to unlogged customers.

The second tab allows you to define how prices are calculated for each family, depending on the products purchase price.

Product's prices are automatically changed in the 'product' loop, you don't need to use 'customer_family_pse_calculated_prices' loop (see below) to get product's prices.

Loops

Use provided loops to display for example taxed or untaxed price depending on the customer's family.

customer_family

This loop returns client families

Input arguments

Argument Description
id family id
exclude_id exclude family id
is_default filter default family

Output values

Argument Description
CUSTOMER_FAMILY_ID customer family id
CODE customer family code
TITLE_CUSTOMER_FAMILY customer family title
IS_DEFAULT default customer family

Example

customer_customer_family

This loop returns customer family for specific customer or inverse

Input arguments

Argument Description
customer_id customer id
customer_family_id family id
customer_family_code family code

Output values

Argument Description
CUSTOMER_FAMILY_ID customer family id
CUSTOMER_ID customer id

Example

customer_family_price

This loop returns the customer family's equation data

Input arguments

Argument Description
customer_family_id family id
promo equation for the promo price or not
use_equation is the equation used to calculate price

Output values

Argument Description
CUSTOMER_FAMILY_ID customer family id
PROMO equation for the promo price or not
USE_EQUATION is the equation used to calculate price
AMOUNT_ADDED_BEFORE amount directly added to the purchase price
AMOUNT_ADDED_AFTER amount added to the purchase price after the multiplication
COEFFICIENT coefficient the purchase price added to AMOUNT_ADDED_BEFORE is multiplied by
IS_TAXED are taxes applied on the final calculated price

Example

customer_family_pse_calculated_prices

This loop returns the PSE's calculated price based on the given customer family & currency

Input arguments

Argument Description
pse_id mandatory, PSE id
currency_id currency id (if not given, use default currency)
customer_family_id mandatory, customer family id

Output values

Argument Description
CALCULATED_PRICE customer family id
CALCULATED_TAXED_PRICE equation for the promo price or not
CALCULATED_PROMO_PRICE is the equation used to calculate price
CALCULATED_TAXED_PROMO_PRICE amount directly added to the purchase price

Example

Form customer_family_customer_create_form

This form extend customer_create_form

Fields

Name Type Required
customer_family_id integer true

Default

By default, two families are created


All versions of customer-family-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-family-module contains the following files

Loading the files please wait ....