Sorry... our attempt to test was to attempt a successful IMPORT, not upload.
Sorry... our attempt to test was to attempt a successful IMPORT, not upload.
Last edited by Carbonless; 28 Apr 2016 at 12:00 AM.
Glad you provided that correction, because I was just about to comment on the difference between the upload and import (other versions don't seem to have that "two" step process or it is not understood the difference.
Glad to know that part, but how do you "know" that no changes were made to anything after the import was what I was trying to get at..
As to the "setup", well I consider this new feature potentially hazardous to the "unknowing" and so I did include a little bit of "difficulty" to set it up at least as I have just taken a lap through the code... That being, to export with the products_id included one needs to currently add it to the user defined fields list. For import, the v_products_id field must be present and the admin configuration switch should be set to something other v_product_model... Capitalization does count, so above where V_products_ID was typed, that would be an incorrect field name for the purposes of the code.
Also were the "number" of columns modified between the export and import? (ie. columns removed?)
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
My steps:
Import/Export Primary Key: products_id
Added:Exported file
User Defined Products Fields products_id
Changed ONLY the Product name of 2 items and modified the model names of the same 2 products.
Saved file
uploaded
clicked import
Result:
Finished Processing Import File
Updated records: 0
New Imported records: 0
Errors Detected: 0
Warnings Detected: 0
Memory Usage: 21087176
Memory Peak: 23515400
Execution Time: 0 seconds.
Verified against the actual products online with no changes.
I did verify that "For import, the v_products_id field must be present and the admin configuration switch should be set to something other v_product_model"
Any other item I'm missing?
I just ran an export with user defined field products_id in the admin-configuration (although was using version 4.0.34 not 4.0.34.a), then added three characters to the end of one of my test products, then with the primary key set to products_id, imported the file, every product showed as "updated" (even though technically nothing was to change except for the three characters added to the product name), and when I went to the store, the three characters were added to the product's name as expected...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Let me try modifying the product_model information of my test product to see what happens and if that is somehow associated... It was my expectation that this process would allow modification of the products_model field because that field would no longer be a primary field of concern...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Okay, so it does appear that the products_model record for some reason is not getting updated, but other related information does... Need to chase that down because someone else that had requested the capability to import by products_id didn't mention this "issue" otherwise it wouldn't be one...
Here are the results of me importing the test products that were exported from my test category (single category only rather than the entire file) where the only change between export and import was the products_model for "model" 277 was to add three characters.:
What is being used to modify the file/store it as a CSV?Filename: Full-EP2016Apr27-192924.csv
UPDATED! - Model: 275 | prod_attr | 1 | | Test Multi | Trying to | | | | | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | | 2016-03-18 | 10000 | | Test attri | --none-- | 1 | 0 | 0 | 0 | 0 | 0 | | | |
UPDATED! - Model: 276 | test_singl | 1 | | Test Attri | This produ | | | | | 15 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | | 2016-03-28 | 100 | | Test attri | --none-- | 1 | 0 | 0 | 0 | 0 | 0 | | | |
UPDATED! - Model: 277 | test_singl | 1 | Rdog1.jpg | Test Attri | This produ | | | | | 15 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | | 2016-04-01 | 100 | | Test attri | --none-- | 1 | 0 | 0 | 0 | 0 | 0 | | | |
UPDATED! - Model: 278 | test_doubl | 1 | | Test Attri | This produ | | | | | 16 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | | 2016-04-06 | 99 | | Test attri | --none-- | 1 | 0 | 0 | 0 | 0 | 0 | | | |
UPDATED! - Model: 279 | test_tripl | 1 | | Test Attri | This produ | | | | | 17 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | | 2016-04-06 | 100 | | Test attri | --none-- | 1 | 0 | 0 | 0 | 0 | 0 | | | |
UPDATED! - Model: 280 | add_attrib | 1 | | test add a | This is he | | | | | 25 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | | 2016-04-13 | 5 | | Test attri | --none-- | 1 | 0 | 0 | 0 | 0 | 0 | | | |
Finished Processing Import File
Updated records: 6
New Imported records: 0
Errors Detected: 0
Warnings Detected: 0
Memory Usage: 785064
Memory Peak: 1302016
Execution Time: 0 seconds.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
To confirm, you have the primary key set as products_id and have it entered in the User defined products field?
here is my configuration
Title Value Action Uploads Directory EPtemp/
Uploads Directory Admin/Catalog true Info
Import/Export Primary Key products_id Info
Upload File Date Format m-d-y Info
Default Raw Time 09:00:00 Info
Upload/Download Prices Include Tax false Info
Verbose Feedback true Info
Show all EP4 Filetypes with Files true Info
Replace Blank Image false Info
Make Zero Qty Products Inactive false Info
Smart Tags Replacement of Newlines true Info
Advanced Smart Tags false Info
Debug Logging true Info
Maximum Quantity Discounts 3 Info
Split On Number of Records 2000 Info
Script Execution Time 60 Info
Convert Curly Quotes, etc. 0 Info
Convert Character 0x92 1 Info
Enable Products Meta Data 1 Info
Enable Products Music Data 0 Info
User Defined Products Fields products_id Info
Export URI with Prod and or Cat 0
I downloaded a new file. I edited one product title by 5 characters.
removed, other than header line, all other unedited lines, saved the file with one record in it, uploaded and imported
the result was the same
Import Results
Filename: Full-EP2016Apr27-184246.csv
Finished Processing Import File
Updated records: 0
New Imported records: 0
Errors Detected: 0
Warnings Detected: 0
Memory Usage: 4867608
Memory Peak: 5363688
Execution Time: 0 seconds.
Would say similar:
Believe there is still an open question. What is being used to edit the csv file/save it?Uploads Directory secret_folder_with_no_end_slash
Uploads Directory Admin/Catalog true Info
Import/Export Primary Key products_id Info
Upload File Date Format m-d-y Info
Default Raw Time 09:00:00 Info
Upload/Download Prices Include Tax false Info
Verbose Feedback true Info
Show all EP4 Filetypes with Files true Info
Replace Blank Image false Info
Make Zero Qty Products Inactive false Info
Smart Tags Replacement of Newlines true Info
Advanced Smart Tags false Info
Debug Logging true Info
Maximum Quantity Discounts 3 Info
Split On Number of Records 2000 Info
Script Execution Time 60 Info
Convert Curly Quotes, etc. 0 Info
Convert Character 0x92 1 Info
Enable Products Meta Data 1 Info
Enable Products Music Data 0 Info
User Defined Products Fields products_id Info
Export URI with Prod and or Cat 0 Info
If you in fact open the file with a plain text editor does it look correct? (typically quotes around each set of text, that is then separated by a comma, with some form of carriage return at the end of each line.)
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Huh.. Go figure.. Can add a new product with a new model number, but it looks like the products_model field for "updating" didn't get incorporated in the update section... (looking strictly at the code) even though I have it (products_model) included as a user defined field.
So, in this case? (until I get it fixed as part of my very soon to be released 4.0.35 as I want to test the few changes I made), one would need to or could, duplicate the product information in the import file, while importing by products_id such that the first occurrence deletes the product (status 9), the second occurrence with the same products_id reloads it... But, *shucks* I guess there is a downside to that as if there are attributes and other data "dependent" on the products_id, then they may get removed/reshuffled as well... Okay, should have a fix momentarily for the UPDATE of the products_model when using products_id or blank_new as the import option.. You should still be getting a report of updated product though or some sort of error that either the primary key doesn't exist or there is a problem with the remaining data...
Thank you for pointing out this issue... It's a shame, I guess the update portion hadn't been fully flushed out because the insert works fine... Maybe the priorities on the project changed, I can't recall..
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...