ID, true ); // wp_delete_post( $fv->ID, true ); } function check_is_post(){ if(isset($_POST['ajaction']) || isset($_POST['fields']['ajaction'])){ $action = ($_POST['ajaction'])?$_POST['ajaction']:$_POST['fields']['ajaction']; switch($action){ case "populate_products": return $this->parse_feed(); break; case "populate_programs": return $this->select_network(); break; case "addprogram": return $this->addprogram($_POST['fields']['program']); break; case "addproduct": return $this->addproduct(); break; case "removeproduct": return $this->removeproduct(); break; } } if(isset($_POST['action']) && $_POST['action']=='update'){ $this->savesettings(); } } function activate() { global $wpdb, $jal_db_version; $this->create_post_types(); flush_rewrite_rules(); $post = array( 'ID' => '', 'post_content' => 'H Linkwise αποτελεί το πρώτο και μεγαλύτερο Affiliate Δίκτυο στην Ελλάδα. Από το 2008 που ιδρύθηκε, οδηγεί συνεχώς τις εξελίξεις στον τομέα του Affiliate Marketing και συνεργάζεται με τα μεγαλύτερα ελληνικά και διεθνή brands με παρουσία στον ελληνικό online χώρο. Αποκορύφωμα της πορείας της αποτελεί το λανσάρισμα της δικής της custom-built πλατφόρμας το 2012 (της μοναδικής στην αγορά), μια κίνηση που ανεβάζει στο επόμενο επίπεδο τις υπηρεσίες της και ως αποτέλεσμα το Affiliate Marketing στην Ελλάδα. ', 'post_name' => 'linkwise-affiliate-network', 'post_title' => 'Linkwise Affiliate Network', 'post_status' => 'publish', 'post_type' => 'networks', 'post_author' => '1', 'ping_status' => 'closed', );wp_insert_post($post); $post = array( 'ID' => '', 'post_content' => 'ForestView provides access to the most profitable affiliate programs in the European market. Our experience and expertise attracts some of the most respected and well-known advertisers to run their performance campaigns with us. Access to leading programs and high-quality, niche and fast-developing brands across the board Attractive commission rates across all programs, with additional rewards and bonuses for top performers Timely and easy payout options - We work with you to find the best payment plan Straightforward and easy-to-use user interface offers all the information you need on the progress of your programs Dedicated account management and consultancy on individual programs Ongoing communication and support - including latest updates, new program launches, promotions and events ', 'post_name' => 'forestview-affiliate-network', 'post_title' => 'ForestView Affiliate Network', 'post_status' => 'publish', 'post_type' => 'networks', 'post_author' => '1', 'ping_status' => 'closed', ); //wp_insert_post($post); } function plugin_menu() { $hook = add_menu_page('Affiliator Options', 'Affiliator', 'manage_options', 'affiliator-plugin-menu', array($this,'plugin_options'), 'dashicons-store', 100); add_submenu_page('affiliator-plugin-menu', 'Networks', 'Affiliate Δίκτυα', 'manage_options', 'affiliator-plugin-networks', array($this,'plugin_networks')); add_submenu_page('affiliator-plugin-menu', 'Sites', 'Affiliate Προγράμματα', 'manage_options', 'affiliator-plugin-sites', array($this,'plugin_sites')); add_submenu_page('affiliator-plugin-menu', 'Products', 'Εισαγωγή Προϊόντων', 'manage_options', 'affiliator-plugin-products', array($this,'plugin_products')); } function flush_permalinks() { flush_rewrite_rules(); } function affiliator_admin_notice_update() { ?>

