Results 1 to 4 of 4
  1. #1
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Datafeed Fields that Start with Quotes
    I run into datafeed quoting issues from time to time and I just wanted to take a moment to explain this problem and hopefully help merchants avoid it in the future. What happens is some merchants start their product descriptions with a quote and exclude the closing quote.

    The reason some fields need to be quoted is to tell our import scripts to ignore any delimiters that happen to be in that field. So if it's a comma separated datafeed, you need to put quotes around the description when there is a comma in the description. For example:

    Code:
    Product Name, "This description, contains, commas", 12.34, Category 1
    Without the quotes our import scripts and even Excel for that matter would get confused and treat "contains" as the price and "commas" as the category. So here the quotes are very important.

    The problem is that sometimes a merchant will exclude the second quote:

    Code:
    Product Name, "This description, contains, commas, 12.34, Category 1
    Now this creates a huge problem for us because our scripts will think the price and category are part of the description. And what's worse is every product row below this until the next quote will become part of this description. So we might end up with one product with a long, ugly description that contains raw datafeed information for 10-15 products. For example a product page may end up looking like this:

    Code:
    Product: Product Name
    
    Description: This description, contains, commas, 12.34, Category 
    Product Name 2, Description 2, 13.34, Category 1 Product Name 3,
    There is really no workaround for us because our scripts are working the way they're supposed to.

    Sometimes this problem arises when the description just happens to start with a quote, so it's very important to check for this when generating your datafeeds. It's rarely intentional and wreaks havoc on our end.

    Thank you,
    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  2. #2
    Roll Tide mobilebadboy's Avatar
    Join Date
    January 18th, 2005
    Location
    Mobile, Alabama
    Posts
    1,220
    That's a good point, Scott.

    Another issue I run in to from time to time is that fields will be properly enclosed with quotes, but fields will also contain quoted text, for instance:

    Product Name, "This product is rated "first class" by our customers", 12.34, Category 1
    Can't recall an exact scenario right off hand, so I had to make something up. But I've run across that more than once and had to track it down.

    Shawn Kerr (.com) | Disney World | SEC Football

  3. #3
    Full Member
    Join Date
    October 22nd, 2006
    Posts
    200
    Another problem is if the end of line (\r\n) characters appear in the description. The php getcsv cuts the data at that point and you get two half records.

    I get round the problem by adding an extra field at the end of each line with a constant value. When the data is imported into the database I can then check the last column to see if it is the data I created. If it is not I delete that record.

  4. #4
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Quote Originally Posted by Donk
    Another problem is if the end of line (\r\n) characters appear in the description. The php getcsv cuts the data at that point and you get two half records.

    I get round the problem by adding an extra field at the end of each line with a constant value. When the data is imported into the database I can then check the last column to see if it is the data I created. If it is not I delete that record.
    Line breaks in a description are fine as long as the description is quoted. I'd rather they were included when it's a long description.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. PRICE fields in datafeed
    By Chuck Hamrick in forum Programming / Datafeeds / Tools
    Replies: 19
    Last Post: March 2nd, 2013, 10:53 AM
  2. Performics Datafeed Fields
    By ATKOgirl in forum Google Affiliate Network - GAN
    Replies: 2
    Last Post: December 23rd, 2005, 03:23 PM
  3. Best fields for datafeed
    By Arcadius in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: November 9th, 2005, 04:52 PM
  4. Datafeed fields
    By Ms Woodtick in forum WebMerge (Fourthworld.com)
    Replies: 3
    Last Post: May 13th, 2004, 02:08 PM
  5. Datafeed fields
    By futurescopes in forum Rakuten LinkShare - LS
    Replies: 2
    Last Post: October 27th, 2003, 09:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •