Skip to main content

Customer

Customer loop displays customers information.
{loop type="customer" name="the-loop-name" [argument="value"], [...]}

Arguments

ArgumentDescriptionDefaultExample
currentA boolean value which must be set to false if you need to display not authenticated customers information, typically if sponsor parameter is set.yescurrent="false"
idA single or a list of customers ids.id="2", id="1,4,7"
orderA list of values see sorting possible valueslastnameorder="firstname, lastname"
refA single or a list of customer references.ref="1231231241", ref="123123,789789"
resellerA boolean value.reseller="yes"
sponsorThe sponsor ID which you want the list of affiliated customerssponsor="1"
with_prev_next_infoA boolean. If set to true, $HAS_PREVIOUS, $HAS_NEXT, $PREVIOUS, and $NEXT output variables are available.falsewith_prev_next_info="yes"

Plus the global arguments and search arguments

Outputs

VariableValue
$CONFIRMATION_TOKENthe customer registration confirmation token, used when email confirmation of registration is enabled (see customer_email_confirmation configuration variable)
$DISCOUNTthe customer discount
$EMAILthe customer email
$FIRSTNAMEthe customer firstname
$HAS_NEXTtrue 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_PREVIOUStrue if a customer exists before the current one, regarding the curent order. Only available if with_prev_next_info parameter is set to true
$IDthe customer id
$LASTNAMEthe customer lastname
$NEWSLETTERtrue if the customer is registered in the newsletter table, false otherwise
$NEXTID of the next customer, or null if non exists. Only available if with_prev_next_info parameter is set to true
$PREVIOUSID of the previous customer, or null if non exists. Only available if with_prev_next_info parameter is set to true
$REFthe customer reference
$RESELLERreturn if the customer is a reseller
$SPONSORthe customer sponsor which might be use in another customer loop
$TITLEthe customer title which might be use in title loop

Plus the global outputs

Order possible values

Arguments

Ascending valueDescending valueSorted fields
firstnamefirstname_reversefirstname
idid_reverseID
last_orderlast_order_reverselast order
lastnamelastname_reverselastname
lregistration_date_reverselregistration_date_reverseregistration date
order_amountorder_amount_reverselast order
referencereference_reversereference
registration_dateregistration date