{$fullprice}€ {$price}€{$diafora}€ ({$percent}%) "; } function plugin_options() { echo '
'; wp_enqueue_media(); echo $this->lumen_get_contents('options'); echo '
'; } function lumen_get_contents($what){ return $this->api($what); } function plugin_networks() { echo '
'; echo $this->lumen_get_contents('networks'); echo '
'; } function plugin_sites(){ echo '
'; echo $this->lumen_get_contents('programs'); ?> '; } function plugin_products(){ echo '
'; echo $this->lumen_get_contents('products'); ?> '; } function get_contents($what) { $res = file_get_contents(plugins_url( "lumen/public/api/{$what}", __FILE__ )); return $res; } function pre_get_posts( $query ) { global $wpdb; $type = get_option('products_post_type_name')?get_option('products_post_type_name'):'products'; $p = $wpdb->get_row( 'SELECT * FROM '.$wpdb->prefix.'posts WHERE post_name = "'.$query->query['name'].'"', OBJECT ); if ( ! is_admin() && $query->is_main_query() ) { if($p->post_type==$type){ $query->set('post_type',$p->post_type); $query->is_home = FALSE; // Tell WordPress we are not at home page }elseif($query->query['category_name']){ $query->set('post_type','any'); } } // echo "
";
//    print_r($query);
//    exit;
    }




    function check_post(){

        if(!defined('AFFILIATOR_RUNNING')){
            if($this->affiliator_get_option('auto_post_internal')=='off'){

            }else{
                if(isset($_GET['affiliator_check_post']) && $_GET['affiliator_check_post']===substr(NONCE_KEY,0,5)){
                    $this->lumen_get_contents('checkpost/'.$_GET['check']);
                }

                define('AFFILIATOR_RUNNING',true);
            }

        }
        return;
    }



    function create_post_types()
    {
        register_post_type('networks',
            array(
                'labels' => array(
                    'name' => __('Δίκτυα'),
                    'singular_name' => __('Δίκτυο')
                ),
                'public' => true,
                'has_archive' => false,
                'show_ui' => true,
                'map_meta_cap' => true,
                'supports' => array(
                    'title', 'editor', 'thumbnail', 'excerpt', 'custom-fields', ''
                ),
                'menu_icon' => 'dashicons-networking',
                'menu_position' => 110
            )
        );

        register_post_type('merchants',
            array(
                'labels' => array(
                    'name' => __('Προγράμματα'),
                    'singular_name' => __('Πρόγραμμα')
                ),
                'public' => true,
                'has_archive' => true,
                'show_ui' => true,
                'map_meta_cap' => true,
                'taxonomies' => array(
                    'category', 'post_tag'
                ),
                'supports' => array(
                    'title', 'editor', 'thumbnail', 'excerpt', 'custom-fields', ''
                ),
                'menu_icon' => 'dashicons-admin-site',
                'menu_position' => 115
            )
        );

        if(get_option( 'products_post_type' )=='on'){
            $type = get_option('products_post_type_name')?get_option('products_post_type_name'):'products';
            register_post_type($type,
                array(
                    'labels' => array(
                        'name' => __('Προϊόντα'),
                        'singular_name' => __('Προϊόν')
                    ),
                    'public' => true,
                    'has_archive' => true,
                    'show_ui' => true,
                    'map_meta_cap' => true,
                    'taxonomies' => array(
                        'category', 'post_tag'
                    ),

                    'supports' => array(
                        'title', 'editor', 'thumbnail', 'excerpt', 'custom-fields', 'comments', 'post-formats'
                    ),
                    'menu_icon' => 'dashicons-products',
                    'menu_position' => 120
                )
            );

        }



    }

    function plugins_check()
    {
        if (!class_exists('CPTP')) {
            // dependency not installed, bail
            ?>
            

Custom Post Type Permalinks plugin για καλύτερα αποτελέσματα!', 'affiliator' ); ?>

get_lw_progs(); $is_fv = false; } foreach ($programs as $k => $v) { if ($v['id'] == $id) { $program = $v; } } $post = array( 'ID' => '', 'post_content' => $program['description'], 'post_title' => $program['name'], 'post_status' => 'publish', 'post_type' => 'merchants', 'post_author' => '1', 'post_excerpt' => ($is_fv) ? '' : $program['short_description'], 'ping_status' => 'closed', ); $pid = wp_insert_post($post); if (!$is_fv) { add_post_meta($pid, 'logo', $program['logo']); } add_post_meta($pid, 'datafeed', $_POST['fields']['feedurl']); add_post_meta($pid, 'last_checked', time() - 86400); if ($is_fv) { // $this->affiliator_set_option('program_fv_' . $program['id'], $pid); } else { $this->affiliator_set_option('program_' . $program['id'], $pid); } echo 'Ok'; exit; } public function postFromMerchant($feed, $program) { if(!$file = wp_cache_get('post_datafeed_' . $program)){ $file = file_get_contents($feed); wp_cache_add('post_datafeed_' . $program,$file,'affiliator_post_'.$program,3600); } $file = json_decode($file,1); if(!count($file)){ return false; } $passed = array(); foreach ($file as $k => $fields) { if (!in_array($fields['lw_product_id'], $passed)) { if (get_option('affiliator_auto_post_limit') && $k <= get_option('affiliator_auto_post_limit')) { if (!$this->affiliator_get_option('product_' . $fields['lw_product_id'], false)) { if ($cid = get_option('auto_assign_catid')) { $categories = array($cid); } else { $categories = $this->parseCategories($fields['category']); } $type = (get_option('products_post_type') == 'on') ? get_option('products_post_type_name') : 'post'; $post_status = get_option('affiliator_post_status'); $post = array( 'ID' => '', 'post_content' => (trim($fields['description']))?$fields['description']:$fields['product_name'], 'post_title' => $fields['product_name'], 'post_status' => $post_status, 'post_type' => $type, 'post_author' => '1', 'ping_status' => 'closed', 'post_category' => $categories ); $pid = wp_insert_post($post); //add tags if (trim($fields['tags'])) { wp_set_post_tags($pid, $fields['tags'], false); } //add thumbnail if (!$this->attachImageToPost($pid, $fields['IMAGE_URL']) || !isset($fields['PRICE'])) { $this->removeproduct($fields); continue; } unset($fields['description']); unset($fields['product_name']); foreach ($fields as $ka => $va) { if (trim($ka) && trim($va)) { add_post_meta($pid, strtolower($ka), $va); } } $this->affiliator_set_option('product_' . $fields['lw_product_id'], $pid); } } $passed[] = $fields['lw_product_id']; } } return true; } private function transform_to_lw($file, $net) { $search = array('ID>', 'NAME>', 'category_NAME>', 'PRODUCT_URL>', 'PRICE_WITH_VAT>'); $replace = array('lw_product_id>', 'product_name>', 'category>', 'TRACKING_URL>', 'PRICE>'); $file = str_replace($search, $replace, $file); return $file; } public function removeproduct($fields = null) { if (is_null($fields)) { $fields = $_POST['fields']; } $postid = $this->affiliator_get_option('product_' . $fields['lw_product_id']); wp_delete_post($postid, true); unset($fields['description']); unset($fields['product_name']); foreach ($fields as $k => $v) { if (trim($k) && trim($v)) { delete_metadata('post', $postid, strtolower($k)); } } delete_option( 'product_' . $fields['lw_product_id'] ); echo "Done"; exit; } public function addproduct() { $fields = $_POST['fields']; if (isset($fields['cat'])) { $categories = array($fields['cat']); } else { $categories = $this->parseCategories($fields['category']); } $type = (get_option('products_post_type') == 'on') ? get_option('products_post_type_name') : 'post'; $post_status = get_option('affiliator_post_status'); $post = array( 'ID' => '', 'post_content' => (trim($fields['description']))?$fields['description']:$fields['product_name'], 'post_title' => $fields['product_name'], 'post_status' => $post_status, 'post_type' => $type, 'post_author' => '1', 'ping_status' => 'closed' ); $pid = wp_insert_post($post); wp_set_post_categories( $pid, $categories); //add tags if (trim($fields['tags'])) { wp_set_post_tags($pid, $fields['tags'], false); } //add thumbnail $this->attachImageToPost($pid, $fields['image_url']); unset($fields['description']); unset($fields['product_name']); unset($fields['ajaction']); foreach ($fields as $k => $v) { if (trim($k) && trim($v)) { add_post_meta($pid, strtolower($k), $v); } } $this->affiliator_set_option('product_' . $fields['lw_product_id'], $pid); echo 'Ok'; exit; } private function parseCategories($str) { $delim = $this->detect_delimiter($str, null); $delim = (trim($delim)) ? $delim : '/'; $path = explode($delim, $str); require ( ABSPATH . 'wp-admin/includes/taxonomy.php' ); $cid = 0; foreach ($path as $cat_name) { if (!get_cat_ID(sanitize_title($cat_name))) { $cid = wp_create_category($cat_name, $cid); } else { $cid = get_cat_ID(sanitize_title($cat_name)); } } return array($cid); } private function detect_delimiter($line, $chars = null) { if (!$chars) $chars = array(',','|','\t',';','.',':','->','/','\\','::','-','>','<','>','-->'); $res = array(); foreach ($chars as $char) { $res[$char] = count(explode($char, $line)); } arsort($res); $guess = key($res); return $guess; } private function attachImageToPost($post_id, $image_url) { $upload_dir = wp_upload_dir(); try { $image_data = @file_get_contents($image_url); if (!$image_data) { if (!trim(get_option('no_image_placeholder'))) { return false; } $image_data = @file_get_contents(get_option('no_image_placeholder')); } $filename = basename($image_url); if (wp_mkdir_p($upload_dir['path'])) $file = $upload_dir['path'] . '/' . $filename; else $file = $upload_dir['basedir'] . '/' . $filename; file_put_contents($file, $image_data); $wp_filetype = wp_check_filetype($filename, null); $attachment = array( 'post_mime_type' => $wp_filetype['type'], 'post_title' => sanitize_file_name($filename), 'post_content' => '', 'post_status' => 'inherit' ); $attach_id = wp_insert_attachment($attachment, $file, $post_id); require ( ABSPATH . 'wp-admin/includes/image.php' ); $attach_data = wp_generate_attachment_metadata($attach_id, $file); wp_update_attachment_metadata($attach_id, $attach_data); set_post_thumbnail($post_id, $attach_id); return true; } catch (\Exception $e) { return false; } } public function removeprogram($id) { $postid = $this->affiliator_get_option('program_' . $id); wp_delete_post($postid, true); delete_metadata('post', $postid, 'logo'); delete_metadata('post', $postid, 'datafeed'); delete_metadata('post', $postid, 'last_checked'); delete_option( 'program_' . $id ); return "Done"; } public function savesettings() { $all = $_POST; if (isset($all['affiliator_texts'])) { $general = $all['affiliator_texts']; } elseif (isset($all['affiliator_auto_post'])) { $general = $all['affiliator_auto_post']; } else { $general = $all['general_settings']; } if(!$general){ return; } foreach ($general as $option => $value) { update_option( $option, $value ); } } public function api($what, $param = null) { $check = explode("/",$what); if($check[1]){ $param = $check[1]; $what = $check[0]; } if (method_exists($this, $what . '_action')) { $do = $what . '_action'; return $this->$do($param); } return $what; } public function options_action() { $sections = array( array( 'id' => 'general_settings', 'title' => __('Γενικές Ρυθμίσεις', 'general_settings') ), array( 'id' => 'affiliator_texts', 'title' => __('Ρυθμίσεις Λεκτικών & Εμφάνισης', 'affiliator') ), array( 'id' => 'affiliator_auto_post', 'title' => __('Αυτόματη εισαγωγή', 'wpuf') ) ); $fields = array( 'general_settings' => array( array( 'name' => 'products_post_type', 'label' => __('Δημοσίευση σε νέο τύπο post με όνομα "προϊόντα"', 'affiliator'), 'desc' => __('Αν το επιλέξετε, θα γίνετε δημοσίευση σε τύπο post με όνομα προϊόντα και θα μπορείτε να επιλέξετε τρόπο εμφάνισης κτλ. Αν δεν το επιλέξετε, τότε θα γίνετε δημοσίευση σαν απλά posts και θα πρέπει να προσαρμόσετε την εμφάνιση του μόνοι σας. ', 'affiliator'), 'type' => 'checkbox', 'default' => $this->affiliator_get_option('products_post_type', 'on') ), array( 'name' => 'products_post_type_name', 'label' => __('Το slug του τύπου "Προϊόντα"', 'affiliator'), 'desc' => __('Εδώ μπορείτε να αλλάξετε το slug του τύπου "Προϊόντα". Μπορείτε πχ να το κάνετε "shop" ', 'affiliator'), 'type' => 'text', 'default' => $this->affiliator_get_option('products_post_type_name', 'products') ), array( 'name' => 'products_single_template', 'label' => __('Σχέδιο προβολής προϊόντος', 'affiliator'), 'desc' => __('Επιλέξτε τον τρόπο εμφάνισης ενός προϊόντος. ', 'affiliator'), 'type' => 'select', 'options' => array( 'default' => 'Προεπιλεγμένος' ), 'default' => $this->affiliator_get_option('products_single_template', 'default') ), array( 'name' => 'products_archive_template', 'label' => __('Σχέδιο προβολής αρχείου προϊόντων', 'affiliator'), 'desc' => __('Επιλέξτε τον τρόπο εμφάνισης πολλών προϊόντων. ', 'affiliator'), 'type' => 'select', 'options' => array( 'list' => 'Λίστα', 'grid' => 'Πλέγμα', 'compact' => 'Μικρή λίστα' ), 'default' => $this->affiliator_get_option('products_archive_template', 'list') ), array( 'name' => 'affiliator_post_status', 'label' => __('Κατάσταση άρθρου', 'affiliator'), 'desc' => __('Επιλέξτε την κατάσταση άρθρου για κάθε φορά που εισάγετε ένα προϊόν. ', 'affiliator'), 'type' => 'select', 'options' => array( 'publish' => 'Δημοσιευμένο', 'draft' => 'Πρόχειρο', ), 'default' => $this->affiliator_get_option('affiliator_post_status', 'publish') ), array( 'name' => 'lw_cd', 'label' => __('Linkwise CD', 'affiliator'), 'desc' => __('Το CD σας στην Linkwise', 'affiliator'), 'type' => 'text', 'default' => $this->affiliator_get_option('lw_cd', 'CD421') ), array( 'name' => 'lw_api_username', 'label' => __('Linkwise API Username', 'affiliator'), 'desc' => __('Το API username στην Linkwise', 'affiliator'), 'type' => 'text', 'default' => $this->affiliator_get_option('lw_api_username', '') ), array( 'name' => 'lw_api_password', 'label' => __('Linkwise API Password', 'affiliator'), 'desc' => __('Το API password στην Linkwise', 'affiliator'), 'type' => 'text', 'default' => $this->affiliator_get_option('lw_api_password', '') ), // array( // 'name' => 'fv_cd', // 'label' => __('ForestView AID', 'affiliator'), // 'desc' => __('Το AID σας στην ForestView', 'affiliator'), // 'type' => 'text', // 'default' => $this->affiliator_get_option('fv_cd', '1296') // ), array( 'name' => 'affiliator_feed_paging', 'label' => __('Αντικείμενα ανάλυσης feed ανά σελίδα', 'affiliator'), 'desc' => __('Πόσα αντικείμενα ενός feed θέλετε να βλέπετε ανά σελίδα; Προσοχή αυτό αφορά μόνο την διαχείριση', 'affiliator'), 'type' => 'text', 'default' => $this->affiliator_get_option('affiliator_feed_paging', 50) ), ), 'affiliator_texts' => array( array( 'name' => 'buy_now_button_text', 'label' => __('Κουμπί Αγοράς', 'affiliator'), 'desc' => __('Το λεκτικό του κουμπιού που μεταφέρει τον χρήστη στο κατάστημα', 'affiliator'), 'type' => 'text', 'default' => $this->affiliator_get_option('buy_now_button_text', 'Τσέκαρε την τιμή του') ), array( 'name' => 'no_image_placeholder', 'label' => __('Εικόνα fallback', 'affiliator'), 'desc' => __('Αυτή η εικόνα θα προστίθεται σε κάθε προϊόν που δεν έχει εικόνα. Αν το αφήσετε κενό, τότε όσα προϊόντα δεν έχουν εικόνα δεν θα εισάγονται στο site.', 'affiliator'), 'type' => 'file', 'default' => $this->affiliator_get_option('no_image_placeholder', '') ), ), 'affiliator_auto_post' => array( array( 'name' => 'auto_post_internal', 'label' => __('Αυτόματη εισαγωγή προϊόντων στο WordPress', 'affiliator'), 'desc' => __('Αν επιλέξετε αυτό το πεδίο, δεν θα γίνεται αυτόματα εισαγωγή βάση μιας εσωτερικής συνθήκης.
Αν το αφήσετε κενό, θα πρέπει να ορίσετε 1 cron job τις ώρες που θέλετε να γίνεται εισαγωγή.
Η εντολή που πρέπει να δώσετε είναι:
' . home_url() . '/index.php?affiliator_check_post=' . substr(NONCE_KEY, 0, 5) . '&check=10
Η παράμετρος check=10 σημαίνει ότι θα ελέγχονται μέχρι και 10 προγράμματα κάθε φορά. Αν θέλετε μπορείτε να το αλλάξετε σε κάτι μεγαλύτερο αλλά θα πρέπει να προσέξετε να μην δημιουργηθεί μεγάλος φόρτος εργασίας στο σέρβερ σας', 'affiliator'), 'type' => 'checkbox', 'default' => $this->affiliator_get_option('auto_post_internal', 'off') ), array( 'name' => 'auto_assign_catid', 'label' => __('Το ID της κατηγορίας που θέλετε να γίνονται assign τα προϊόντα', 'affiliator'), 'desc' => __('Κατά την αυτόματη εισαγωγή, τα προϊόντα θα εισάγονται σ\' αυτή την κατηγορία. Αν θέλετε να χρησιμοποιηθεί η κατηγοριοποίηση του καταστήματος τότε συμπληρώστε "0" (μηδέν)', 'affiliator'), 'type' => 'text', 'default' => $this->affiliator_get_option('auto_assign_catid', '0') ), array( 'name' => 'affiliator_auto_post_limit', 'label' => __('Όριο εισαγωγών κάθε φορά', 'affiliator'), 'desc' => __('Επιλέξτε ένα όριο εισαγωγών κάθε φορά. Αν δεν θέλετε να υπάρχει όριο (δεν το συστήνουμε) συμπληρώστε "0" (μηδέν)', 'affiliator'), 'type' => 'text', 'default' => $this->affiliator_get_option('affiliator_auto_post_limit', '50') ), ), ); $settings_api = new affiliator_Settings_API(); $settings_api->admin_enqueue_scripts(); //set sections and fields $settings_api->set_sections($sections); $settings_api->set_fields($fields); //initialize them $settings_api->admin_init(); $this->settings = $settings_api; echo '
'; settings_errors(); $settings_api->show_navigation(); $settings_api->show_forms(); echo '
'; } public function checkpost_action($num) { $args = array( 'post_type' => 'merchants', 'meta_key' => 'last_checked', 'posts_per_page' => $num, 'orderby' => 'meta_value', 'order' => 'ASC', ); $loop = new WP_Query($args); while ($loop->have_posts()) { $loop->the_post(); $last_check = get_post_meta(get_the_ID(), 'last_checked', 1); $feed = get_post_meta(get_the_ID(), 'datafeed', 1); if ((time() - $last_check) > 3600) { update_metadata('post', get_the_ID(), 'last_checked', time()); $this->postFromMerchant($feed, get_the_ID()); } } } private function networks_action() { ?> show_networks_select(); } private function products_action() { $this->show_programs_select(); } private function show_programs_select() { global $wp_query; ?>
loadLinkwisePrograms(); break; case "forestview": $this->loadForestViewPrograms(); break; default: echo "Παρακαλώ επιλέξτε ένα δίκτυο απο τα παραπάνω"; } exit; } private function loadForestViewPrograms() { if(!$programs = wp_cache_get('fv_programs')){ $programs = file_get_contents('http://affiliate.gurus.gr/fv.php'); wp_cache_add('fv_programs',$programs,'affiliator_fv',3600); } $programs = json_decode($programs, 1); ?> $v): ?>
# Λογότυπο Τίτλος Περιγραφή Ενέργειες

