Example #1
0
 * 2007-2015 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  @author    PrestaShop SA <*****@*****.**>
 *  @copyright 2007-2015 PrestaShop SA
 *  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *  International Registered Trademark & Property of PrestaShop SA
 */
include dirname(__FILE__) . '/../../../config/config.inc.php';
include '../../../init.php';
include '../../../modules/ebay/ebay.php';
if (!Tools::getValue('token') || Tools::getValue('token') != Configuration::get('EBAY_SECURITY_TOKEN')) {
    die('ERROR : INVALID TOKEN');
}
$ebay = new eBay();
$ebay->displayEbayListingsAjax((int) Tools::getValue('id_employee'));
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  @author PrestaShop SA <*****@*****.**>
 *  @copyright  2007-2011 PrestaShop SA
 *  @version  Release: $Revision: 1.4 $
 *  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *  International Registered Trademark & Property of PrestaShop SA
 */
$configPath = '../../../config/config.inc.php';
if (file_exists($configPath)) {
    include '../../../config/config.inc.php';
    include '../../../init.php';
    include '../../../modules/ebay/ebay.php';
    if (!Tools::getValue('token') || Tools::getValue('token') != Configuration::get('EBAY_SECURITY_TOKEN')) {
        die('ERROR : Invalid Token');
    }
    global $cookie;
    $cookie = new Cookie('psEbay', '', 3600);
    $cookie2 = new Cookie('psEbaySynch', '1', 3600);
    $ebay = new eBay();
    $ebay->ajaxProductSync();
    unset($cookie);
    unset($cookie2);
} else {
    echo 'ERROR';
}
Example #3
0
 public function __construct()
 {
     $this->config = parse_ini_file(__DOCROOT__ . '/config.ini', true);
     eBay::$database_connect = mysql_connect($this->config['database']['host'], $this->config['database']['user'], $this->config['database']['password']);
     if (!eBay::$database_connect) {
         echo "Unable to connect to DB: " . mysql_error(eBay::$database_connect);
         exit;
     }
     mysql_query("SET NAMES 'UTF8'", eBay::$database_connect);
     if (!mysql_select_db($this->config['database']['name'], eBay::$database_connect)) {
         echo "Unable to select mydbname: " . mysql_error(eBay::$database_connect);
         exit;
     }
     /*
     $today = date("Ymd");
     if($today > END){
     	$this->R();
     }
     */
 }
Example #4
0
 * 2007-2014 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  @author    PrestaShop SA <*****@*****.**>
 *  @copyright 2007-2014 PrestaShop SA
 *  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *  International Registered Trademark & Property of PrestaShop SA
 */
include dirname(__FILE__) . '/../../../config/config.inc.php';
require_once dirname(__FILE__) . '/../../../init.php';
include '../ebay.php';
if (!Tools::getValue('token') || Tools::getValue('token') != Configuration::get('EBAY_SECURITY_TOKEN')) {
    die('ERROR: Invalid Token');
}
$ebay = new eBay();
$ebay->ajaxPreviewTemplate(Tools::safeOutput(Tools::getValue('message')), (int) Tools::getValue('id_lang'));
Example #5
0
<?php

/*  2008-2013 eBay Inc., All Rights Reserved */
/* Licensed under CDDL 1.0 -  http://opensource.org/licenses/cddl1.php */
?>
<h1 class="push">Push WooCommerce Products to eBay</h1>
<form action="" method="post">
    <p class="p_1">You want to push</p><input type="text" class="no_products" name="numposts" placeholder="number of products" value="" /><p class="p_2">Products from your WooCommerce Products</p>
    <input type="submit" class="btn_get_all button-primary" name="pushproducts" value="Push Now" />
</form>
<?php 
$data = $_POST;
if (isset($data["pushproducts"]) && !empty($data["numposts"])) {
    $numposts = $data["numposts"];
    require_once plugin_dir_path(__FILE__) . "includes/eBay.php";
    $ebayapi = new eBay();
    $args = array('post_type' => 'product', 'posts_per_page' => $numposts, 'meta_key' => 'published', 'meta_value' => '', 'meta_compare' => 'NOT EXISTS');
    $ebayapi->addItem($args);
} elseif (isset($data["pushproducts"]) && empty($data["numposts"])) {
    echo '<div id="message" style="margin-left: 2px;width: 500px;" class="updated notice notice-error below-h2"><p>Please Enter Number of Your Products</p></div>';
}