Changeset 1920378
- Timestamp:
- 08/06/2018 11:59:53 AM (8 years ago)
- Location:
- woo-oscommerce-sync/trunk
- Files:
-
- 6 edited
-
languages/woocommerce-osc-sync-en_US.mo (modified) (previous)
-
languages/woocommerce-osc-sync-en_US.po (modified) (2 diffs)
-
languages/woocommerce-osc-sync-es_ES.mo (modified) (previous)
-
languages/woocommerce-osc-sync-es_ES.po (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
woocommerce-osc-sync.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-oscommerce-sync/trunk/languages/woocommerce-osc-sync-en_US.po
r1918801 r1920378 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2018-08-02 12:40+0000\n" 6 "PO-Revision-Date: 2018-08-0 2 12:45+0000\n"6 "PO-Revision-Date: 2018-08-06 11:57+0000\n" 7 7 "Last-Translator: Alejandro Aranda (alejandro@aaranda.es)\n" 8 8 "Language-Team: English (United States)\n" … … 123 123 124 124 msgid "Id from osCommerce lang table" 125 msgstr "Id from osCommerce lang table "125 msgstr "Id from osCommerce lang table (Empty import all languages)" 126 126 127 127 msgid "Last product imported" -
woo-oscommerce-sync/trunk/languages/woocommerce-osc-sync-es_ES.po
r1918801 r1920378 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2018-08-02 12:40+0000\n" 6 "PO-Revision-Date: 2018-08-0 2 12:42+0000\n"6 "PO-Revision-Date: 2018-08-06 11:56+0000\n" 7 7 "Last-Translator: Alejandro Aranda (alejandro@aaranda.es)\n" 8 8 "Language-Team: Español\n" … … 123 123 124 124 msgid "Id from osCommerce lang table" 125 msgstr "Identificador del idioma de osCommerce" 125 msgstr "" 126 "Identificador del idioma de osCommerce (Vacio importa todos los idiomas)" 126 127 127 128 msgid "Last product imported" -
woo-oscommerce-sync/trunk/readme.txt
r1918801 r1920378 70 70 71 71 == Changelog == 72 = 2.0.9 = 73 * Empty field language import all languages in products and categories 74 75 72 76 = 2.0.8 = 73 77 * Add internationalization -
woo-oscommerce-sync/trunk/woocommerce-osc-sync.php
r1918801 r1920378 7 7 Description: Import products, categories, customers and orders from osCommerce to Woocommerce 8 8 Author: Alejandro Aranda 9 Version: 2.0. 89 Version: 2.0.9 10 10 Author URI: http://www.aaranda.es 11 11 Original Author: David Barnes … … 27 27 if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { 28 28 29 29 30 30 function otw_submenu_page() { 31 31 add_submenu_page('woocommerce', 'osCommerce Sync', 'osCommerce Sync', 'manage_options', 'woocommerce-osc-sync', 'otw_submenu_page_callback'); … … 94 94 otw_log("importCategories", "Categories total: " . count($categories)); 95 95 foreach ($categories as $category) { 96 if (!is_wp_error($category) ) {96 if (!is_wp_error($category) && $category['categories_name'] != '') { 97 97 $term = term_exists($category['categories_name'], 'product_cat', (int) $parent_term_id); // array is returned if taxonomy is given 98 98 if ((int) $term['term_id'] == 0) { … … 109 109 110 110 $attach_id = 0; 111 111 112 if ($category['categories_image'] != '') { 112 113 if (esc_url($_POST['store_url'])) { … … 169 170 $lang = ' AND language_id=' . (int) sanitize_text_field($_POST['lang']); 170 171 } else { 171 $lang = ' AND language_id=3'; 172 // $lang = ' AND language_id=3'; 173 $lang = ' '; 172 174 } 173 175 } else { 174 $lang = ' AND language_id=3'; 176 // $lang = ' AND language_id=3'; 177 $lang = ' '; 175 178 } 176 179 … … 350 353 otw_log("importProduct", "Products origin total: " . count($products)); 351 354 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 } 389 393 } 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']); 439 421 } 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; 450 460 } 451 461 } 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); 458 468 } 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);465 469 } 466 470 } … … 820 824 <ul class="nav nav-tabs" id="myTab" role="tablist"> 821 825 <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> 823 827 </li> 824 828 <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> 826 830 </li> 827 831 <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> 829 833 </li> 830 834 </ul> 831 835 <div class="tab-content" id="myTabContent"> 832 836 <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> 834 838 <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'); ?> 836 840 </div> 837 841 <div class="row"> 838 842 <div class="col-md-6"> 839 843 <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> 841 845 <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> 843 847 </label> 844 848 </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> 847 851 </div> 848 852 <div class="col-md-6"> 849 853 <div class="form-group"> 850 <label ><?php _e( 'Images directory: ', 'woocommerce-osc-sync'); ?></label>854 <label ><?php _e('Images directory: ', 'woocommerce-osc-sync'); ?></label> 851 855 <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> 853 857 </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> 856 860 </div> 857 861 </div> 858 862 </div> 859 863 <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> 861 865 <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'); ?> 863 867 </div> 864 868 <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> 868 872 </div> 869 873 870 874 </div> 871 875 <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> 873 877 <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'); ?> 875 879 </div> 876 880 <div class="row"> … … 880 884 echo " checked "; 881 885 } 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> 883 887 884 888 <label ><input class="form-control" type="checkbox" name="dtype[categories]" value="1" <?php … … 886 890 echo " checked "; 887 891 } 888 ?>><?php _e( 'Categories', 'woocommerce-osc-sync'); ?></label><br>892 ?>><?php _e('Categories', 'woocommerce-osc-sync'); ?></label><br> 889 893 <!-- <label ><input class="form-control" type="checkbox" name="dtype[taxes]" value="1" <?php 890 894 if ((int) $_POST['dtype']['taxes']) { … … 896 900 echo " checked "; 897 901 } 898 ?>><?php _e( 'Products', 'woocommerce-osc-sync'); ?></label><br>902 ?>><?php _e('Products', 'woocommerce-osc-sync'); ?></label><br> 899 903 <label ><input class="form-control" type="checkbox" name="dtype[delete]" value="1" <?php 900 904 if ((int) $_POST['dtype']['delete']) { 901 905 echo " checked "; 902 906 } 903 ?>><?php _e( 'Products delete images', 'woocommerce-osc-sync'); ?></label><br>907 ?>><?php _e('Products delete images', 'woocommerce-osc-sync'); ?></label><br> 904 908 <label ><input class="form-control" type="checkbox" name="dtype[image]" value="1" <?php 905 909 if ((int) $_POST['dtype']['image']) { 906 910 echo " checked "; 907 911 } 908 ?>><?php _e( 'Products Prefered image', 'woocommerce-osc-sync'); ?></label><br>912 ?>><?php _e('Products Prefered image', 'woocommerce-osc-sync'); ?></label><br> 909 913 <label ><input class="form-control" type="checkbox" name="dtype[gallery]" value="1" <?php 910 914 if ((int) $_POST['dtype']['gallery']) { 911 915 echo " checked "; 912 916 } 913 ?>><?php _e( 'Products gallery', 'woocommerce-osc-sync'); ?></label><br>917 ?>><?php _e('Products gallery', 'woocommerce-osc-sync'); ?></label><br> 914 918 <label ><input class="form-control" type="checkbox" name="dtype[orders]" value="1" <?php 915 919 if ((int) $_POST['dtype']['orders']) { 916 920 echo " checked "; 917 921 } 918 ?>><?php _e( 'Orders', 'woocommerce-osc-sync'); ?></label><br>922 ?>><?php _e('Orders', 'woocommerce-osc-sync'); ?></label><br> 919 923 <label ><input class="form-control" type="checkbox" name="dtype[pages]" value="1" <?php 920 924 if ((int) $_POST['dtype']['pages']) { 921 925 echo " checked "; 922 926 } 923 ?>><?php _e( 'Information Pages', 'woocommerce-osc-sync'); ?></label>927 ?>><?php _e('Information Pages', 'woocommerce-osc-sync'); ?></label> 924 928 925 929 … … 934 938 } 935 939 ?>></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> 938 942 </div> 939 943 … … 966 970 } 967 971 968 load_plugin_textdomain( 'woocommerce-osc-sync', false, basename( dirname( __FILE__ ) ) . '/languages');972 load_plugin_textdomain('woocommerce-osc-sync', false, basename(dirname(__FILE__)) . '/languages'); 969 973 ?>
Note: See TracChangeset
for help on using the changeset viewer.