Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Aug 2014
    Location
    Northern Virginia
    Posts
    81
    Plugin Contributions
    0

    Default How do you make the model numbers unique?

    On the store I built, the model number field is being used to track inventory. Therefore, the value in this field must always be unique.

    How can this be accomplished?

    Thank you!

  2. #2
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: How do you make the model numbers unique?

    Quote Originally Posted by jokkah View Post
    On the store I built, the model number field is being used to track inventory. Therefore, the value in this field must always be unique.

    How can this be accomplished?

    Thank you!
    You should not use the model number field for this. You should use products quantity field.

    Thanks,

    Anne

  3. #3
    Join Date
    Aug 2014
    Location
    Northern Virginia
    Posts
    81
    Plugin Contributions
    0

    Default Re: How do you make the model numbers unique?

    Quote Originally Posted by picaflor-azul View Post
    You should not use the model number field for this. You should use products quantity field.

    Thanks,

    Anne
    Not tracking inventory meaning quantity, I mean to uniquely identify each product by its own unique product ID (in this case, the value in the model number field).

  4. #4
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: How do you make the model numbers unique?

    Quote Originally Posted by jokkah View Post
    Not tracking inventory meaning quantity, I mean to uniquely identify each product by its own unique product ID (in this case, the value in the model number field).
    Zen cart assigns a unique product id to a product when you add one.

    Thanks,

    Anne

  5. #5
    Join Date
    Aug 2014
    Location
    Northern Virginia
    Posts
    81
    Plugin Contributions
    0

    Default Re: How do you make the model numbers unique?

    Quote Originally Posted by picaflor-azul View Post
    Zen cart assigns a unique product id to a product when you add one.

    Thanks,

    Anne
    I know this. It is the primary key. However, the products are being tracked by a unique product ID already located on a sticker on the product itself. The model number field is being used to input this number from the sticker on each product.

    I just need to know how to make this field unique, that is all.

  6. #6
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: How do you make the model numbers unique?

    If you're talking about a seperate model number for each attribute (size, color, etc.), Zencart can't do that with the current version. There is a Stock by Attribute mod.

  7. #7
    Join Date
    Aug 2014
    Location
    Northern Virginia
    Posts
    81
    Plugin Contributions
    0

    Default Re: How do you make the model numbers unique?

    Quote Originally Posted by stevesh View Post
    If you're talking about a seperate model number for each attribute (size, color, etc.), Zencart can't do that with the current version. There is a Stock by Attribute mod.
    No. Let me give an example.

    I have my store, my store has 5 coin's for sale. It is a coin business.

    Coin #1 - Model # - 10001
    Coin #2 - Model # - 10002
    Coin #3 - Model # - 10003
    Coin #4 - Model # - 10004
    Coin #5 - Model # - 10005

    You see, each coin has a unique model #.

    I want to PREVENT something being added into products that has the same model # as one already in the system. So someone could NOT enter a product with a model # of 10001 for example.

    Is this more clear now?

    Thank you

  8. #8
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: How do you make the model numbers unique?

    In Zen Cart the "products_id" is used to uniquely identify each product (think of this as a Zen Cart specific product SKU). This is used internally by Zen Cart to track inventory, manage orders, etc.

    It sounds like you want to use a 3rd party software (such as QuickBooks) to manage your inventory... And in your 3rd party software you are identifying products by "model" (and not by the Zen Cart product SKU) ...

    If this is the case, you will need to find additional software to integrate (and provide synchronization inventory / data between) the two pieces of software involved. Most well written synchronization software will be able to MAP the Zen Cart product SKU <==> the 3rd Party product SKU.

    NOTE: Of course a poor man's solution may be to alter the database table "products" changing the index "idx_products_model_zen" to unique (enforcing unique model numbers at the database level) and the column "products_model" to not allow NULL values (forcing products to have a model)... But this will complicate the upgrade process in the future... And one will still need to synchronize the inventory model, status, quantity, and other data between Zen Cart and the 3rd party inventory management software... Either by hand or using another 3rd Party tool for integration...
    Last edited by lhungil; 30 Sep 2014 at 08:13 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  9. #9
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: How do you make the model numbers unique?

    lhungil's tiny text suggestion should work, but I don't know what error message you would see (if any) when you tried to add a model number that is in use. Be easy enough to check on a test Zencart installation. There's this for after-the-fact:

    http://www.zen-cart.com/downloads.php?do=file&id=1323

  10. #10
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: How do you make the model numbers unique?

    If I wanted to prevent me duplicating model numbers I would use some javascript to check what you put in the model number in the admin product page to check if it exists or not as you type.

    I would use this Instant Search mod as a guide how to do it as it searches the db in real time.

    http://www.zen-cart.com/downloads.php?do=file&id=1336

    Then you don't have to mess with the database or the code of that admin page.
    You just have to educate the user to take heed of the warning.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 How to assign unique account numbers OR usernames?
    By FourX in forum Managing Customers and Orders
    Replies: 14
    Last Post: 7 Sep 2012, 02:41 AM
  2. How Have You Gotten Around Attribute Model Numbers?
    By nabiscuit in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 23 Aug 2011, 11:07 AM
  3. How Do I Make Model # a link on the Invoice so it searches the site
    By stevenlee in forum Managing Customers and Orders
    Replies: 4
    Last Post: 19 May 2009, 05:00 AM
  4. How do I make the page numbers go away?
    By dkjwebs in forum General Questions
    Replies: 4
    Last Post: 21 Sep 2008, 04:05 PM
  5. Maintaining Unique Model Numbers
    By ted in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Jun 2006, 12:11 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR