Announcement

Collapse
No announcement yet.

Template Data Feed and Ebay

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: Template Data Feed and Ebay

    No storemorph. It would be easy enough to make a token to run that command. I haven't studied that function or how it could be used with a flat file. The file is not being opened by a browser so I don't see how 'Content-Type', 'text/csv' is helpful. The export is simply writing to a file. It uses the mivascript command MvEXPORT. The first byte in the created file is the text that is exported. I can't see anything else with a hex editor. A csv file is a bit different from a plain text file in that text columns are wrapped with "xxxx". Numeric are not. The " can be built into the data feed export. And the file saved as comma separted csv file.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #17
      Re: Template Data Feed and Ebay

      Originally posted by Geographicus View Post
      1. When I create my data feed I need to open it in Excel and resave it in CSV format for ebay to read it - any idea why??
      Kevin,

      I just realized from your header section that you are using %^% for the delimiter token. If the file for ebay is supposed to be a comma delimited you don't need to do that although you could do it that way. Or you can enter the delimiter directly as the character ,

      What are you naming the export file? Is it csv?

      What delimiter are you using?

      Are you putting quote marks around the tokens in the product section when the column is text?

      The below would be an example of the template that would export comma separated values (csv). The " marks around the tokens for character columns are needed in case the actual data in the field contains commas. Commas are common in the description field and some other fields.
      "%product:code%","%custom:manuf%",etc

      You might want to make a new template and modify as above. Then make a small test file. Don't open with Excel. See if ebay takes it without the open and save.
      Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
      Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
      Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
      Facebook http://www.facebook.com/EmporiumPlus
      Twitter http://twitter.com/emporiumplus

      Comment


        #18
        Re: Template Data Feed and Ebay

        Also an idea... if a flat file is being created, and he is trying to access that flat file from the server directly and saving it to his local machine. He might need to simply add a mime type to his htaccess (or ms web server) settings.

        I thought he was accessing the file dynamically, in which case response headers are definitely helpful. For a static file, the servers mime type settings should handle the response headers.


        I frequently use a ^ or | symbol instead of a comma for my delimited feeds. It is very useful and common if you have quote marks and commas in your data. Almost all text feed or csv importers allow you to specify the delimiter to be different from a comma.
        Last edited by kayakbabe; 07-07-09, 03:09 PM.

        Comment


          #19
          Re: Template Data Feed and Ebay

          Apparently the ebay lister is requiring the comma separated value format. Hence the reason Kevin was having to open in Excel and then save. When he saved, it was doing it as csv with quote marks around the text fields. If the feed is setup to export as csv with the quotes around fields, the use of Excel should not be needed. Using ^ or | would mean he would still need to use Excel as an intermediate. Putting quotes around the fields means you can have comma in the value of the field and still use a comma as a delimiter. In the template data feed if you specify a length for the description there is a line in the code that strips " marks so you can wrap that field with quotes. But I agree, ^ and | are the safer delimiters. It just means you have an extra step.
          Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
          Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
          Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
          Facebook http://www.facebook.com/EmporiumPlus
          Twitter http://twitter.com/emporiumplus

          Comment


            #20
            Re: Template Data Feed and Ebay

            ah yes!

            Say... could he use your toolkit to double escape fields with quotes and commas or to do a substitution of a character? I'm asking becuase from ebay turbolist specs on this link http://pages.ebay.com/turbo_lister/csv.html it says:
            Any field containing a comma or a double-quote character must be surrounded by double-quotes. (To specify a double-quote character within the field, you must enter two double-quote characters. Example: "He said, ""Goodbye"", then he left.")

            Newline characters should be replaced with %0a in text fields (Description).


            From that spec it appears that one couldn't just double quote all name, description, or any field that might possibly have a quotation mark or comma in it. It has to be the quote marks themselves that are doubled.

            Also since miva will let you store newline characters in your descriptions then those will need to be stripped off or replaced too. Those newline characters create havoc with excell too. Or does your feed module already strip out all new line characters?
            Last edited by kayakbabe; 07-07-09, 04:49 PM.

            Comment


              #21
              Re: Template Data Feed and Ebay

              It strips the line feed and carriage return characters. It also strips tabs. And in the case I mentioned above it strips the quote. When I edit an Excel file and put a " in there intentionally, then export, that quote mark is not "". Instead it is some ascii character I did not lookup to see what the ascii value was. When you export with a comma in the value it looks something like this ....,"3rd Man, The",..... The comma inside the field is not treated as a delimiter as long as the " are at each end of the field.
              Last edited by wcw; 07-07-09, 05:02 PM.
              Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
              Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
              Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
              Facebook http://www.facebook.com/EmporiumPlus
              Twitter http://twitter.com/emporiumplus

              Comment


                #22
                Re: Template Data Feed and Ebay

                Yes, Excel does some nasty things to files sometimes. All the Microsoft suite products do it. Microsoft thinks it's perfectly okay to alter peoples files by changing normal quotes and double quotes to something 'pretty' called smart quotes, those are extended on standard microsoft specific ascii characters. You can 'turn it off' but the settings are hard to find and I've found that on occassion Office Updates will turn them back on with out you knowing. Frustrating.

                It's horrid of microsoft to do that. Darn Microsoft I say.

                Anyway. I"m sure that is why he wants to have the feed maker, make the feed correctly instead of having to take the extra manual steps of opening and saving in excel.

                Perhaps we're helping him with all our input. I hope so. I know that I am glad all this is documented in these forums. I use them for reference a lot.

                So his feed needs to look something like
                "xxx","xxx","xxx","xxx","xxx","xxx","xxx","xxx","x xx","xxx","xxx","xxx"
                Where the xxx are replaced by the appropriate tokens from your module like %name% %description% and so on. So in Geo's first long email the ^ should be replaced with ","
                and also a " and the beginning and end of each line.

                but how can he do a double quote mark if his description contains one.
                for example say his description is
                One customer said, "Fantastic" doesn't begin to describe this product.

                In the feed it will need to appear as
                "One customer said, ""Fantastic"" doesn't begin to describe this product."

                How can he create those doubled quotation marks within the feed?

                Comment


                  #23
                  Re: Template Data Feed and Ebay

                  He can't. In the feed setup you can limit the description to a set number of characters. If anything is used in that input, eg 9998, there is a line of code that will strip the quote marks. Not perfect but it solves the various characters that different programs are using based on the character set in use. It just eliminates the character.
                  Last edited by wcw; 07-07-09, 05:28 PM.
                  Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                  Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                  Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                  Facebook http://www.facebook.com/EmporiumPlus
                  Twitter http://twitter.com/emporiumplus

                  Comment


                    #24
                    Re: Template Data Feed and Ebay

                    I updated the module so it will double quote the name and description fields if there is a quote mark inside the field and the file name contains .csv and the delimiter is a comma. That should solve the ebay scenario. The line will look like "One customer said, ""Fantastic"" doesn't begin to describe this product." in the feed. Inside Excel that text reverts back to One customer said, "Fantastic" doesn't begin to describe this product.
                    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                    Facebook http://www.facebook.com/EmporiumPlus
                    Twitter http://twitter.com/emporiumplus

                    Comment

                    Working...
                    X