MyBookShop Posted April 15, 2018 Share 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? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted April 15, 2018 Share 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 Quote About Me: http://www.oscommerce.com/forums/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 Link to comment Share on other sites More sharing options...
burt Posted April 15, 2018 Share 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. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted April 15, 2018 Share 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 Quote About Me: http://www.oscommerce.com/forums/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 Link to comment Share on other sites More sharing options...
burt Posted April 15, 2018 Share 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 Bobber, raiwa and Omar_one 3 Quote Link to comment Share on other sites More sharing options...
MyBookShop Posted April 16, 2018 Author Share 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.