Sorry für den neuen Thread. Aber leider bekommt man in anderen absolut keine Antwort mehr. Daher neu. Entschuldigt. Aber an was könnte es liegen wenn ich andauernd die Fehler Meldung bekomme:
Uncaught TypeError: $.overridePlugin is not a function
Meine Quelldatei -> unter meine custom template/theme im src Ordner:
$(function () {
$.overridePlugin('swSearch', {
/**
* Triggers an AJAX request with the given search term.
*
* @public
* @method triggerSearchRequest
* @param {String} searchTerm
*/
triggerSearchRequest: function (searchTerm) {
var countDigitsMatch = searchTerm.match(/[0-9\\/]/g);
var countDigits = countDigitsMatch == null ? 0 : countDigitsMatch.length;
var countSpacesMatch = searchTerm.match(/ /g);
var countSpaces = countSpacesMatch == null ? 0 : countSpacesMatch.length;
var countTotal = searchTerm.length;
var hasMoreDigitsThanChars = countDigits >= (countTotal - countSpaces - countDigits);
if (searchTerm.match(/^[0-9\\/]*$/) !== null || hasMoreDigitsThanChars)
{
searchTerm = searchTerm.replace(/ /g, '').replace(/\//g, '_');
console.log(searchTerm);
}
var me = this;
me.$loader.fadeIn(me.opts.animationSpeed);
me.lastSearchTerm = $.trim(searchTerm);
$.publish('plugin/search/onSearchRequest', [me, searchTerm]);
$.ajax({
'url': me.requestURL,
'data': {
'sSearch': me.lastSearchTerm
},
'success': function (response) {
me.showResult(response);
$.publish('plugin/search/onSearchResponse', [me, searchTerm, response]);
}
});
}
});
});