Customer Loop
Customer loop displays customers information.
{loop type="customer" name="the-loop-name" [argument="value"], [...]}Important informations :
* : argument is required
** : at least one of ** marked argument is required
Global arguments
| Argument | Description |
|---|---|
| backend_context |
Determine if loop is use in backend context. default : false example : backend_context="on" |
| force_return |
force return result for i18n tables even if there is no record default : false example : force_return="on" |
| limit |
The maximum number of results to display. example : limit="10" |
| name * |
The loop name. This name must be unique and is used to reference this loop further in the page (see ifloop, elseloop or pageloop) |
| offset |
The first product to display offset. Will not be used if `page` argument is set. default : 0 example : offset="1" |
| page |
The page to display. example : page="2" |
Text search arguments
| Argument | Description |
|---|---|
| search_in |
A comma separeted list of field in which the search is performed
Possible values : ref, firstname, lastname, email
example : search_in="title" |
| search_mode |
the search mode : `any_word` (search any word separeted by a space), `sentence` (the sentence, anywhere in the field) or `strict_sentence` (the exact sentence) default : strict_sentence |
| search_term |
The term to search example : search_term="my product" |
Loop arguments
| Argument | Description |
|---|---|
| current |
A boolean value which must be set to false if you need to display not authenticated customers information, typically if `sponsor` parameter is set. default : yes example : current="false" |
| id |
A single or a list of customer ids. example : id="2", id="1,4,7" |
| order |
A list of values to order loop results
Expected values :
default : lastname example : order="firstname, lastname" |
| ref |
A single or a list of customer references. example : ref="1231231241", ref="123123,789789" |
| reseller |
A boolean value. example : reseller="yes" |
| sponsor |
The sponsor ID which you want the list of affiliated customers example : sponsor="1" |
| with_prev_next_info |
A boolean. If set to true, $HAS_PREVIOUS, $HAS_NEXT, $PREVIOUS, and $NEXT output variables are available. default : false example : with_prev_next_info="yes" |
Global outputs
| Variable | Description |
|---|---|
| $LOOP_COUNT | the current results index, starting from 1 |
| $LOOP_TOTAL | the total number of results returned by the loop |
| $CREATE_DATE | The creation date of this Customer |
| $UPDATE_DATE | The last modification date of this Customer |
Loop outputs
| Variable | Description |
|---|---|
| $CONFIRMATION_TOKEN | the customer registration confirmation token, used when email confirmation of registration is enabled (see customer_email_confirmation configuration variable) |
| $DISCOUNT | the customer discount |
| the customer email | |
| $FIRSTNAME | the customer firstname |
| $HAS_NEXT | true if a customer exists after the current one, regarding the curent order. Only available if with_prev_next_info parameter is set to true |
| $HAS_PREVIOUS | true if a customer exists before the current one, regarding the curent order. Only available if with_prev_next_info parameter is set to true |
| $ID | the customer id |
| $LASTNAME | the customer lastname |
| $NEWSLETTER | true if the customer is registered in the newsletter table, false otherwise |
| $NEXT | ID of the next customer, or null if non exists. Only available if with_prev_next_info parameter is set to true |
| $PREVIOUS | ID of the previous customer, or null if non exists. Only available if with_prev_next_info parameter is set to true |
| $REF | the customer reference |
| $RESELLER | return if the customer is a reseller |
| $SPONSOR | the customer sponsor which might be use in another customer loop |
| $TITLE | the customer title which might be use in title loop |