Jump to content
Latest News: (loading..)
MyBookShop

Warn on Duplicate UPC

Recommended Posts

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

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

 

Share this post


Link to post
Share on other sites

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.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (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 by raiwa

Share this post


Link to post
Share on other sites
Posted (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 by burt

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
Posted (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 by MyBookShop

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×