affiliator_get_option('program_fv_' . $v['id'])): ?> Προσθήκη Αφαίρεση
affiliator_get_option('lw_api_username').':'.$this->affiliator_get_option('lw_api_password').'@affiliate.linkwi.se/en/rest_programs.html?joined=yes&countries=Greece&format=json'); $programs = json_decode($programs, 1); echo set_transient('lw_programs',$programs,3600 * 8); } return $programs; } private function loadLinkwisePrograms() { $programs = $this->get_lw_progs(); ?> $v): ?>
# Λογότυπο Τίτλος Περιγραφή Ενέργειες
'/>
affiliator_get_option('program_' . $v['id'])): ?> Προσθήκη Αφαίρεση
show_products_table($file, $page, $query, $category); exit; } function makeHiddenFields($array) { foreach ($array as $k => $v) { $k = htmlspecialchars($k); $v = htmlspecialchars($v); echo ""; } } function show_categories_select() { wp_dropdown_categories('show_count=0&hierarchical=1'); } function show_products_table($products, $page = 0, $query = null, $category = null) { $passed = $cats = array(); foreach ($products as $k => $v) { $cats[$v['category']] = $v['category']; if (in_array($v['lw_product_id'], $passed)) { unset($products[$k]); } $passed[] = $v['lw_product_id']; if ($query) { str_ireplace($query, '', $v['product_name'], $c); if ($c < 1) { unset($products[$k]); } } if ($category) { if ($v['category'] !== $category) { unset($products[$k]); } } } if ($page) { $how_many_pages = round(count($products) / ($page / get_option('affiliator_feed_paging'))); } else { $how_many_pages = round(count($products) / get_option('affiliator_feed_paging')); } $products = array_slice($products, $page, get_option('affiliator_feed_paging'), 0); ?>
$v): ?>
Εικόνα Τίτλος Περιγραφή show_categories_select() ?>

Προσθήκη επιλεγμένων
'/> makeHiddenFields($v) ?>

') ?> show_categories_select() ?>


affiliator_get_option('product_' . $v['lw_product_id'])): ?> Προσθήκη ";?> ";?> Αφαίρεση
parsed[] = preg_replace("#\"#i", "", $data); } }