Code for override js in magento 1 - Magesan

Code for override js in magento 1

Code for override js in magento 1

Create file in skin/frontend/default/your_theme-> create here (extendedjs.js)

and change your code as per requirement

Like This :-
  Validation.add('validate-cemail', 'Sørg for, at dine e-mails matcher.', function(v) {
    var conf = $$('.validate-cemail')[0];
    var pass = false;
    if ($('email')) {
    pass = $('email');
    var emailElements = $$('.validate-email');
    for (var i = 0; i < emailElements.size(); i++) {
    var emailElement = emailElements[i];
    if (emailElement.up('form').id == conf.up('form').id) {
    pass = emailElement;
    if ($$('.validate-admin-email').size()) {
    pass = $$('.validate-admin-email')[0];
    return (pass.value == conf.value);

then apply it to local.xml -> override your handler (for knowing that which you have to override you should inspect element where you want to apply the js page then see the body element then you can got at there.)

like this :
  <reference name="head">
    <action method="addItem">

Leave a Reply

Your email address will not be published. Required fields are marked *.

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>