2
I’m having a doubt that’s ruining my nights.... I use Gento version 1.9.... more when I installed the module ecomdev
to make the freight calculation on the product page it informs me an error when clicking to calculate freight...
Uncaught TypeError: undefined is not a function
return elements.inject(initial, function(result, element) {
if (!element.disabled && element.name) {
key = element.name; value = $(element).getValue();
if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
submit !== false && (!submit || key == submit) && (submitted = true)))) {
result = accumulator(result, key, value);
}
}
return result;
});
}
};
the error and informed on the excerpt key = element.name; value = $(element).getValue();
You can’t tell where the problem is in the code just by looking at the error message, you need to [Edit] the question and give more context. And when you talk about "prototype", you are talking about the library or the property of constructing functions?
– bfavaretto
the error is reported in the snippet "key = element.name; value = $(element). getValue();"
– Alex Proenca
That one
$(element).getValue();
is strange. You own jQuery on the page?– Lucas
@Lucas he’s using the library prototype.
– Sergio
I am sending a print of the page with the http://sunsetimports.net.br/data/erro-prototype.PNGerror
– Alex Proenca
I am sending a page print with the error [link]|(http://sunsetimports.net.br/data/erro-prototype.PNG) bold
– Alex Proenca
@Alexproenca what gives you
console.log(element, $(element));
inside that function, on the line before the error (inside theif
)?– Sergio
He tagged
jQuery
, I guess jquery is conflicting with the prototype or something.– Guilherme Nascimento
he gives me anonymity function, he does not recognize the command sent from the module, but what is more strange Sergio, and that worked before stopped after I updated the Gento, until I tried to take the old prototype.js file and play in this new one but still he informs me the same error
– Alex Proenca
Yeah, now the problem is where to use
$
(prototype) and where to change the$
forjQuery
. -> http://stackoverflow.com/a/1401394/2256325– Sergio
Wow and I’m new in the area... I’m getting beaten 2 days with this, :(
– Alex Proenca