[jQuery Help] Scan or enter barcode and add to table but count duplicate entries.
Hi all,
/* -- BACKGROUND -- */
I work for a company in the retail sector and I have been developing a website for said company. I am currently working on a second site for only staff to use using the WordPress blog/CMS system.
Creating plugins for WordPress I can get my head round but jQuery not so much.
/* -- MY IDEA -- */
My Idea is to have a permanently focused input field where a bar code can be scanned in via a bar code scanner or can me manually entered. Switching between being scanned or manually entered I can do with jQuery.
Once the bar code has be entered/scanned I want it to be added to a table just consisting of two columns, Bar code and Count/QTY.
In due time I can learn to append a table row with data which has been entered.
/* -- QUESTION -- */
Is there a way jQuery can detect a duplicate entry and add it to the Count/QTY and if so how would I go about implementing said feature.
/* -- EXAMPLE -- */
+ BARCODE - QTY +
+ - +
+ Entry A - 1 +
+ Entry B - 1 +
+ Entry A - 1 +
+ Entry A - 1 +
+ -------------------------- +
TO
+ BARCODE - QTY +
+ - +
+ Entry A - 3 +
+ Entry B - 1 +
+ -------------------------- +
Any help or input will be greatly appreciated.
Stephen