Skip to content

Commit

Permalink
Merge pull request #665 from magento-sparta/SUPEE-6995
Browse files Browse the repository at this point in the history
SUPEE-6995: Issue with saving promotions
  • Loading branch information
Korshenko, Olexii(okorshenko) committed Oct 1, 2015
2 parents 3c06d03 + 12bc0c1 commit 5878079
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ function generateCouponCodes(idPrefix, generateUrl, grid) {

var params = Form.serializeElements(elements, true);
params.form_key = FORM_KEY;
$('messages').update();
if ($$('#'+idPrefix + 'information_fieldset .messages')) {
$$('#'+idPrefix + 'information_fieldset .messages')[0].update();
}
if ($('messages')) {
$('messages').update();
}
var couponCodesGrid = eval(grid);
new Ajax.Request(generateUrl, {
parameters :params,
Expand All @@ -81,7 +86,11 @@ function generateCouponCodes(idPrefix, generateUrl, grid) {
couponCodesGrid.reload();
}
if (response && response.messages) {
$('messages').update(response.messages);
if ($$('#'+idPrefix + 'information_fieldset .messages')) {
$$('#'+idPrefix + 'information_fieldset .messages')[0].update(response.messages);
} else if ($('messages')) {
$('messages').update(response.messages);
}
}
if (response && response.error) {
alert(response.error);
Expand Down

0 comments on commit 5878079

Please sign in to comment.