How can I change the Coupon label and description in the checkout pane?
I tried to user hook_form_alter but it is not working.
I've tried form_id commerce_coupon_pane_checkout_form and commerce_product_ui_product_form.

Is there a different way to do this?


skchan2’s picture

Id like to know this also, I want to change "Enter here your coupon code" to "Enter your coupon code here"

kruser’s picture

I was able to hook_form_alter to change this...

function custom_form_alter(&$form, &$form_state, $form_id) {
  switch ($form_id) {
    case 'commerce_checkout_form_checkout':
      $form['commerce_coupon']['coupon_code']['#description'] = t('Enter your coupon code here.');
millionleaves’s picture

Would be handy if the ability to change (or remove) the instructions were exposed in the module configuration page, or perhaps in the 'Coupons' checkout panes configuration screen.

At the every least, could I suggest changing the hard-coded label to the grammatically more correct: "Enter your coupon code here".

UPDATE: confirmed that the method outlined in #2 works. I created a custom module including this function and was able to override the form label with that. I still have to open up a module file to make changes, but at least this is better than changing the commerce_coupon module code and having it overridden next time I upgrade the module.

leewillis77’s picture

There's an issue (With patch) here that covers some of this.

Once this is installed, the strings should be translatable, which would mean you could change them using String Overrides module ( It also changes the grammar of the string you identified.

sureshpotnuru’s picture

Issue summary: View changes

yes, correct leewillis77. but you finds module at Thanks for save my day.