You have no items in your shopping cart.

Tuesday, October 8, 2024 2:26:49 PM

csv feed is stripping out commas in my description

Posted: 6 years ago

#6679 Quote

shoecake

Posted: 6 years ago

#6679 Quote
I am exporting using the Ebay File Exchange feed which outputs a CSV. I have noticed it is stripping out commas in my description.

Ideally, it should put quotes round the text so the commas will not be seen as the start of a new column.

I have already put the quotes round using the new plugin functionality, is there a way of stopping it removing the commas?


The feeds.xml entry is:

<FeedNetWork>
    <Id>173</Id>
    <Name>Ebay File Exchange Template UK (File Exchange Center)</Name>
    <Image>ebay.png</Image>
    <Schema>ebayFileExchangeTemplateUK.xml</Schema>
    <ExportMethodId>172</ExportMethodId>
    <DisplayOrder>26</DisplayOrder>
    <HasMerchantId>true</HasMerchantId>
    <ExportFileType>CSV</ExportFileType>
    <Documentations>
      <DocLinkValue>
        <Message>Products Feed Specification</Message>
        <HtmlUrl>https://securepics.ebaystatic.com/aw/pics/uk/pdf/file_exchange/File_Exchange_Basic_Template_Mini_Guide.pdf</HtmlUrl>
      </DocLinkValue>
      <DocLinkValue>
        <Message>Ebay Category Tree</Message>
        <HtmlUrl></HtmlUrl>
      </DocLinkValue>
      <DocLinkValue>
        <Message>File Exchange - Instructions and Resources</Message>
        <HtmlUrl>https://securepics.ebaystatic.com/aw/pics/uk/pdf/file_exchange/File_Exchange_Advanced_Instructions.pdf</HtmlUrl>
      </DocLinkValue>
    </Documentations>
  </FeedNetWork>  


Can I do this by changing ExportMethodId or ExportFileType ?


Posted: 6 years ago

#6697 Quote

Support

Posted: 6 years ago

#6697 Quote
I see only one solution of this problem "add field enclosure " ".
But I don't sure that eBay supports "field enclosure".
Can you ask eBay support about it and I'll add new parameter in the feed template.

Posted: 6 years ago

#6698 Quote

shoecake

Posted: 6 years ago

#6698 Quote
I have been manually editing the csv file before uploading to eBay so I can confirm they do support field enclosure via the "file exchange" method of uploading.

They certainly do for the description field, so I assume they also will for all the other fields.

Posted: 6 years ago

#6699 Quote

Support

Posted: 6 years ago

#6699 Quote
I think I'll add "field enclosure" for all columns in feed template settings...
I'll answer you tomorrow.

Posted: 6 years ago

#6703 Quote

Support

Posted: 6 years ago

#6703 Quote
I did it.

Version 1.53  - October 17, 2017

+ changed kernel of plugin (clear old code)
+ added new feature Field Enclosure for template (if you use CSV template you can enclosure each columns with "). How to use it?
Open the feeds.xml and take one template
  <FeedNetWork>
    <Id>172</Id>
    <Name>Ebay File Exchange Template (File Exchange Center)</Name>
    <Image>ebay.png</Image>
    <Schema>ebayFileExchangeTemplate.xml</Schema>
    <ExportMethodId>172</ExportMethodId>
    <DisplayOrder>26</DisplayOrder>
    <HasMerchantId>true</HasMerchantId>
    <FieldEnclosure>"</FieldEnclosure>
    <ExportFileType>CSV</ExportFileType>
    <Documentations>
      <DocLinkValue>
        <Message>Products Feed Specification</Message>
        <HtmlUrl>http://pics.ebay.com/aw/pics/pdf/us/file_exchange/SMP_FMC_User_Guide.pdf</HtmlUrl>
      </DocLinkValue>
      <DocLinkValue>
        <Message>Ebay Category Tree</Message>
        <HtmlUrl>http://www.cgmlab.com/ebay-category-tree-download</HtmlUrl>
      </DocLinkValue>
      <DocLinkValue>
        <Message>File Exchange - Instructions and Resources</Message>
        <HtmlUrl>http://pics.ebaystatic.com/aw/pics/pdf/us/file_exchange/File_Exchange_Advanced_Instructions.pdf</HtmlUrl>
      </DocLinkValue>
    </Documentations>
  </FeedNetWork>  

Posted: 6 years ago

#6708 Quote

shoecake

Posted: 6 years ago

#6708 Quote
That works except the code is now removing the " from the data. The best option is to replace a " with a "" this way it will still be a valid csv and will keep the quote.

Also, my code is replacing any line feeds with a space so the html (description field) is on one line of the csv file (as per the eBay specification). I think this would be a good addition as any line feeds would make any csv file invalid.

Posted: 6 years ago

#6712 Quote

Support

Posted: 6 years ago

#6712 Quote
>The best option is to replace a " with a "" this way it will still be a valid csv and will keep the quote.
I added your request.
Thank you.

Posted: 6 years ago

#6719 Quote

shoecake

Posted: 6 years ago

#6719 Quote
OK, I can successfully upload to ebay with only 2 minor changes.

The upload does not like quotes round the first column's header (it doesn't read the first header so errors in determining the file version) so I suggest removing quotes round all of the headers (top row of file). I can't imagine a situation where any csv file would have commas in a header.

Secondly, if a field does not have a value, then it does not like the "" in these fields as it seems to expect there to be some data there. I did a search/replace to remove all "" in the outputted file.

Could you make these changes? I am eternally grateful for all you have done on this.

Posted: 6 years ago

#6721 Quote

Support

Posted: 6 years ago

#6721 Quote
I removed commas for header line and removed commas for empty values.
Try new release.

Posted: 6 years ago

#6723 Quote

shoecake

Posted: 6 years ago

#6723 Quote
That works perfectly now. Thank you so very much. I've already left a review for FeedManager a few months ago, but I'll see if it lets me add another.

Posted: 6 years ago

#6726 Quote

Support

Posted: 6 years ago

#6726 Quote
No, problem.
Thank you too.

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved