diff --git a/lms/templates/shoppingcart/shopping_cart.html b/lms/templates/shoppingcart/shopping_cart.html index df7e3c4147..0fb52a306d 100644 --- a/lms/templates/shoppingcart/shopping_cart.html +++ b/lms/templates/shoppingcart/shopping_cart.html @@ -208,7 +208,7 @@ from django.utils.translation import ugettext as _ // before going to billing details page // if exists then trigger click event of the apply code button var code = $('div.code-input input#input_code').val(); - if (code!= ''){ + if (typeof(code) != 'undefined' && code != ''){ $('div.code-input #submit-code').trigger('click'); return false; }