Loading...

Using coupons with Acquia Commerce Manager

Acquia Commerce Manager supports coupons with carts, enabling your commerce application to deliver discounts or other promotions to your users within your Drupal application.

Changing or retrieving a coupon

The coupon variable stores the current value of the coupon. To change an applied coupon code, submit the new coupon code, which will remove the current coupon code and set the new one in its place.

Usage of coupons

Only one coupon code can be set at any time. When using coupons:

  • If you submit an incorrect coupon code, no coupon code is set.

  • If you send an incorrect coupon code string to Commerce Connector Service, any existing coupon code will be removed.

The Acquia Commerce Manager Demo theme contains examples of coupon code usage and theming. Coupons are a standard form element:

$form_state->getValue('coupon')

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation