I believe you were asking about the differences between new_blank and products_id, but I'll describe both.
In order to identify a single product in the database, there must be some field that contains information specific to that product. That is a generic description of a primary_key. It is possible for a table/product/object to be identified by a combination of fields to identify a unique field or primary_key for that thing.
The primary key is most important when importing. This way the field can be used to match up with the item in the database. Zen Cart does not require products_model to be unique, so it is possible that two product could have the same products_model. But, every product is given a products_id.
By providing the products_id and the data to be updated, that product can receive the desired update. But, the database normally manages products_id assignment such that a historical product remains a part of the database in some way.
So there came a request by someone to allow the generation of a product by assigning a products_id and there also was a desire to just be able to create product without being worried about a unique products_model. So, a method was developed to allow product management specifically by products_id such that if the products_id were empty on import, that row of data would be ignored just like it is when working with products_model as a primary_key. But... then there was the concern of how to create a new product without knowing the latest/next products_id... So, the use of a blank entry as the products_id identifier seemed like the right way to go and it had to be specifically set...
So now, if the primary_key is set to blank_new, for any product that has the products_id field, if the products_id field is empty, a new product will be attempted to be created. If the primary_key is set simply to products_id, then a blank entry for products_id field will cause that row to be ignored.
Bookmarks