From c26fa09667f53fee76404b005fd62317ebc32eeb Mon Sep 17 00:00:00 2001 From: sLorenzini Date: Tue, 9 Apr 2013 11:22:19 +0200 Subject: [PATCH] [-] BO: fixed bug Cart rules - Javascript error - #PSCFV-5045 --- .../themes/default/template/controllers/cart_rules/form.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/admin-dev/themes/default/template/controllers/cart_rules/form.js b/admin-dev/themes/default/template/controllers/cart_rules/form.js index bad35e93d..ff7c38d9a 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/form.js +++ b/admin-dev/themes/default/template/controllers/cart_rules/form.js @@ -84,6 +84,13 @@ function addCartRuleOption(item) function updateProductRuleShortDescription(item) { + /******* For IE: put a product in condition on cart rules *******/ + if(typeof String.prototype.trim !== 'function') { + String.prototype.trim = function() { + return this.replace(/^\s+|\s+$/g, ''); + } + } + var id1 = $(item).attr('id').replace('_add', '').replace('_remove', ''); var id2 = id1.replace('_select', ''); var length = $('#' + id1 + '_2 option').length;