[Skip to main content](#vessel-content)

#  Coupon Conditions plugin

Details    Written by: Administrator    Category: [Pther extensions](/support/documentation/hikashop/other-extensions)     Published: 28 November 2026     Hits: 11

## Installation

1. Install the plugin with the HikaShop or Joomla installer, then publish it in the plugin manager (Hikashop - Coupon Conditions).
2. Create your coupons in HikaShop, Discounts, as usual: the plugin adds rules on top of them.
3. Open the settings of the plugin and add one block to the "Conditions" list for each rule.

The rules are checked when a customer applies a coupon. The usual restrictions of the coupon (products, categories, dates, quota) still apply as well.

## Configuration

![The Coupon Conditions settings](/images/doc/plugins/coupon-conditions/plg_hikashop_coupon_conditions_settings.png)

The Conditions list has one block per rule, its settings one below the other. Use the plus button to add a rule, the minus button to remove it and the arrows to move it. The settings of a rule are:

- **Coupon Codes**: the coupons the rule applies to (select one or several). Empty, the rule applies to every coupon.
- **Condition**: a formula that must be true for the coupon to be accepted, for instance {cart.price} &gt; 100. Empty, there is no condition.
- **Value formula**: an optional formula that gives the amount of the discount, for instance min({cart.cart\_product\_quantity}, 4) \* {product.unit\_price}. When it is set, it replaces the percentage or flat value of the coupon with the calculated amount, which must be a price without tax (add :tax to a price tag if you need the tax included). Empty, the coupon keeps its own value.
- **Error Message**: the message shown to the customer when the condition is not met. Empty, the message is "Coupon condition not met".
- **Products Logic Operator**: only for conditions that use product tags. AND (default): all the products of the cart must match. OR: at least one product must match.

A rule where both the condition and the value formula are empty does nothing. A condition and a value formula can be used in the same rule or separately.

The formulas can use these tags: {cart.price} (total of the cart, without tax unless you write {cart.price:tax}), {cart.cart\_product\_quantity} (quantity of all the products), {product.unit\_price}, {product.price}, {product.cart\_product\_quantity}, any product field with {product.field}, any user field with {user.field}, any order or cart custom field with {order.field}, and any address field with {billing\_address.field} or {shipping\_address.field}. The functions min(), max(), abs(), round(), ceil() and floor() are available. When a value formula uses product tags, it is calculated for each product of the cart and the results are added.

## Troubleshooting

- **"Coupon condition not met"**: the condition is false for the cart, and the rule has no error message of its own. Check the formula against the cart, or type your own message in the Error Message field of the rule.
- **"The tag ... is invalid in formula: ..."**: the formula uses a tag that does not exist or has no value for this cart (for instance an address field when the customer has no address yet). Correct the name of the tag.
- **A rule seems ignored**: check that the coupon is selected in the Coupon Codes field of that rule (or that the field is empty), and that the rule has a condition or a value formula.
