Announcement

Collapse
No announcement yet.

Automating Exports

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

    Automating Exports

    I'm interested in automating exporting data, specifically the orders.
    The end goal is to export the orders and import in to another system (Orange Leap's MPX software).
    Is there an easy way to do this so that I can either have it automatically do it every so often or initiate the export somehow and download it via ftp?

    I have a crawler written already and am stuck at the export portion where javascript is being used and I'm trying to decypher what variables I need to pass to get it to finish off and send the emails. I'd rather have a cron job or some other process to do the exports.

    Thoughts?

    #2
    Re: Automating Exports

    you need a helper script that can be triggered from an external source. all the merchant based exports require that you be "logged" into the admin (and faking the login is not recommended). This could also be a PHP app as the databases are SQL. Either way, make sure the script is called securely, and is password protected.

    If you need help creating either, you can contact me off list at bruce @ phosphormedia as we do this all the time for a lot of our clients.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: Automating Exports

      You can run the EZ Batch module with a cron job, thus automating the export of the current orders batch.
      http://www.emporiumplus.com/go/wcw/PROD/1AA/1AA00211

      Use it in conjunction with the Create Batch by Date module which can also run from cron and create a batch of the unbatched orders.
      http://www.emporiumplus.com/go/wcw/PROD/1AA/1AA00056

      See the install doc of each to see the details on how to run the cron.
      http://www.emporiumplus.com/tk3/v3/doc.htm
      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


        #4
        Re: Automating Exports

        Originally posted by Bruce - PhosphorMedia View Post
        you need a helper script that can be triggered from an external source. all the merchant based exports require that you be "logged" into the admin (and faking the login is not recommended). This could also be a PHP app as the databases are SQL. Either way, make sure the script is called securely, and is password protected.

        If you need help creating either, you can contact me off list at bruce @ phosphormedia as we do this all the time for a lot of our clients.
        On a slightly different topic...

        Would it be possible to create a script that would:
        1. Download data from an ftp site
        2. upload it into MIVA custom product fields on daily basis?

        Thanks

        Comment


          #5
          Re: Automating Exports

          Originally posted by Red Flare View Post
          On a slightly different topic...

          Would it be possible to create a script that would:
          1. Download data from an ftp site
          2. upload it into MIVA custom product fields on daily basis?

          Thanks
          Yes. I've written some C# code to download data from an FTP site, upload it to another, then you can have it fire off a script (php, for example) to have it initiate the upload process. what programming languages are you familiar with?

          Bruce, thank you. I'm in the process of figuring out the CPanel access. It doesn't appear like other CPanels I've used before. We're currently using hostmysite.com. My first goal is to procure db login information.
          I'm wondering if it's using a stored proc or just a simple filtered view later parsed by php.

          I'm still learning Miva stuff, as I've just been thrown in to this mix.

          Comment


            #6
            Re: Automating Exports

            Originally posted by Red Flare View Post
            On a slightly different topic...

            Would it be possible to create a script that would:
            1. Download data from an ftp site
            2. upload it into MIVA custom product fields on daily basis?

            Thanks

            Of course it would (assuming the Host support CRON jobs). The difficulty lies in the details though. You would probably call (via CRON) a php script to download the data from the FTP site, then call a helper function in Merchant to update the custom fields.
            Bruce Golub
            Phosphor Media - "Your Success is our Business"

            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
            phosphormedia.com

            Comment


              #7
              Re: Automating Exports

              Originally posted by kmann View Post
              what programming languages are you familiar with?
              none :)

              Comment


                #8
                Re: Automating Exports

                Originally posted by kmann View Post
                Bruce, thank you. I'm in the process of figuring out the CPanel access. It doesn't appear like other CPanels I've used before. We're currently using hostmysite.com. My first goal is to procure db login information.
                I'm wondering if it's using a stored proc or just a simple filtered view later parsed by php.
                not sure what you mean by a stored procedure...when Merchant runs, the underlying system logs into the database and sets access to it for the Merchant scripts (broad generilization).

                All you need to access it is the actual login information which can then be used by PHP functions to gain access. (provided of course, that hostmysite.com lets you...some hosts do not provide that information.
                Bruce Golub
                Phosphor Media - "Your Success is our Business"

                Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                phosphormedia.com

                Comment


                  #9
                  Re: Automating Exports

                  Originally posted by Red Flare View Post
                  On a slightly different topic...

                  Would it be possible to create a script that would:
                  1. Download data from an ftp site
                  2. upload it into MIVA custom product fields on daily basis?

                  Thanks
                  We do this sort of thing with FileMaker Pro. It has built-in FTP (xml, too) and is fully scriptable. It links up with your MySQL database and can be scripted to download + upload data as well as files. Can be run on a local machine or on a remote server.
                  Steve Strickland
                  972-227-2065

                  Comment


                    #10
                    Re: Automating Exports

                    I have MySQL access... now to figure out how to pull the data in the proper format.

                    Comment


                      #11
                      Re: Automating Exports

                      So others know what I ended up doing...
                      I ended up having to cheat due to time constraints (as much as I would have liked to pull off a real answer).

                      The problem I faced was not knowing if it was a view or a stored proc to call, and if so which.

                      I ended up writing some C# code which will load execute the HTML with the post vars inside of that. It does use HTTPS, however we all know that the URL itself is not encrypted. This is a significant drawback.

                      I then had to initiate the process to do the export for the batch and then had to have an internal browser (Internet Explorer, invisible inside of the WinForm) which would execute the JavaScript code -- which, try as I might, I could not figure out how to fake that on the C# side so as to send another HTML with post vars. I would wait for 2 URL changes and assume that the file is placed somewhere that I could FTP it.

                      I then grab that file and do my conversions...

                      This is pretty much the net result should someone else need to follow in my shoes.

                      Comment


                        #12
                        Re: Automating Exports

                        Originally posted by wcw View Post
                        You can run the EZ Batch module with a cron job, thus automating the export of the current orders batch.
                        http://www.emporiumplus.com/go/wcw/PROD/1AA/1AA00211

                        Use it in conjunction with the Create Batch by Date module which can also run from cron and create a batch of the unbatched orders.
                        http://www.emporiumplus.com/go/wcw/PROD/1AA/1AA00056

                        See the install doc of each to see the details on how to run the cron.
                        http://www.emporiumplus.com/tk3/v3/doc.htm

                        I am interested in learning more about this. We want to eliminate the need to manually export orders daily.

                        Comment

                        Working...
                        X