Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Feb 2009
    Posts
    419
    Plugin Contributions
    0

    Default Need alert for duplicate part numbers

    Is there a way to make Zencart recognize that you may be loading/using a duplicate part number?

    We're loading products and every so often, whether due to 'fat fingering' or misreading a number, or whatever, we assigned a part number to the new product and then realize that we entered a part number that was already used.

    There should be an alert that a part number is already being used.
    Can this be done?

    Part number = sku number = model number (however you want to phrase it)

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Need alert for duplicate part numbers

    Quote Originally Posted by beyre View Post
    Is there a way to make Zencart recognize that you may be loading/using a duplicate part number?

    We're loading products and every so often, whether due to 'fat fingering' or misreading a number, or whatever, we assigned a part number to the new product and then realize that we entered a part number that was already used.

    There should be an alert that a part number is already being used.
    Can this be done?

    Part number = sku number = model number (however you want to phrase it)
    Probably the easiest way to do this is via the SQL database rather than zencart itself.

    The way to do this would be to use your favourite SQL interface (eg, phpMyAdmin), locate the table and field that holds your part numbers, and set it to 'unique'.

    Cheers
    RodG

  3. #3
    Join Date
    May 2009
    Location
    Tacoma, WA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Need alert for duplicate part numbers

    Quote Originally Posted by RodG View Post
    Probably the easiest way to do this is via the SQL database rather than zencart itself.

    The way to do this would be to use your favourite SQL interface (eg, phpMyAdmin), locate the table and field that holds your part numbers, and set it to 'unique'.

    Cheers
    RodG
    True, but wouldn't that fail silently? I think the poster wanted some way to alert whoever was inputting that id..

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Need alert for duplicate part numbers

    Quote Originally Posted by default1001 View Post
    True, but wouldn't that fail silently?
    To be perfectly honest, I'm not 100% sure.
    What makes you think it will fail silently?
    I'm working under the assumption that since this will produce an unexpected error (something that by definition zencart isn't coded to gracefully handle) it will probably produce an onscreen error.

    I could be wrong, and it'll only take a second to prove/disprove either way, but I'm not on my home computer at the moment so I can't personally verify.

    Cheers
    Rod

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Need alert for duplicate part numbers

    Rod's solution may also present problems with DUPLICATED and LINKED products - a core zencart feature...
    20 years a Zencart User

  6. #6
    Join Date
    Feb 2009
    Posts
    419
    Plugin Contributions
    0

    Default Re: Need alert for duplicate part numbers

    Schoolboy - are you saying that Rod's solution is a correct one then, or that it will open another set of problems?

  7. #7
    Join Date
    Feb 2009
    Posts
    419
    Plugin Contributions
    0

    Default Re: Need alert for duplicate part numbers

    Or is there another solution?

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Need alert for duplicate part numbers

    Quote Originally Posted by schoolboy View Post
    Rod's solution may also present problems with DUPLICATED and LINKED products - a core zencart feature...
    I agree that there may be many *possible* problems caused by my suggestion, but what are the alternatives?

    Ideally the best solution to the problem would be to hack the the zencart code to perform a check and produce a nice controlled error if the product already exists, but this is going to take more time and will require php skills to implement.

    I believe that my suggestion is still worth a try on the basis that it will be quick and easy and doesn't require any coding skills or code changes. If it does cause a problem (which is yet to be confirmed) nothing will have been lost by trying it.

    Hopefully unless someone comes up with a better idea beyre will at least give it a go and report the findings. It'd be a real shame if s/he didn't even give it a go simply because people are concentrating on *possible* problems and reasons why it may not work. Lets not kill the idea without further data.

    Cheers
    Rod

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Need alert for duplicate part numbers

    Quote Originally Posted by beyre View Post
    Schoolboy - are you saying that Rod's solution is a correct one then, or that it will open another set of problems?
    It is neither correct nor incorrect. It is simply a suggestion as to what *I* would be trying first before considering more complex solutions. If it works as I expect your problem is solved. If it doesn't work, or causes other problems then your only other option will be to hack the zencart code itself.

    If you already have duplicated products in your database you may not even be able to make my suggested change until the duplicates are removed.

    Cheers
    Rod

  10. #10
    Join Date
    Feb 2009
    Posts
    419
    Plugin Contributions
    0

    Default Re: Need alert for duplicate part numbers

    Rod,

    Thanks so much for the further explanation.

    I will ask my database guru to do this for me. Databases and I are not friends *grins*

    ~ Barbara

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Internal part numbers
    By jimdanforth in forum Setting Up Categories, Products, Attributes
    Replies: 19
    Last Post: 22 Jan 2014, 06:17 AM
  2. Part Numbers
    By MissFrog in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 13 May 2010, 10:18 PM
  3. Unique part numbers for products with options
    By ksolito in forum General Questions
    Replies: 1
    Last Post: 28 Feb 2009, 10:59 PM
  4. Cross Referencing part number or multiple part numbers
    By seanscully in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 25 Jun 2007, 06:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg