Coupon Loop

Return coupons information

{loop type="coupon" name="the-loop-name" [argument="value"], [...]}

Important informations :

* : argument is required
** : at least one of ** marked argument is required

Global arguments

Argument Description

Determine if loop is use in backend context.

default : false

example : backend_context="on"


force return result for i18n tables even if there is no record

default : false

example : force_return="on"


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)


The first product to display offset. Will not be used if `page` argument is set.

default : 0

example : offset="1"


The page to display.

example : page="2"

Loop arguments

Argument Description

A single or a list of coupons code.



A single or a list of coupons ids.

example : id="2", id="1,4,7"


If true, only coupons currently in use in the checkout process are returned. If false, only coupons not in use in the checkout process are returned.

example : in_use="true"


If true, only enabled are returned. If false, only disabled coupons are returned.

example : is_enabled="true"


A list of values

Expected values :
  • code : alphabetical order on coupon code
  • code-reverse : reverse alphabetical order on coupon code
  • days-left : ascending coupon days of validity left
  • days-left-reverse : descending coupon days of validity left
  • enabled : return enabled coupons first
  • enabled-reverse : return disabled coupons first
  • expiration-date : ascending coupon expiration date
  • expiration-date-reverse : descending coupon expiration date
  • id : ascending coupon id
  • id-reverse : descending coupon id
  • title : alphabetical order on coupon title
  • title-reverse : reverse alphabetical order on coupon title
  • usages-left : ascending coupon usage count left
  • usages-left-reverse : descending coupon usage count left

default : manual

example : order="alpha_reverse"

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 Coupon
$UPDATE_DATE The last modification date of this Coupon

Loop outputs

Variable Description
$IS_TRANSLATED check if the coupon is translated or not
AMOUNT the coupon amount. Could be a percentage, or an absolute amount
APPLICATION_CONDITIONS an array of usage conditions descriptions
CODE the coupon code
DAY_LEFT_BEFORE_EXPIRATION days left before coupon expiration
DESCRIPTION the coupon description
DISCOUNT_AMOUNT Amount subtracted from the cart, only if the coupon is currentrly in use
EXPIRATION_DATE the coupon expiration date
FREE_SHIPPING_FOR_COUNTRIES_LIST list of country IDs for which the shipping is free
FREE_SHIPPING_FOR_MODULES_LIST list of module IDs for which the shipping is free
ID the coupon id
IS_AVAILABLE_ON_SPECIAL_OFFERS true if the coupon effect applies to products currently on sale
IS_CUMULATIVE true if the coupon is cumulative with other coupons
IS_ENABLED true if the coupon is enabled
IS_REMOVING_POSTAGE true if the coupon removes shipping costs
LOCALE the coupon locale
PER_CUSTOMER_USAGE_COUNT true if the coupon maximum usage count is per customer
SERVICE_ID the coupon service id
SHORT_DESCRIPTION the coupon short description
TITLE the coupon title
TOOLTIP The coupon short description
USAGE_LEFT number of usages left