Can't update, only imports 7.03

A forum where issues related to the DataPort utility can be discussed.
Post Reply
deadlybuda
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 22
Joined: Wed Jun 24, 2009 3:39 pm

Can't update, only imports 7.03

Post by deadlybuda » Wed Aug 26, 2009 12:16 pm

Hi, I am using 7.03 Dataport. I am selecting Import New products/ update existing products, and attaching the csv posted below. Existing products will not update, they will actually add new products into the database! The newly imported objects (which should have been updates) look fine and behave normally, but the old one remains, and the ProductId numbering in my database is escalating.
Also perhaps related to this problem, every time I download a CSV, the first column "ProductID" imports into Calc with some garbage on the front end, as well as adding unnecessary quotation marks which I have to edit out in Notepad to get it to have any effect whatsoever when I upload. What's happening?

Here is the csv I was working with:

Code: Select all

"ProductId","StoreId","Name","Price","CostOfGoods","MSRP","Weight","Length","Width","Height","Manufacturer","Sku","ModelNumber","DisplayPage","TaxCode","Shippable","WarehouseId","Warehouse","InventoryModeId","InStock","InStockWarningLevel","ThumbnailUrl","ThumbnailAltText","ImageUrl","ImageAltText","Summary","Description","ExtendedDescription","Vendor","CreatedDate","LastModifiedDate","ProductTemplate","IsFeatured","IsProhibited","AllowReviews","AllowBackorder","WrapGroup","ExcludeFromFeed","HtmlHead","DisablePurchase","MinQuantity","MaxQuantity","VisibilityId","Theme","IconUrl","IconAltText","IsGiftCertificate","Categories","UseVariablePrice","MinimumPrice","MaximumPrice","SearchKeywords","HidePrice","MSExcelWorkAround"
2197,1,"Focus SL-01",0,0,0,0,0,0,0,"Focus",,"SL-01",,"Taxable","Yes",1,"Bear Lighting",0,0,0,"~/Assets/focus_images/sl-01_t.jpg","Focus SL-01","~/Assets/focus_images/sl-01.jpg","Focus SL-01","<P 

><B>CONSTRUCTION:</B>  Black ABS plastic; SL-01-SP7 housing is aluminum</P
><P 

><B>LAMP:</B>  36 watt PAR36 QWFL halogen </P
><P 

><B>SOCKET:  </B>1/4" female disconnect</P
><P 

><B>LAMP LIFE:  </B>4000 hours average rating </P
><P 

><B>WIRING:</B>  Black 4 foot 18/2 zip cord </P
><P 

><B>CONNECTION:  </B>FA-05 Quick Connector (not supplied) from fixture to main cable (12/2, 10/2 or 8/2 only) </P
><P 

><B>FINISH:</B>  Optional finishes available</P
>","<P 

><B>CONSTRUCTION:</B>  Black ABS plastic; SL-01-SP7 housing is aluminum</P
><P 

><B>LAMP:</B>  36 watt PAR36 QWFL halogen </P
><P 

><B>SOCKET:  </B>1/4" female disconnect</P
><P 

><B>LAMP LIFE:  </B>4000 hours average rating </P
><P 

><B>WIRING:</B>  Black 4 foot 18/2 zip cord </P
><P 

><B>CONNECTION:  </B>FA-05 Quick Connector (not supplied) from fixture to main cable (12/2, 10/2 or 8/2 only) </P
><P 

><B>FINISH:</B>  Optional finishes available</P
>",,,08/19/09 06:36 PM,08/26/09 06:29 PM,,TRUE,FALSE,FALSE,FALSE,,FALSE,,FALSE,0,0,0,,"~/Assets/focus_images/sp-01_i.jpg","Focus SL-01",FALSE,"LED Lighting:Focus",FALSE,0,0,"Focus MaxLite LED Par 38 Par 30 Par 20 MR16 Bear Lighting Energy Efficient Warm White Day Light 3500k 5000k SL-01",FALSE,"Do not delete"

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

Re: Can't update, only imports 7.03

Post by Naveed » Sun Aug 30, 2009 9:01 pm

deadlybuda wrote:Existing products will not update, they will actually add new products into the database! The newly imported objects (which should have been updates) look fine and behave normally, but the old one remains, and the ProductId numbering in my database is escalating.
It seems you are not using the match field correctly. If you are using ProductId as match field, it will result updating any existing product with same ID, if you use "Name" as match field it will result updating any existing product with same name.
You can also use a combination of Match fields, like "Name, Sku" and it will try to find a product with same name and sku and will update it if found. If no matching product is found a new product is imported and a warning is registered in the log.

If your CSV data does not contains any new products, and you only want to update existing products use the "Update Only Mode" option to avoid importing of products as duplicate in case the match fails.
deadlybuda wrote: Also perhaps related to this problem, every time I download a CSV, the first column "ProductID" imports into Calc with some garbage on the front end, as well as adding unnecessary quotation marks which I have to edit out in Notepad to get it to have any effect whatsoever when I upload. What's happening?
It seems that you are not properly importing data to CALC.
or
CALC is not recognizing the UTF-8 file format, and miss reading the BOM at the beginning of the file, causing the garbage at the start of file.

Notepad did not recognize the UTF-8 format and is not recommended for editing UTF-8 CSV files. Please use some test editor which supports UTF-8 encoding (Like EditPlus). It seems that the CSV file getting corrupted with invalid characters and this may happen by using an csv/text editor which did not support UTF-8 encoding. I saved your provided data in a file, and opened the CSV data in MS Excel and found a lot of box sign characters in it. I have attached a screen capture for details.

deadlybuda
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 22
Joined: Wed Jun 24, 2009 3:39 pm

Re: Can't update, only imports 7.03

Post by deadlybuda » Tue Sep 01, 2009 12:37 pm

Hi Naveed!
Thanks for the info. When I import in Calc, it has the option to import columns as "Standard" "Text" "hide" etc. Should I maybe select text? What is BOM?

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

Re: Can't update, only imports 7.03

Post by Naveed » Wed Sep 02, 2009 2:54 am

Sorry but I am not much familiar with Calc.

A byte-order mark (BOM) is the Unicode character used as a marker to indicate that text is encoded in UTF-8, UTF-16 or UTF-32. The text editors can read the BOM at the beginning of the file to identify the file encoding. For more details:

http://en.wikipedia.org/wiki/Byte-order_mark

DataPort exports all CSV and XML data in UTF-8 encoding and expects the input in UTF-8 encoding as well. So, using the editors which does not support UTF-8 encoding can introduce problems.

deadlybuda
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 22
Joined: Wed Jun 24, 2009 3:39 pm

Re: Can't update, only imports 7.03

Post by deadlybuda » Wed Sep 02, 2009 12:08 pm

Calc supports UTF-8, but for some reason both Calc and Excel are importing the same garbage at the beginning of the file. This leads me to think that I am not importing it correctly. I import and export with: Separated by Comma, text delimiter by ".

Strangely, I saved in EditPlus and it changed my fields, but then I added the option of separating by : and it worked again and imported????

sdlong02
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 95
Joined: Mon Jan 19, 2009 2:33 pm

Re: Can't update, only imports 7.03

Post by sdlong02 » Wed Sep 02, 2009 2:28 pm

when you download as CSV if you just use "save" excel chooses to put this into a Unicode file which turns your data into jargon. Do a "Save As" CSV

This is my experience with Excel. Also if you keep reimporting the same file, and that file is of new products that did not have a product ID before, it will keep creating the products with new product ID's. You'll need to either fill the PID yourself, or re-download your existing inventory so the PID is already in the file.

Post Reply