Created
June 16, 2016 14:58
-
-
Save grok/cce113792c13fa1cb35631feed6213b3 to your computer and use it in GitHub Desktop.
I have a dirty install of Magento. One of the things I noticed is that e-mails are duplicated for some accounts. This is a quick hack to track them down.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var emails = []; | |
// Magento 1.7 -- Customer Management Screen | |
// Make sure to list out all/most of your customers -- or this loses its effectiveness as pagination is now in play. | |
jQuery('.data tr td:nth-child(4)').each(function() { // Email is in the forth column. | |
var email = $(this).text().trim(); | |
if(jQuery.inArray(email, emails) === -1) { | |
emails.push(email); | |
} else { | |
$(this).css('background-color', 'red'); // Visually find the duplicate. | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment