commence ( commence discount ).coupon code is applicable only one product. but As per attached image coupon has redeemed price on all product in the cart.i am explaining in details here.There are two product with name 1.Preventing Sexual Harassment at the Workplace - Certificate Programme with original price ₹3,596.00 2.Intellectual Property: Law and Management - Certificate Programme with original price ₹3,596.00

i have applied 20 % coupon only first product it should be redeemed -₹899.00 but it has redeemed -₹1,798.00 rather than ₹899.00 it means it is redeeming same amount on another product also however i have not applied coupon on 2nd product.



In admin/commerce/discounts/manage/ choose discount type to product discount and add the product(SKU) for which you want to apply discount and save the discount form.enter image description here

For adding description you can add it in form_alter()

 * Implements hook_form_alter().
function my_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'commerce_checkout_form_checkout' ) {
    $form['commerce_coupon']['#description'] = t('Enter the coupon code <strong>***100</strong> to avail discount');    

Hope it works.

  • Thanks Vamsi really help full.Dear Vasmi can u help me on more thing actually.before applying coupon code i want to display coupon code in my product which i referenced only not all. – Manoj Paul Sep 16 '16 at 11:17
  • You want to display what coupon code right. I too had the same issue, I have done it using form_alter in my custom module. I will the code to the above answer. – Vamsi Sep 16 '16 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.