MyBookShop 10 Posted April 15, 2018 As my shop and categories grow larger it would be nice if the [New Product] input could warn on duplicate UPC. If UPC was the first thing input this could reduce duplicate products appearing in different categories. Please? Share this post Link to post Share on other sites
♥raiwa 1,472 Posted April 15, 2018 You would need to add a check if the UPC already exists when a new product is inserted/product is updated. If it aleready exists, error should be shown and submission aborted. All of this needs to be done in admin/categories.php within the action: case 'insert_product': case 'update_product': hope this helps Rainer About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Share this post Link to post Share on other sites
burt 5,612 Posted April 15, 2018 Or a piece of javascript will do it. So as you enter the UPC it is green, but turns red if the UPC is already used. Share this post Link to post Share on other sites
♥raiwa 1,472 Posted April 15, 2018 (edited) array of existing UPC (gtin)'s is not retrieved if creating a new product. How should the check then work with javascript before submission? Or do I miss something and you suppose a query to get the list should be added at the top of file? Edited April 15, 2018 by raiwa About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Share this post Link to post Share on other sites
burt 5,612 Posted April 15, 2018 (edited) 2 minutes ago, raiwa said: array of existing UPC (gtin)'s is not retrieved if creating a new product. How should the check then work with javascript before submission? Or do I miss something and you suppose a query to get the list should be added at the top of file? $.post it to a processing script onBlur. Similar as this:http://www.clubosc.com/unique-product-models-in-oscommerce.html Edited April 15, 2018 by burt 3 raiwa, Bobber and Omar_one reacted to this Share this post Link to post Share on other sites
MyBookShop 10 Posted April 16, 2018 (edited) Burt, I will donate another $80USD for this and add the ability to search on UPC in the customer shop. Its a good change (benefits every store) and it should go into the core but a plugin would be fine i guess.. Edited April 16, 2018 by MyBookShop Share this post Link to post Share on other sites