djcaseanova Posted September 22, 2015 Share Posted September 22, 2015 This may or may not be a known issue or bug, but I went to create a coupon for a customer specifically good on a certain item. When I ADD an item, the "Save" button disappears. This happens with all items.Anyone know what's going on with this? Thanks!Version 6.0.7 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 22, 2015 Share Posted September 22, 2015 I just tested 6.0.7 on mine and had no such issue. It saved without a problem. Have you tried it on another item, just in case there's some quirkiness with that product url? Quote Link to comment Share on other sites More sharing options...
djcaseanova Posted September 22, 2015 Author Share Posted September 22, 2015 (edited) Tried it on multiple items. Items for sale, items not on sale. When I type an item and it loads the item, the save button disappears (before hitting the add button) and even if I delete the item, the save button never returns. It's only when I refresh the page will the save button come back, but will not allow me to save the coupon if an item is added.I am using a commercial skin, Galaxy X. I wonder if that's the issue?? However, I don't believe the skin impacts the admin area at all. Edited September 22, 2015 by djcaseanova Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 22, 2015 Share Posted September 22, 2015 Probably related:https://github.com/cubecart/v6/issues/798https://github.com/cubecart/v6/issues/689 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 22, 2015 Share Posted September 22, 2015 I can confirm that I had already added that fix to my sites. Quote Link to comment Share on other sites More sharing options...
djcaseanova Posted September 22, 2015 Author Share Posted September 22, 2015 All fixed up! Thanks! Quote Link to comment Share on other sites More sharing options...
djcaseanova Posted September 26, 2015 Author Share Posted September 26, 2015 (edited) The direct link for the "Fix" is here. Although it doesn't specifically mention coupons, this fix had global issues apparently. Please pay close attention to what you're suppose to remove and replace. https://github.com/cubecart/v6/commit/198f6dffbf56f96605a7e7be704b34602cc2ba37 admin/skins/default/js/plugins/jquery.autocomplete.min.js FIND: (function(j){var q=13;var n=9;var e=27;var g=37;var l=38;var i=39;var r=40;var o=8;var k=46;function a(t){j("#info").append(f(t)+"<br>")}function d(v){var x=-1;var s=-1;if(typeof v.selectionStart!="undefined"){x=v.selectionStart;s=v.selectionEnd}else{if(document.selection&&document.selection.createRange){var w=document.selection.createRange();var t;try{t=w.duplicate();t.moveToElementText(v)}catch(u){t=v.createTextRange()}t.setEndPoint("EndToStart",w);x=t.text.length;if(x>v.value.length){x=-1}t.setEndPoint("EndToStart",w);s=t.text.length;if(s>v.value.length){s=-1}}}return{start:x,end:s}}function c(t,s){t.focus();if(t.setSelectionRange){t.setSelectionRange(s,s)}else{if(t.createTextRange){m=t.createTextRange();m.moveStart("character",s);m.collapse();m.select()}}}function b(u){var s=[];for(var t=0;t<u.length;t++){if(u[t].id!=undefined&&u[t].value!=undefined){u[t].id=u[t].id+"";u[t].value=u[t].value+"";if(u[t].info!=undefined){u[t].info=u[t].info+""}s.push(u[t])}}return s}function h(t){if(t==undefined||!t){return""}return t.replace("\\","\\\\").replace("*","\\*").replace(".","\\.").replace("/","\\/")}function f(t){if(t==undefined||!t){return""}return t.replace("&","&").replace("<","<").replace(">",">")}function p(t){if(t==undefined||!t){return""}return t.replace(/^\s+/g,"")}j.fn.autocomplete=function(s){return this.each(function(){var x=(j(this).attr("rel").length>0)?j(this).attr("rel"):false;var H=(j(this).attr("id").length>0)?j(this).attr("id"):false;var V=j(this);var K=j(this).get(0);if(!V.is("input:text,input:password,textarea")){return}if(!s&&(!j.isFunction(s.get)||!s.ajax_get)){return}if(V.attr("jqac")=="on"){return}V.attr("jqac","on");V.attr("autocomplete","off");s=j.extend({delay:500,timeout:5000,minchars:3,multi:false,cache:true,height:150,autowidth:false,noresults:"No results"},s);V.keydown(function(X){switch(X.which){case q:if(!W){return true}else{B()}return false;case e:A();return false}return true});V.keypress(function(X){switch(X.keyCode){case q:case e:return false;case l:M(X.keyCode);return false;case r:if(!W){C(Q())}else{M(X.keyCode)}return false}return true});V.keyup(function(X){switch(X.which){case q:case e:case g:case i:case l:case r:return false;default:C(Q())}return true});var T="";var z=0;var O=[];var D=0;var W=false;var S=false;var t=false;var u=false;var v=false;var I=false;var P=V.css("z-index");function Q(){var Y=V.val();if(s.multi){var aa=d(K);var Z=aa.start;for(;Z>0&&Y.charAt(Z-1)!=",";Z--){}var X=aa.start;for(;X<Y.length&&Y.charAt(X)!=",";X++){}var Y=Y.substr(Z,X-Z)}return p(Y)}function w(Z){T=Z;if(s.multi){var ac=V.val();var ab=d(K);var aa=ab.start;for(;aa>0&&ac.charAt(aa-1)!=",";aa--){}var Y=ab.start;for(;Y<ac.length&&ac.charAt(Y)!=",";Y++){}var X=ac.substr(0,aa)+(aa>0?" ":"")+Z+ac.substr(Y);V.val(X);c(K,aa+Z.length+(aa>0?1:0))}else{K.focus();V.val(Z)}}function C(aa){if(aa.length<s.minchars){A();return false}if(s.cache&&aa.length>z&&O.length){var X=[];for(var Y=0;Y<O.length;Y++){var Z=new RegExp("("+h(aa)+")","ig");if(Z.exec(O[Y].value)){X.push(O[Y])}}T=aa;z=aa.length;O=X;y(O);return false}else{clearTimeout(v);T=aa;z=aa.length;v=setTimeout(function(){O=[];if(j.isFunction(s.pre_callback)){s.pre_callback()}if(j.isFunction(s.get)){O=b(s.get(aa));y(O)}else{if(j.isFunction(s.ajax_get)){A();I=setTimeout(N,s.delay);s.ajax_get(aa,E,x)}}},s.delay)}return false}function E(X){R();O=b(X);y(O)}function N(){if(!t){t=j('<div class="jqac-menu"><div class="jqac-loading">Loading</div></div>').get(0);j(t).css("position","absolute");var X=V.offset();j(t).css("left",X.left+"px");j(t).css("top",(X.top+V.height()+2)+"px");if(!s.autowidth){j(t).width(V.width())}j("body").append(t)}j(t).show();setTimeout(R,10000)}function R(){if(t){j(t).hide()}clearTimeout(I)}function y(Y){if(W){j(W).remove()}R();F();W=j('<div class="jqac-menu"></div>').get(0);j(W).css({position:"absolute","z-index":P,"max-height":s.height+"px","overflow-y":"auto"});S=j("<ul></ul>").get(0);j(S).css("list-style","none").css("margin","0px").css("padding","2px").css("overflow","hidden");var ac=new RegExp("("+h(f(T))+")","ig");for(var aa=0;aa<Y.length;aa++){var ad=new String(Y[aa].value);var Z=f(ad).replace(ac,"<em>$1</em>");var ab=j('<span class="jqac-link">'+Z+"</span>").get(0);if(Y[aa].info!=undefined&&Y[aa].info!=""){j(ab).append(j('<div class="jqac-info">'+Y[aa].info+"</div>"))}j(ab).attr("name",aa+1);j(ab).click(function(){B();$('input[type="submit"]').prop('disabled', true);$('input[type="submit"]').hide()});j(ab).mouseover(function(){U(j(this).attr("name"),true)});var X=j("<li></li>").get(0);j(X).append(ab);j(S).append(X)}if(Y.length==0){j(S).append('<li class="jqac-warning">'+s.noresults+"</li>")}j(W).append(S);var ae=V.offset();j(W).css("left",ae.left+"px");j(W).css("top",(ae.top+V.height()+2)+"px");if(!s.autowidth){j(W).width(V.width())}j(W).mouseover(function(){F()});j(W).mouseout(function(){J()});j("body").append(W);if(j.fn.bgiframe){j(W).bgiframe({height:W.scrollHeight})}if(W.scrollHeight>s.height){j(W).height(s.height);j(W).width(j(W).width()+20)}D=0;u=setTimeout(function(){A()},s.timeout)}function B(){if(D&&O[D-1]){var X=O[D-1]; REPLACE ABOVE CODE WITH: (function(j){var q=13;var n=9;var e=27;var g=37;var l=38;var i=39;var r=40;var o=8;var k=46;function a(t){j("#info").append(f(t)+"<br>")}function d(v){var x=-1;var s=-1;if(typeof v.selectionStart!="undefined"){x=v.selectionStart;s=v.selectionEnd}else{if(document.selection&&document.selection.createRange){var w=document.selection.createRange();var t;try{t=w.duplicate();t.moveToElementText(v)}catch(u){t=v.createTextRange()}t.setEndPoint("EndToStart",w);x=t.text.length;if(x>v.value.length){x=-1}t.setEndPoint("EndToStart",w);s=t.text.length;if(s>v.value.length){s=-1}}}return{start:x,end:s}}function c(t,s){t.focus();if(t.setSelectionRange){t.setSelectionRange(s,s)}else{if(t.createTextRange){m=t.createTextRange();m.moveStart("character",s);m.collapse();m.select()}}}function b(u){var s=[];for(var t=0;t<u.length;t++){if(u[t].id!=undefined&&u[t].value!=undefined){u[t].id=u[t].id+"";u[t].value=u[t].value+"";if(u[t].info!=undefined){u[t].info=u[t].info+""}s.push(u[t])}}return s}function h(t){if(t==undefined||!t){return""}return t.replace("\\","\\\\").replace("*","\\*").replace(".","\\.").replace("/","\\/")}function f(t){if(t==undefined||!t){return""}return t.replace("&","&").replace("<","<").replace(">",">")}function p(t){if(t==undefined||!t){return""}return t.replace(/^\s+/g,"")}j.fn.autocomplete=function(s){return this.each(function(){var x=(j(this).attr("rel").length>0)?j(this).attr("rel"):false;var H=(j(this).attr("id").length>0)?j(this).attr("id"):false;var V=j(this);var K=j(this).get(0);if(!V.is("input:text,input:password,textarea")){return}if(!s&&(!j.isFunction(s.get)||!s.ajax_get)){return}if(V.attr("jqac")=="on"){return}V.attr("jqac","on");V.attr("autocomplete","off");s=j.extend({delay:500,timeout:5000,minchars:3,multi:false,cache:true,height:150,autowidth:false,noresults:"No results"},s);V.keydown(function(X){switch(X.which){case q:if(!W){return true}else{B()}return false;case e:A();return false}return true});V.keypress(function(X){switch(X.keyCode){case q:case e:return false;case l:M(X.keyCode);return false;case r:if(!W){C(Q())}else{M(X.keyCode)}return false}return true});V.keyup(function(X){switch(X.which){case q:case e:case g:case i:case l:case r:return false;default:C(Q())}return true});var T="";var z=0;var O=[];var D=0;var W=false;var S=false;var t=false;var u=false;var v=false;var I=false;var P=V.css("z-index");function Q(){var Y=V.val();if(s.multi){var aa=d(K);var Z=aa.start;for(;Z>0&&Y.charAt(Z-1)!=",";Z--){}var X=aa.start;for(;X<Y.length&&Y.charAt(X)!=",";X++){}var Y=Y.substr(Z,X-Z)}return p(Y)}function w(Z){T=Z;if(s.multi){var ac=V.val();var ab=d(K);var aa=ab.start;for(;aa>0&&ac.charAt(aa-1)!=",";aa--){}var Y=ab.start;for(;Y<ac.length&&ac.charAt(Y)!=",";Y++){}var X=ac.substr(0,aa)+(aa>0?" ":"")+Z+ac.substr(Y);V.val(X);c(K,aa+Z.length+(aa>0?1:0))}else{K.focus();V.val(Z)}}function C(aa){if(aa.length<s.minchars){A();return false}if(s.cache&&aa.length>z&&O.length){var X=[];for(var Y=0;Y<O.length;Y++){var Z=new RegExp("("+h(aa)+")","ig");if(Z.exec(O[Y].value)){X.push(O[Y])}}T=aa;z=aa.length;O=X;y(O);return false}else{clearTimeout(v);T=aa;z=aa.length;v=setTimeout(function(){O=[];if(j.isFunction(s.pre_callback)){s.pre_callback()}if(j.isFunction(s.get)){O=b(s.get(aa));y(O)}else{if(j.isFunction(s.ajax_get)){A();I=setTimeout(N,s.delay);s.ajax_get(aa,E,x)}}},s.delay)}return false}function E(X){R();O=b(X);y(O)}function N(){if(!t){t=j('<div class="jqac-menu"><div class="jqac-loading">Loading</div></div>').get(0);j(t).css("position","absolute");var X=V.offset();j(t).css("left",X.left+"px");j(t).css("top",(X.top+V.height()+2)+"px");if(!s.autowidth){j(t).width(V.width())}j("body").append(t)}j(t).show();setTimeout(R,10000)}function R(){if(t){j(t).hide()}clearTimeout(I)}function y(Y){if(W){j(W).remove()}R();F();W=j('<div class="jqac-menu"></div>').get(0);j(W).css({position:"absolute","z-index":P,"max-height":s.height+"px","overflow-y":"auto"});S=j("<ul></ul>").get(0);j(S).css("list-style","none").css("margin","0px").css("padding","2px").css("overflow","hidden");var ac=new RegExp("("+h(f(T))+")","ig");for(var aa=0;aa<Y.length;aa++){var ad=new String(Y[aa].value);var Z=f(ad).replace(ac,"<em>$1</em>");var ab=j('<span class="jqac-link">'+Z+"</span>").get(0);if(Y[aa].info!=undefined&&Y[aa].info!=""){j(ab).append(j('<div class="jqac-info">'+Y[aa].info+"</div>"))}j(ab).attr("name",aa+1);j(ab).click(function(){B();$('#sidebar_contain input[type="submit"]').prop('disabled', true);$('#sidebar_contain input[type="submit"]').hide()});j(ab).mouseover(function(){U(j(this).attr("name"),true)});var X=j("<li></li>").get(0);j(X).append(ab);j(S).append(X)}if(Y.length==0){j(S).append('<li class="jqac-warning">'+s.noresults+"</li>")}j(W).append(S);var ae=V.offset();j(W).css("left",ae.left+"px");j(W).css("top",(ae.top+V.height()+2)+"px");if(!s.autowidth){j(W).width(V.width())}j(W).mouseover(function(){F()});j(W).mouseout(function(){J()});j("body").append(W);if(j.fn.bgiframe){j(W).bgiframe({height:W.scrollHeight})}if(W.scrollHeight>s.height){j(W).height(s.height);j(W).width(j(W).width()+20)}D=0;u=setTimeout(function(){A()},s.timeout)}function B(){if(D&&O[D-1]){var X=O[D-1]; Edited September 26, 2015 by djcaseanova Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 26, 2015 Share Posted September 26, 2015 Replacing the entire file is easier. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.