"1.22", "instaled" => true, "type" => "ebay", "demo_mode" => false, "menu_title" => "Ebay", "dashboard_title" => "Ebay", "account_class" => "EBDN_EbayAccount", "loader_class" => "EBDN_EbayLoader", "sort_columns" => array("price", "user_price", "ship", "ship_to_locations", "curr"), "promo_title" => 'Ebay & Aliexpress WooCommerce Importer', "promo_text" => '
It’s a plugin that used to import products from Ebay and Aliexpress to your Wordpress WooCommerce site.
The plugin is helpful to create a store with specific Ebay & Aliexpress products and use affiliate URLs.
', "promo_link" => 'http://codecanyon.net/item/ebay-aliexpress-woocommerce-importer/13388576' ); } public function saveSetting($data) { update_option('ebdn_ebay_custom_id', wp_unslash($data['ebdn_ebay_custom_id'])); update_option('ebdn_ebay_geo_targeting', isset($data['ebdn_ebay_geo_targeting'])); update_option('ebdn_ebay_network_id', wp_unslash($data['ebdn_ebay_network_id'])); update_option('ebdn_ebay_tracking_id', wp_unslash($data['ebdn_ebay_tracking_id'])); update_option('ebdn_ebay_per_page', intval($data['ebdn_ebay_per_page']) <= 100 ? intval($data['ebdn_ebay_per_page']) : 100); update_option('ebdn_ebay_extends_cats', isset($data['ebdn_ebay_extends_cats']) ? 1 : 0); } public function modifyColumns($columns) { return $columns; } protected function configureFilters() { $this->addFilter("store", "store", 11, array("type" => "edit", "label" => "Store name", "placeholder" => "Please enter your store name")); $this->addFilter("category_id", "category_id", 21, array("type" => "select", "label" => "Category", "class" => "category_list", "data_source" => array($this, 'getCategories'))); /* $this->add_filter("shipment", array("shipment_min_price", "shipment_max_price"), 31, array("type" => "edit", "label" => "Shipment price", "shipment_min_price" => array("label" => "from $", "default" => "0.00"), "shipment_max_price" => array("label" => " to $", "default" => "0.00"))); */ $this->addFilter("free_shipping_only", "free_shipping_only", 31, array("type" => "checkbox", "label" => "Free Shipping Only", "default" => "yes")); $this->addFilter("feedback_score", array("min_feedback", "max_feedback"), 32, array("type" => "edit", "label" => "Feedback score", "min_feedback" => array("label" => "min", "default" => "0"), "max_feedback" => array("label" => " max", "default" => "0"))); $this->addFilter("available_to", "available_to", 33, array("type" => "select", "label" => "Shipment Options", "class" => "countries_list", "data_source" => array($this, 'get_countries'))); $this->addFilter("condition", "condition", 34, array("type" => "select", "label" => "Condition", "class" => "sitecode_list", "data_source" => array($this, 'getConditionList'))); $this->addFilter("sitecode", "sitecode", 35, array("type" => "select", "label" => "Site", "class" => "sitecode_list", "data_source" => array($this, 'getSites'))); $this->addFilter("listing_type", "listing_type", 36, array("type" => "select", "label" => "Listing Type", "class" => "sitecode_list", "multiple" => true, "data_source" => array($this, 'get_listing_type'))); } public function getCategories() { $result = array(); $result[] = array("id" => "", "name" => " - "); $xml = simplexml_load_file(dirname(__FILE__) . '/data/ebay_categories.xml'); foreach ($xml->CategoryArray->Category as $c) { if ((strval($c->CategoryLevel) == "1") || (get_option('ebdn_ebay_extends_cats', false) && strval($c->CategoryLevel) == "2") /* || ((String)$c->CategoryLevel) == "3" || ((String)$c->CategoryLevel) == "4" */) $result[] = array('id' => (String) $c->CategoryID, 'name' => (String) $c->CategoryName, 'level' => (String) $c->CategoryLevel); } return $result; } public function get_countries() { $result = array(); $result[] = array("id" => "", "name" => " - "); $handle = @fopen(EBDN_ROOT_PATH . "/data/countries.csv", "r"); if ($handle) { while (($buffer = fgets($handle, 4096)) !== false) { $cntr = explode(",", $buffer); $result[] = array("id" => $cntr[1], "name" => $cntr[0]); } if (!feof($handle)) { echo "Error: unexpected fgets() fail