Skip to content

Instantly share code, notes, and snippets.

@grok
Created June 16, 2016 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grok/cce113792c13fa1cb35631feed6213b3 to your computer and use it in GitHub Desktop.
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.
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