Open lankeeyankee opened 4 years ago
Since the Products
handler already gives the option of using either the products_id
or products_model
, I'm presuming that you're referring to the attributes and specials handlers. Please advise.
Sorry, yes, was referring to the products handler. I tried to upload a sheet with only model, upc, and quantity and got an error saying products_id was required. I didn't see in the config anywhere to set import by model. Do I need to do something else to get it to work? I did not see anything related to this in the docs.
Even with v_products_id added as a header and the column being blank, the sheet is not importing, I get a log saying products.products_id, line #4: Value () is not an integer or Record at line #3 not imported; insufficient header-fields provided for a product addition. I double checked the header row and it looks fine. It has
v_products_model | v_products_upc | v_products_msrp | v_map_price | v_map_enabled | v_products_id | v_products_quantity
which all are in an exported sheet and copied from it just to make sure my eyes are not deceiving my brain
Are these pre-existing products? The products_id, if you don't want to use it, must be set to 0 (a valid integer).
Aha, ok, that was it. Sorry. I didn't think to put 0 because I thought it would reset the ID to 0.
I'll use this issue to start a series of handler-specific on-line FAQs.
The products_id, if you don't want to use it, must be set to 0 (a valid integer).
But, if there is an unoticed error in the model (space maybe?) so it does not match an existing model AND products_id is 0, would that not cause a new product to be created?
What you said is true.
Does that not seem a bit "dangerous"...especially in the context of perhaps using a third party source of those models as per the OP? I'm over cautious with anything that does database stuffing, I would have erred on the side of requiring a specific command in the v_dbio_command column to permit inserts rather than updates.
Does that not seem a bit "dangerous"...especially in the context of perhaps using a third party source of those models as per the OP? I'm over cautious with anything that does database stuffing, I would have erred on the side of requiring a specific command in the v_dbio_command column to permit inserts rather than updates.
Yes, see #180.
It is problematic forcing the use of product IDs. Example: a vendor updates pricing. I cannot simply take the vendor's sheet, change the headers to match dbio and import since dbio requires product IDs. We are running into many instances of this and it severely limits dbio's functionality and usefulness.
Is it possible to stop basing functionality on the ID and use only the model?