Plugin Directory

Changeset 1920378


Ignore:
Timestamp:
08/06/2018 11:59:53 AM (8 years ago)
Author:
alexwing
Message:

Empty field language import all languages in products and categories

Location:
woo-oscommerce-sync/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • woo-oscommerce-sync/trunk/languages/woocommerce-osc-sync-en_US.po

    r1918801 r1920378  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2018-08-02 12:40+0000\n"
    6 "PO-Revision-Date: 2018-08-02 12:45+0000\n"
     6"PO-Revision-Date: 2018-08-06 11:57+0000\n"
    77"Last-Translator: Alejandro Aranda (alejandro@aaranda.es)\n"
    88"Language-Team: English (United States)\n"
     
    123123
    124124msgid "Id from osCommerce lang table"
    125 msgstr "Id from osCommerce lang table"
     125msgstr "Id from osCommerce lang table (Empty import all languages)"
    126126
    127127msgid "Last product imported"
  • woo-oscommerce-sync/trunk/languages/woocommerce-osc-sync-es_ES.po

    r1918801 r1920378  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2018-08-02 12:40+0000\n"
    6 "PO-Revision-Date: 2018-08-02 12:42+0000\n"
     6"PO-Revision-Date: 2018-08-06 11:56+0000\n"
    77"Last-Translator: Alejandro Aranda (alejandro@aaranda.es)\n"
    88"Language-Team: Español\n"
     
    123123
    124124msgid "Id from osCommerce lang table"
    125 msgstr "Identificador del idioma de osCommerce"
     125msgstr ""
     126"Identificador del idioma de osCommerce (Vacio importa todos los idiomas)"
    126127
    127128msgid "Last product imported"
  • woo-oscommerce-sync/trunk/readme.txt

    r1918801 r1920378  
    7070
    7171== Changelog ==
     72= 2.0.9 =
     73* Empty field language import all languages in products and categories
     74
     75
    7276= 2.0.8 =
    7377* Add internationalization
  • woo-oscommerce-sync/trunk/woocommerce-osc-sync.php

    r1918801 r1920378  
    77  Description: Import products, categories, customers and orders from osCommerce to Woocommerce
    88  Author: Alejandro Aranda
    9   Version: 2.0.8
     9  Version: 2.0.9
    1010  Author URI: http://www.aaranda.es
    1111  Original Author: David Barnes
     
    2727if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
    2828
    29    
     29
    3030    function otw_submenu_page() {
    3131        add_submenu_page('woocommerce', 'osCommerce Sync', 'osCommerce Sync', 'manage_options', 'woocommerce-osc-sync', 'otw_submenu_page_callback');
     
    9494            otw_log("importCategories", "Categories total: " . count($categories));
    9595            foreach ($categories as $category) {
    96                 if (!is_wp_error($category)) {
     96                if (!is_wp_error($category) && $category['categories_name'] != '') {
    9797                    $term = term_exists($category['categories_name'], 'product_cat', (int) $parent_term_id); // array is returned if taxonomy is given
    9898                    if ((int) $term['term_id'] == 0) {
     
    109109
    110110                        $attach_id = 0;
     111
    111112                        if ($category['categories_image'] != '') {
    112113                            if (esc_url($_POST['store_url'])) {
     
    169170                    $lang = ' AND language_id=' . (int) sanitize_text_field($_POST['lang']);
    170171                } else {
    171                     $lang = ' AND language_id=3';
     172                    //  $lang = ' AND language_id=3';
     173                    $lang = ' ';
    172174                }
    173175            } else {
    174                 $lang = ' AND language_id=3';
     176                //  $lang = ' AND language_id=3';
     177                $lang = ' ';
    175178            }
    176179
     
    350353                        otw_log("importProduct", "Products origin total: " . count($products));
    351354                        foreach ($products as $product) {
    352 
    353                             $existing_product = get_posts(array('post_type' => 'product', 'posts_per_page' => 1, 'post_status' => 'any',
    354                                 'meta_query' => array(
    355                                     array(
    356                                         'key' => 'osc_id',
    357                                         'value' => $product['products_id'],
    358                                     )
    359                             )));
    360                             //otw_log("importProduct", "exist".json_encode($existing_product));
    361                             if (empty($existing_product) && !empty($product['products_name'])) {
    362                                 otw_log("importProduct", json_encode($product));
    363                                 $product_id = wp_insert_post(array(
    364                                     'post_title' => $product['products_name'],
    365                                     'post_content' => $product['products_description'],
    366                                     'post_status' => 'publish',
    367                                     'post_type' => 'product',
    368                                     'post_author' => 1
    369                                 ));
    370                                 update_post_meta($product_id, 'osc_id', $product['products_id']);
    371                                 wp_set_object_terms($product_id, 'simple', 'product_type');
    372                                 wp_set_object_terms($product_id, (int) $categories[$product['categories_id']], 'product_cat');
    373                                 update_post_meta($product_id, '_sku', $product['products_model']);
    374                                 update_post_meta($product_id, '_regular_price', $product['products_price']);
    375                                 update_post_meta($product_id, '_price', $product['products_price']);
    376                                 update_post_meta($product_id, '_visibility', 'visible');
    377                                 update_post_meta($product_id, '_stock_status', ($product['products_status'] ? 'instock' : 'outofstock'));
    378                                 update_post_meta($product_id, '_manage_stock', '1');
    379                                 update_post_meta($product_id, '_stock', $product['products_quantity']);
    380                                 update_post_meta($product_id, '_weight', $product['products_weight']);
    381                                 $import_prod_counter++;
    382 
    383                                 if ($special = $oscdb->get_row("SELECT specials_new_products_price, expires_date FROM specials WHERE status=1 AND products_id='" . $product_id . "' LIMIT 1", ARRAY_A)) {
    384                                     update_post_meta($product_id, '_sale_price', $special['specials_new_products_price']);
    385                                     $special['expires_date'] = strtotime($special['expires_date']);
    386                                     if ($special['expires_date'] > time()) {
    387                                         update_post_meta($product_id, '_sale_price_dates_to', date("Y-m-d", $special['expires_date']));
    388                                         update_post_meta($product_id, '_sale_price_dates_from', date("Y-m-d"));
     355                            if ($product['products_name'] != '') {
     356                                $existing_product = get_posts(array('post_type' => 'product', 'posts_per_page' => 1, 'post_status' => 'any',
     357                                    'meta_query' => array(
     358                                        array(
     359                                            'key' => 'osc_id',
     360                                            'value' => $product['products_id'],
     361                                        )
     362                                )));
     363                                //otw_log("importProduct", "exist".json_encode($existing_product));
     364                                if (empty($existing_product) && !empty($product['products_name'])) {
     365                                    otw_log("importProduct", json_encode($product));
     366                                    $product_id = wp_insert_post(array(
     367                                        'post_title' => $product['products_name'],
     368                                        'post_content' => $product['products_description'],
     369                                        'post_status' => 'publish',
     370                                        'post_type' => 'product',
     371                                        'post_author' => 1
     372                                    ));
     373                                    update_post_meta($product_id, 'osc_id', $product['products_id']);
     374                                    wp_set_object_terms($product_id, 'simple', 'product_type');
     375                                    wp_set_object_terms($product_id, (int) $categories[$product['categories_id']], 'product_cat');
     376                                    update_post_meta($product_id, '_sku', $product['products_model']);
     377                                    update_post_meta($product_id, '_regular_price', $product['products_price']);
     378                                    update_post_meta($product_id, '_price', $product['products_price']);
     379                                    update_post_meta($product_id, '_visibility', 'visible');
     380                                    update_post_meta($product_id, '_stock_status', ($product['products_status'] ? 'instock' : 'outofstock'));
     381                                    update_post_meta($product_id, '_manage_stock', '1');
     382                                    update_post_meta($product_id, '_stock', $product['products_quantity']);
     383                                    update_post_meta($product_id, '_weight', $product['products_weight']);
     384                                    $import_prod_counter++;
     385
     386                                    if ($special = $oscdb->get_row("SELECT specials_new_products_price, expires_date FROM specials WHERE status=1 AND products_id='" . $product_id . "' LIMIT 1", ARRAY_A)) {
     387                                        update_post_meta($product_id, '_sale_price', $special['specials_new_products_price']);
     388                                        $special['expires_date'] = strtotime($special['expires_date']);
     389                                        if ($special['expires_date'] > time()) {
     390                                            update_post_meta($product_id, '_sale_price_dates_to', date("Y-m-d", $special['expires_date']));
     391                                            update_post_meta($product_id, '_sale_price_dates_from', date("Y-m-d"));
     392                                        }
    389393                                    }
    390                                 }
    391                                 /*
    392                                   $attach_id = 0;
    393                                   if($product['products_image'] != ''){
    394                                   $url = rtrim($_POST['store_url'],'/').'/images/'.urlencode($product['products_image']);
    395                                   $attach_id = otw_import_image($url);
    396                                   }
    397                                   if($attach_id > 0){
    398                                   set_post_thumbnail($product_id, $attach_id);
    399                                   }
    400                                  */
    401                                 // Handle attributes
    402                                 if ($attributes = $oscdb->get_results("SELECT po.products_options_name, pov.products_options_values_name FROM products_attributes pa, products_options po, products_options_values pov WHERE pa.products_id='" . $product['products_id'] . "' AND  pov.products_options_values_id = pa.options_values_id AND pov.language_id=po.language_id AND pa.options_id=products_options_id", ARRAY_A)) {
    403                                     wp_set_object_terms($product_id, 'variable', 'product_type');
    404 
    405                                     $attrib_array = array();
    406                                     $attrib_combo = array();
    407                                     $max_price = $product['products_price'];
    408                                     $min_price = $product['products_price'];
    409                                     foreach ($attributes as $attribute) {
    410                                         $slug = sanitize_title($attribute['products_options_name']);
    411                                         $attrib_array[$slug] = array('name' => $attribute['products_options_name'],
    412                                             'value' => ltrim($attrib_array[$slug]['value'] . ' | ' . $attribute['products_options_values_name'], ' | '),
    413                                             'position' => 0,
    414                                             'is_visible' => 1,
    415                                             'is_variation' => 1,
    416                                             'is_taxonomy' => 0);
    417                                         $attrib_combo[$slug][] = array($attribute['products_options_values_name'], ($attribute['price_prefix'] == '-' ? '-' : '') . $attribute['options_values_price']);
    418                                     }
    419                                     // Now it gets tricky...
    420                                     $combos = otw_cartesian_product($attrib_combo);
    421                                     foreach ($combos as $combo) {
    422                                         $variation_id = wp_insert_post(array(
    423                                             'post_title' => 'Product ' . $product_id . ' Variation',
    424                                             'post_content' => '',
    425                                             'post_status' => 'publish',
    426                                             'post_type' => 'product_variation',
    427                                             'post_author' => 1,
    428                                             'post_parent' => $product_id
    429                                         ));
    430 
    431                                         $opt_price = $product['products_price'];
    432 
    433                                         $special_price = $special['specials_new_products_price'];
    434 
    435                                         foreach ($combo as $k => $v) {
    436                                             update_post_meta($variation_id, 'attribute_' . $k, $v[0]);
    437                                             $opt_price += $v[1];
    438                                             $special_price += $v[1];
     394                                    /*
     395                                      $attach_id = 0;
     396                                      if($product['products_image'] != ''){
     397                                      $url = rtrim($_POST['store_url'],'/').'/images/'.urlencode($product['products_image']);
     398                                      $attach_id = otw_import_image($url);
     399                                      }
     400                                      if($attach_id > 0){
     401                                      set_post_thumbnail($product_id, $attach_id);
     402                                      }
     403                                     */
     404                                    // Handle attributes
     405                                    if ($attributes = $oscdb->get_results("SELECT po.products_options_name, pov.products_options_values_name FROM products_attributes pa, products_options po, products_options_values pov WHERE pa.products_id='" . $product['products_id'] . "' AND  pov.products_options_values_id = pa.options_values_id AND pov.language_id=po.language_id AND pa.options_id=products_options_id", ARRAY_A)) {
     406                                        wp_set_object_terms($product_id, 'variable', 'product_type');
     407
     408                                        $attrib_array = array();
     409                                        $attrib_combo = array();
     410                                        $max_price = $product['products_price'];
     411                                        $min_price = $product['products_price'];
     412                                        foreach ($attributes as $attribute) {
     413                                            $slug = sanitize_title($attribute['products_options_name']);
     414                                            $attrib_array[$slug] = array('name' => $attribute['products_options_name'],
     415                                                'value' => ltrim($attrib_array[$slug]['value'] . ' | ' . $attribute['products_options_values_name'], ' | '),
     416                                                'position' => 0,
     417                                                'is_visible' => 1,
     418                                                'is_variation' => 1,
     419                                                'is_taxonomy' => 0);
     420                                            $attrib_combo[$slug][] = array($attribute['products_options_values_name'], ($attribute['price_prefix'] == '-' ? '-' : '') . $attribute['options_values_price']);
    439421                                        }
    440                                         update_post_meta($variation_id, '_sku', $product['products_model']);
    441                                         update_post_meta($variation_id, '_regular_price', $opt_price);
    442                                         update_post_meta($variation_id, '_price', $opt_price);
    443                                         update_post_meta($variation_id, '_thumbnail_id', 0);
    444                                         update_post_meta($variation_id, '_stock', $product['products_quantity']);
    445                                         if ($special) {
    446                                             update_post_meta($variation_id, '_sale_price', $special_price);
    447                                             if ($special['expires_date'] > time()) {
    448                                                 update_post_meta($variation_id, '_sale_price_dates_to', date("Y-m-d", $special['expires_date']));
    449                                                 update_post_meta($variation_id, '_sale_price_dates_from', date("Y-m-d"));
     422                                        // Now it gets tricky...
     423                                        $combos = otw_cartesian_product($attrib_combo);
     424                                        foreach ($combos as $combo) {
     425                                            $variation_id = wp_insert_post(array(
     426                                                'post_title' => 'Product ' . $product_id . ' Variation',
     427                                                'post_content' => '',
     428                                                'post_status' => 'publish',
     429                                                'post_type' => 'product_variation',
     430                                                'post_author' => 1,
     431                                                'post_parent' => $product_id
     432                                            ));
     433
     434                                            $opt_price = $product['products_price'];
     435
     436                                            $special_price = $special['specials_new_products_price'];
     437
     438                                            foreach ($combo as $k => $v) {
     439                                                update_post_meta($variation_id, 'attribute_' . $k, $v[0]);
     440                                                $opt_price += $v[1];
     441                                                $special_price += $v[1];
     442                                            }
     443                                            update_post_meta($variation_id, '_sku', $product['products_model']);
     444                                            update_post_meta($variation_id, '_regular_price', $opt_price);
     445                                            update_post_meta($variation_id, '_price', $opt_price);
     446                                            update_post_meta($variation_id, '_thumbnail_id', 0);
     447                                            update_post_meta($variation_id, '_stock', $product['products_quantity']);
     448                                            if ($special) {
     449                                                update_post_meta($variation_id, '_sale_price', $special_price);
     450                                                if ($special['expires_date'] > time()) {
     451                                                    update_post_meta($variation_id, '_sale_price_dates_to', date("Y-m-d", $special['expires_date']));
     452                                                    update_post_meta($variation_id, '_sale_price_dates_from', date("Y-m-d"));
     453                                                }
     454                                            }
     455                                            if ($opt_price > $max_price) {
     456                                                $max_price = $opt_price;
     457                                            }
     458                                            if ($opt_price < $min_price) {
     459                                                $min_price = $opt_price;
    450460                                            }
    451461                                        }
    452                                         if ($opt_price > $max_price) {
    453                                             $max_price = $opt_price;
    454                                         }
    455                                         if ($opt_price < $min_price) {
    456                                             $min_price = $opt_price;
    457                                         }
     462
     463                                        update_post_meta($product_id, '_product_attributes', $attrib_array);
     464                                        update_post_meta($product_id, '_max_variation_regular_price', $max_price);
     465                                        update_post_meta($product_id, '_min_variation_regular_price', $min_price);
     466                                        update_post_meta($product_id, '_max_variation_price', $max_price);
     467                                        update_post_meta($product_id, '_min_variation_price', $min_price);
    458468                                    }
    459 
    460                                     update_post_meta($product_id, '_product_attributes', $attrib_array);
    461                                     update_post_meta($product_id, '_max_variation_regular_price', $max_price);
    462                                     update_post_meta($product_id, '_min_variation_regular_price', $min_price);
    463                                     update_post_meta($product_id, '_max_variation_price', $max_price);
    464                                     update_post_meta($product_id, '_min_variation_price', $min_price);
    465469                                }
    466470                            }
     
    820824            <ul class="nav nav-tabs" id="myTab" role="tablist">
    821825                <li class="nav-item">
    822                     <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true"><?php _e( 'OsCommerce Database Conection', 'woocommerce-osc-sync' ); ?></a>
     826                    <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true"><?php _e('OsCommerce Database Conection', 'woocommerce-osc-sync'); ?></a>
    823827                </li>
    824828                <li class="nav-item">
    825                     <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false"><?php _e( 'Products Configuration', 'woocommerce-osc-sync' ); ?></a>
     829                    <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false"><?php _e('Products Configuration', 'woocommerce-osc-sync'); ?></a>
    826830                </li>
    827831                <li class="nav-item">
    828                     <a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false"><?php _e( 'Select Imports', 'woocommerce-osc-sync' ); ?></a>
     832                    <a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false"><?php _e('Select Imports', 'woocommerce-osc-sync'); ?></a>
    829833                </li>
    830834            </ul>
    831835            <div class="tab-content" id="myTabContent">
    832836                <div class="tab-pane fade show active modal-body bg-light" id="home" role="tabpanel" aria-labelledby="home-tab">
    833                     <h4><?php _e( 'Enter your oscommerce database information', 'woocommerce-osc-sync' ); ?> </h4>
     837                    <h4><?php _e('Enter your oscommerce database information', 'woocommerce-osc-sync'); ?> </h4>
    834838                    <div class="alert alert-warning" role="alert">
    835                         <?php _e( 'You will need remote access to your oscommerce database', 'woocommerce-osc-sync' ); ?>
     839                        <?php _e('You will need remote access to your oscommerce database', 'woocommerce-osc-sync'); ?>
    836840                    </div>                   
    837841                    <div class="row">
    838842                        <div class="col-md-6">
    839843                            <div class="form-group">
    840                                 <label ><?php _e( 'osCommerce store URL: ', 'woocommerce-osc-sync' ); ?></label>
     844                                <label ><?php _e('osCommerce store URL: ', 'woocommerce-osc-sync'); ?></label>
    841845                                <input class="form-control" type="text" name="store_url" value="<?php echo sanitize_text_field($_POST['store_url']); ?>">
    842                                 <small><?php _e( 'Example: https://www.yoursite.com/', 'woocommerce-osc-sync' ); ?></small>   
     846                                <small><?php _e('Example: https://www.yoursite.com/', 'woocommerce-osc-sync'); ?></small>   
    843847                                </label>
    844848                            </div>
    845                             <div class="form-group"><label ><?php _e( 'osCommerce Database Host: ', 'woocommerce-osc-sync' ); ?></label><input class="form-control" type="text" name="store_host" value="localhost"></div>
    846                             <div class="form-group"><label ><?php _e( 'osCommerce Database Name: ', 'woocommerce-osc-sync' ); ?></label><input class="form-control" type="text" name="store_dbname" value="<?php echo sanitize_text_field($_POST['store_dbname']); ?>"></div>
     849                            <div class="form-group"><label ><?php _e('osCommerce Database Host: ', 'woocommerce-osc-sync'); ?></label><input class="form-control" type="text" name="store_host" value="localhost"></div>
     850                            <div class="form-group"><label ><?php _e('osCommerce Database Name: ', 'woocommerce-osc-sync'); ?></label><input class="form-control" type="text" name="store_dbname" value="<?php echo sanitize_text_field($_POST['store_dbname']); ?>"></div>
    847851                        </div>
    848852                        <div class="col-md-6">
    849853                            <div class="form-group">
    850                                 <label ><?php _e( 'Images directory: ', 'woocommerce-osc-sync' ); ?></label>
     854                                <label ><?php _e('Images directory: ', 'woocommerce-osc-sync'); ?></label>
    851855                                <input class="form-control" type="text" name="images_url" value="<?php echo sanitize_text_field($_POST['images_url']); ?>">
    852                                 <small><?php _e( 'Empty directory as default "image"', 'woocommerce-osc-sync' ); ?></small>                               
     856                                <small><?php _e('Empty directory as default "image"', 'woocommerce-osc-sync'); ?></small>                               
    853857                            </div>
    854                             <div class="form-group"><label ><?php _e( 'osCommerce Database User: ', 'woocommerce-osc-sync' ); ?></label><input class="form-control" type="text" name="store_user" value="<?php echo sanitize_text_field($_POST['store_user']); ?>"></div>
    855                             <div class="form-group"><label ><?php _e( 'osCommerce Database Password: ', 'woocommerce-osc-sync' ); ?></label><input class="form-control" type="text" name="store_pass" value="<?php echo sanitize_text_field($_POST['store_pass']); ?>"></div>                           
     858                            <div class="form-group"><label ><?php _e('osCommerce Database User: ', 'woocommerce-osc-sync'); ?></label><input class="form-control" type="text" name="store_user" value="<?php echo sanitize_text_field($_POST['store_user']); ?>"></div>
     859                            <div class="form-group"><label ><?php _e('osCommerce Database Password: ', 'woocommerce-osc-sync'); ?></label><input class="form-control" type="text" name="store_pass" value="<?php echo sanitize_text_field($_POST['store_pass']); ?>"></div>                           
    856860                        </div>
    857861                    </div>
    858862                </div>
    859863                <div class="tab-pane fade  modal-body bg-light" id="profile" role="tabpanel" aria-labelledby="profile-tab">
    860                     <h3><?php _e( 'Import data from osCommerce', 'woocommerce-osc-sync' ); ?></h3>
     864                    <h3><?php _e('Import data from osCommerce', 'woocommerce-osc-sync'); ?></h3>
    861865                    <div class="alert alert-info" role="alert">
    862                        <?php _e( 'For big products database can import in steps (use fields Offset & Limit)', 'woocommerce-osc-sync' ); ?>
     866                        <?php _e('For big products database can import in steps (use fields Offset & Limit)', 'woocommerce-osc-sync'); ?>
    863867                    </div>                                       
    864868                    <div class="col-md-12">
    865                         <div class="form-group"><label ><?php _e( 'Language: ', 'woocommerce-osc-sync' ); ?></label><input class="form-control" type="text" name="lang" value="<?php echo sanitize_text_field($_POST['lang']); ?>"><small><?php _e( 'Id from osCommerce lang table', 'woocommerce-osc-sync' ); ?></small></div>
    866                         <div class="form-group"><label ><?php _e( 'Offset: ', 'woocommerce-osc-sync' ); ?></label><input class="form-control" type="text" name="offset" value="<?php echo sanitize_text_field($_POST['offset']); ?>"><small><?php _e( 'Last product imported', 'woocommerce-osc-sync' ); ?></small></div>
    867                         <div class="form-group"><label ><?php _e( 'Limit: ', 'woocommerce-osc-sync' ); ?></label><input class="form-control" type="text" name="limit" value="<?php echo sanitize_text_field($_POST['limit']); ?>"><small><?php _e( 'how many products imported', 'woocommerce-osc-sync' ); ?></small></div>       
     869                        <div class="form-group"><label ><?php _e('Language: ', 'woocommerce-osc-sync'); ?></label><input class="form-control" type="text" name="lang" value="<?php echo sanitize_text_field($_POST['lang']); ?>"><small><?php _e('Id from osCommerce lang table', 'woocommerce-osc-sync'); ?></small></div>
     870                        <div class="form-group"><label ><?php _e('Offset: ', 'woocommerce-osc-sync'); ?></label><input class="form-control" type="text" name="offset" value="<?php echo sanitize_text_field($_POST['offset']); ?>"><small><?php _e('Last product imported', 'woocommerce-osc-sync'); ?></small></div>
     871                        <div class="form-group"><label ><?php _e('Limit: ', 'woocommerce-osc-sync'); ?></label><input class="form-control" type="text" name="limit" value="<?php echo sanitize_text_field($_POST['limit']); ?>"><small><?php _e('how many products imported', 'woocommerce-osc-sync'); ?></small></div>       
    868872                    </div>
    869873
    870874                </div>
    871875                <div class="tab-pane fade  modal-body bg-light" id="contact" role="tabpanel" aria-labelledby="contact-tab">
    872                     <h3><?php _e( 'Data to Import:', 'woocommerce-osc-sync' ); ?></h3>
     876                    <h3><?php _e('Data to Import:', 'woocommerce-osc-sync'); ?></h3>
    873877                    <div class="alert alert-warning" role="alert">
    874                        <?php _e( 'It is recommended to follow the order of the list', 'woocommerce-osc-sync' ); ?>
     878                        <?php _e('It is recommended to follow the order of the list', 'woocommerce-osc-sync'); ?>
    875879                    </div>                     
    876880                    <div class="row">
     
    880884                                    echo " checked ";
    881885                                }
    882                                 ?>><?php _e( 'Customers (passwords will not be transferred)', 'woocommerce-osc-sync' ); ?></label><br>
     886                                ?>><?php _e('Customers (passwords will not be transferred)', 'woocommerce-osc-sync'); ?></label><br>
    883887
    884888                            <label ><input class="form-control" type="checkbox" name="dtype[categories]" value="1" <?php
     
    886890                                    echo " checked ";
    887891                                }
    888                                 ?>><?php _e( 'Categories', 'woocommerce-osc-sync' ); ?></label><br>
     892                                ?>><?php _e('Categories', 'woocommerce-osc-sync'); ?></label><br>
    889893                           <!-- <label ><input class="form-control" type="checkbox" name="dtype[taxes]" value="1" <?php
    890894                            if ((int) $_POST['dtype']['taxes']) {
     
    896900                                    echo " checked ";
    897901                                }
    898                                 ?>><?php _e( 'Products', 'woocommerce-osc-sync' ); ?></label><br>
     902                                ?>><?php _e('Products', 'woocommerce-osc-sync'); ?></label><br>
    899903                            <label ><input class="form-control" type="checkbox" name="dtype[delete]" value="1"  <?php
    900904                                if ((int) $_POST['dtype']['delete']) {
    901905                                    echo " checked ";
    902906                                }
    903                                 ?>><?php _e( 'Products delete images', 'woocommerce-osc-sync' ); ?></label><br>
     907                                ?>><?php _e('Products delete images', 'woocommerce-osc-sync'); ?></label><br>
    904908                            <label ><input class="form-control" type="checkbox" name="dtype[image]" value="1"  <?php
    905909                                if ((int) $_POST['dtype']['image']) {
    906910                                    echo " checked ";
    907911                                }
    908                                 ?>><?php _e( 'Products Prefered image', 'woocommerce-osc-sync' ); ?></label><br>
     912                                ?>><?php _e('Products Prefered image', 'woocommerce-osc-sync'); ?></label><br>
    909913                            <label ><input class="form-control" type="checkbox" name="dtype[gallery]" value="1"  <?php
    910914                                if ((int) $_POST['dtype']['gallery']) {
    911915                                    echo " checked ";
    912916                                }
    913                                 ?>><?php _e( 'Products gallery', 'woocommerce-osc-sync' ); ?></label><br>
     917                                ?>><?php _e('Products gallery', 'woocommerce-osc-sync'); ?></label><br>
    914918                            <label ><input class="form-control" type="checkbox" name="dtype[orders]" value="1" <?php
    915919                                if ((int) $_POST['dtype']['orders']) {
    916920                                    echo " checked ";
    917921                                }
    918                                 ?>><?php _e( 'Orders', 'woocommerce-osc-sync' ); ?></label><br>
     922                                ?>><?php _e('Orders', 'woocommerce-osc-sync'); ?></label><br>
    919923                            <label ><input class="form-control" type="checkbox" name="dtype[pages]" value="1"  <?php
    920924                                if ((int) $_POST['dtype']['pages']) {
    921925                                    echo " checked ";
    922926                                }
    923                                 ?>><?php _e( 'Information Pages', 'woocommerce-osc-sync' ); ?></label>
     927                                ?>><?php _e('Information Pages', 'woocommerce-osc-sync'); ?></label>
    924928
    925929
     
    934938                    }
    935939                    ?>></label>
    936                 <small><?php _e( '(Display and save a log file in WordPress root folder)', 'woocommerce-osc-sync' ); ?></small>
    937                 <div class="form-group"><input type="submit" value="<?php _e( 'Import Data', 'woocommerce-osc-sync' ); ?>"  class="btn btn-primary btn-lg"></div>               
     940                <small><?php _e('(Display and save a log file in WordPress root folder)', 'woocommerce-osc-sync'); ?></small>
     941                <div class="form-group"><input type="submit" value="<?php _e('Import Data', 'woocommerce-osc-sync'); ?>"  class="btn btn-primary btn-lg"></div>               
    938942            </div>           
    939943
     
    966970}
    967971
    968 load_plugin_textdomain( 'woocommerce-osc-sync', false, basename( dirname( __FILE__ ) ) . '/languages' );
     972load_plugin_textdomain('woocommerce-osc-sync', false, basename(dirname(__FILE__)) . '/languages');
    969973?>
Note: See TracChangeset for help on using the changeset viewer.