Jump to content

[Solved] How to validate field ean13 when adding a product PS 1.6


sylarlocke

Recommended Posts

Hi, I'm trying to be able to validate the field ean13, so that there is only one record in the table with a unique code.

I think it's the file "AdminProductController.php" in which I have to check.

I'm not sure where I put the code when I add a product and get a validation error message like "Ean13 number already exists a record".

I have thought something similar to this:

 

'SELECT id_product FROM' ._DB_PREFIX _. 'Product WHERE ean13 = "'. PSQL ($ ean13). '


Can someone help me?

Thank you.

Edited by sylarlocke (see edit history)
Link to comment
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
×
×
  • Create New...