Page 1 of 2 12 LastLast
Results 1 to 10 of 43

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Automatic upload of Easy Populate data?

    As one tends to get a bit of tunnel vision after 3 years of Zen Carting, I have no idea whether this sort of thing is even possible....

    Receive excel file
    convert excel file to fit EasyPopulate excel layout
    ftp EP file to website
    insert into ZC database

    ...all without human intervention.

    Is this doable?
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Automatic upload of Easy Populate data?

    I don't believe so. I believe that the requirement for automation would most likely be failed at every step and that the odds of finding a way to get past them all (without writing custom code) are inconsequential.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Automatic upload of Easy Populate data?

    You would probably need to install the "Magic Wand" module but it is not yet available to the Public -- since it hasn't been created.

  4. #4
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: Automatic upload of Easy Populate data?

    Nice one Rob!

    Thanks kuroi - you confirm my thoughts.
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  5. #5
    Join Date
    Mar 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Automatic upload of Easy Populate data?

    I am currently running an automated process with EZPopulate and OSCommerce. It is based on a Perl Script and a CRON job.

    It should be no different on Zen Cart as the majority of it is externalized.

    To summarize how this works:

    I have a Perl Script obtain the updated CSV file (NO EXCEL) from my supplier. It then takes the resulting CSV file and converts to TAB's and then performs an HTTP call to the EZPopulate php file emulating the import process.

    I have been running it for about 3 years now with no issues.

    I will be more than happy to share it if someone is interested.

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Automatic upload of Easy Populate data?

    Nice solution. I recant my earlier comments. in principle I see no reason why this wouldn't work equally well for Zen Cart. I'd certainly be interested in seeing the script. Have you considered bundling it up as a contribution.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  7. #7
    Join Date
    Nov 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: Automatic upload of Easy Populate data?

    Quote Originally Posted by Ryk View Post
    As one tends to get a bit of tunnel vision after 3 years of Zen Carting, I have no idea whether this sort of thing is even possible....

    Receive excel file
    convert excel file to fit EasyPopulate excel layout
    ftp EP file to website
    insert into ZC database

    ...all without human intervention.

    Is this doable?
    I have a partial solution which I've not tested.

    You can save an excel spreadsheet in CSV format and use, the Easy Populate CSV add on, available here:
    http://www.zen-cart.com/index.php?ma...oducts_id=1240

    Ftp the file to /tempEP (the default import directory).
    Let's say the file is called import_me.csv

    You might be able to automate the above with a batch script.

    Then create a script to be called by cron every five minutes say.
    The script must first authenticate itself.
    see:
    http://www.zen-cart.com/forum/showthread.php?t=114279

    The script then sets the filename variable to import and runs the easypopulate code.

    To authenticate we need to override init_admin_auth.php.
    So copy
    admin/includes/init_includes/init_admin_auth.php
    to
    admin/includes/init_includes/overrides/init_admin_auth.php
    and add
    """
    // to allow cron jobs set CRON_ADMIN_USER_ID
    if ($_SERVER['REMOTE_ADDR'] == $_SERVER['SERVER_ADDR']) {
    if (!isset($_SESSION['admin_id']) && defined('CRON_ADMIN_USER_ID') && CRON_ADMIN_USER_ID != '') {
    $_SESSION['admin_id'] = CRON_ADMIN_USER_ID;
    }
    }
    """
    to just after
    """

    if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
    }
    """

    Then we write the script for cron.
    Create a file /admin/cron1.php:
    <?php
    define('CRON_ADMIN_USER_ID', '999');
    require ('includes/application_top.php');
    $_POST['localfile'] = "import_me.csv";
    require ('easypopulate.php');
    ?>

    Then set up the cron job to call the script eg:
    /usr/bin/lynx -accept_all_cookies -dump http://localhost/PathTo/admin/cron1.php

    Please note I haven't thoroughly tested this.

  8. #8
    Join Date
    Apr 2008
    Location
    Athlone, Ireland
    Posts
    176
    Plugin Contributions
    5

    Default Re: Automatic upload of Easy Populate data?

    Hi donothing,

    just wondering how you got on with your automation.

    I am very interested in haveing something like this work on one of my sites. I have gone over the other suggestions but yours seems to be the best solution to my need so far.

    If cant get it working, I am willing to chip in with others to pay someone to create something. lol Lazy way out! hehe

    Happy New Year!

  9. #9
    Join Date
    Aug 2007
    Posts
    1
    Plugin Contributions
    0

    Default Re: Automatic upload of Easy Populate data?

    I am looking for a solution to this, it seems many of us are willing to pay for this to work...anybody???

  10. #10
    Join Date
    May 2010
    Location
    Graham, NC
    Posts
    2
    Plugin Contributions
    0

    Default Re: Automatic upload of Easy Populate data?

    Thank you to DoNothing! I've been looking for a way to import products into ZenCart through a CRON job without having to write something myself!

    Using DoNothing's instructions, and the EasyPopulate module (free version), I just imported 12,000 products into my ZenCart from the command line without issue.

    Now I can move forward with automating the command through cron.

    Thanks again!
    Last edited by fireclouddesign; 29 May 2010 at 05:13 PM. Reason: Gave credit to wrong user.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to upload Quantity Discount data with Easy Populate?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 6 Aug 2010, 08:14 AM
  2. Easy Populate wont upload
    By Thegrafxfactory in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 31 Oct 2008, 11:03 PM

Posting Permissions

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