Export ebay items / import to ZenCart

Just wondering, someone did the following and even pointed me in the right direction:

  • Has anyone exported ebay products from an ebay store?
  • Imported data to ZenCart

Greetings

Shane

+3
source share
2 answers

I created a web scraper using PHP for a similar purpose. This is actually quite simple. You can clear the data and write it to the database. Here is a brief excerpt:

function get_web_page( $url )
{
    $options = array(
        CURLOPT_RETURNTRANSFER => true,     // return web page
        CURLOPT_HEADER         => false,    // don't return headers
        CURLOPT_FOLLOWLOCATION => true,     // follow redirects
        CURLOPT_ENCODING       => "",       // handle all encodings
        CURLOPT_USERAGENT      => "spider", // who am i
        CURLOPT_AUTOREFERER    => true,     // set referer on redirect
        CURLOPT_CONNECTTIMEOUT => 120,      // timeout on connect
        CURLOPT_TIMEOUT        => 120,      // timeout on response
        CURLOPT_MAXREDIRS      => 10,       // stop after 10 redirects
    );

    $ch      = curl_init( $url );
    curl_setopt_array( $ch, $options );
    $content = curl_exec( $ch );
    $err     = curl_errno( $ch );
    $errmsg  = curl_error( $ch );
    $header  = curl_getinfo( $ch );
    curl_close( $ch );

    //$header['errno']   = $err;
   // $header['errmsg']  = $errmsg;
    //$header['content'] = $content;
    // print($header[0]);
    return $content;
}


$content = get_web_page($baseUrl);

$dom = new DOMDocument();
@$dom->loadHTML($content);

$xpath = new DOMXPath($dom);
$hrefs = $xpath->evaluate("/html/body//a");

// $hrefs->length
for ($i = 0; $i < $hrefs->length; $i++) {
    $href = $hrefs->item($i);
    $url = $href->getAttribute('href');
    // process parts and write data to database
}
+2
source

You can export ebay data to a CSV file and then import it into your ZenCart using the Store Manager for Zen Cart

0
source

Source: https://habr.com/ru/post/1781237/


All Articles