Import Products from any XML or CSV to WooCommerce - Version 1.2.5

Version Description

  • fixed conflict between options [update only these custom fields & update only these attributes]
  • added feature to dynamically set attribute options
  • added new option "Convert decimal separator to a period"
Download this release

Release Info

Developer soflyy
Plugin Icon 128x128 Import Products from any XML or CSV to WooCommerce
Version 1.2.5
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.5

controllers/controller/admin.php CHANGED
@@ -40,14 +40,14 @@ abstract class PMWI_Controller_Admin extends PMWI_Controller {
40
  if ( ! is_a($wp_styles, 'WP_Styles'))
41
  $wp_styles = new WP_Styles();
42
 
43
- wp_enqueue_style('pmwi-admin-style', PMWI_ROOT_URL . '/static/css/admin.css');
44
 
45
  if ( version_compare(get_bloginfo('version'), '3.8-RC1') >= 0 ){
46
  wp_enqueue_style('pmwi-admin-style-wp-3.8', PMWI_ROOT_URL . '/static/css/admin-wp-3.8.css');
47
  }
48
 
49
  wp_enqueue_script('pmwi-script', PMWI_ROOT_URL . '/static/js/pmwi.js', array('jquery'));
50
- wp_enqueue_script('pmwi-admin-script', PMWI_ROOT_URL . '/static/js/admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-resizable', 'jquery-ui-dialog', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'pmxi-admin-script'));
51
 
52
  global $woocommerce;
53
 
40
  if ( ! is_a($wp_styles, 'WP_Styles'))
41
  $wp_styles = new WP_Styles();
42
 
43
+ wp_enqueue_style('pmwi-admin-style', PMWI_ROOT_URL . '/static/css/admin.css', array(), PMWI_VERSION);
44
 
45
  if ( version_compare(get_bloginfo('version'), '3.8-RC1') >= 0 ){
46
  wp_enqueue_style('pmwi-admin-style-wp-3.8', PMWI_ROOT_URL . '/static/css/admin-wp-3.8.css');
47
  }
48
 
49
  wp_enqueue_script('pmwi-script', PMWI_ROOT_URL . '/static/js/pmwi.js', array('jquery'));
50
+ wp_enqueue_script('pmwi-admin-script', PMWI_ROOT_URL . '/static/js/admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-resizable', 'jquery-ui-dialog', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'pmxi-admin-script'), PMWI_VERSION);
51
 
52
  global $woocommerce;
53
 
filters/pmxi_custom_field_to_update.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  function pmwi_pmxi_custom_field_to_update( $field_to_update, $post_type, $options, $m_key ){
3
 
4
- if ($field_to_update === false || $post_type != 'product') return $field_to_update;
5
 
6
  // Do not update attributes
7
  if ($options['update_all_data'] == 'no' and ! $options['is_update_attributes'] and ( ! in_array($cur_meta_key, array('_default_attributes', '_product_attributes')) or strpos($cur_meta_key, "attribute_") === false)) return true;
1
  <?php
2
  function pmwi_pmxi_custom_field_to_update( $field_to_update, $post_type, $options, $m_key ){
3
 
4
+ if ($field_to_update === false || $post_type != 'product' || strpos($m_key, 'attribute_') === false) return $field_to_update;
5
 
6
  // Do not update attributes
7
  if ($options['update_all_data'] == 'no' and ! $options['is_update_attributes'] and ( ! in_array($cur_meta_key, array('_default_attributes', '_product_attributes')) or strpos($cur_meta_key, "attribute_") === false)) return true;
helpers/pmwi_adjust_price.php CHANGED
@@ -2,7 +2,7 @@
2
  function pmwi_adjust_price( $price, $field, $options ){
3
 
4
  switch ($field) {
5
-
6
  case 'regular_price':
7
 
8
  if ( ! empty($options['single_product_regular_price_adjust']) ){
@@ -19,10 +19,11 @@ function pmwi_adjust_price( $price, $field, $options ){
19
  break;
20
  }
21
 
 
22
  }
23
 
24
  break;
25
-
26
  case 'sale_price':
27
 
28
  if ( ! empty($options['single_product_sale_price_adjust']) ){
@@ -39,6 +40,8 @@ function pmwi_adjust_price( $price, $field, $options ){
39
  break;
40
  }
41
 
 
 
42
  }
43
 
44
  break;
@@ -50,6 +53,6 @@ function pmwi_adjust_price( $price, $field, $options ){
50
  break;
51
  }
52
 
53
- return ( (double) $price > 0) ? number_format( (double) $price, 2, '.', '' ) : 0;
54
 
55
  }
2
  function pmwi_adjust_price( $price, $field, $options ){
3
 
4
  switch ($field) {
5
+ case 'variable_regular_price':
6
  case 'regular_price':
7
 
8
  if ( ! empty($options['single_product_regular_price_adjust']) ){
19
  break;
20
  }
21
 
22
+ $price = ( (double) $price > 0) ? number_format( (double) $price, 2, '.', '' ) : 0;
23
  }
24
 
25
  break;
26
+ case 'variable_sale_price':
27
  case 'sale_price':
28
 
29
  if ( ! empty($options['single_product_sale_price_adjust']) ){
40
  break;
41
  }
42
 
43
+ $price = ( (double) $price > 0) ? number_format( (double) $price, 2, '.', '' ) : 0;
44
+
45
  }
46
 
47
  break;
53
  break;
54
  }
55
 
56
+ return $price;
57
 
58
  }
helpers/pmwi_prepare_price.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- function pmwi_prepare_price( $price, $disable_prepare_price, $prepare_price_to_woo_format ){
3
 
4
  if ( $disable_prepare_price ){
5
 
@@ -7,6 +7,47 @@ function pmwi_prepare_price( $price, $disable_prepare_price, $prepare_price_to_w
7
 
8
  }
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  if ( $prepare_price_to_woo_format ){
11
 
12
  $price = str_replace(",", ".", $price);
1
  <?php
2
+ function pmwi_prepare_price( $price, $disable_prepare_price, $prepare_price_to_woo_format, $convert_decimal_separator ){
3
 
4
  if ( $disable_prepare_price ){
5
 
7
 
8
  }
9
 
10
+ if ( $convert_decimal_separator )
11
+ {
12
+ $decimal_sep = get_option( 'woocommerce_price_decimal_sep', '.' );
13
+ $thousand_sep = get_option( 'woocommerce_price_thousand_sep', ',' );
14
+
15
+ $comma_position = strrpos($price, ",", strlen($price) - 3);
16
+
17
+ if ($comma_position !== false)
18
+ {
19
+ $price = str_replace(".", "", $price);
20
+ $comma_position = strrpos($price, ",");
21
+ $price = str_replace(",", "", substr_replace($price, ".", $comma_position, 1));
22
+ }
23
+ else
24
+ {
25
+ $comma_position = strrpos($price, ".", strlen($price) - 3);
26
+ if ($comma_position !== false)
27
+ {
28
+ $price = str_replace(",", "", $price);
29
+ }
30
+ else
31
+ {
32
+ $comma_position = strrpos($price, ",", strlen($price) - 4);
33
+
34
+ if ($comma_position and strlen($price) - $comma_position == 4)
35
+ {
36
+ $price = str_replace(",", "", $price);
37
+ }
38
+ else
39
+ {
40
+ $comma_position = strrpos($price, ".", strlen($price) - 4);
41
+
42
+ if ($comma_position and strlen($price) - $comma_position == 4)
43
+ {
44
+ $price = str_replace(".", "", $price);
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+
51
  if ( $prepare_price_to_woo_format ){
52
 
53
  $price = str_replace(",", ".", $price);
models/import/record.php CHANGED
@@ -473,15 +473,106 @@ class PMWI_Import_Record extends PMWI_Model_Record {
473
  $attribute_is_visible = array();
474
  $attribute_is_taxonomy = array();
475
  $attribute_create_taxonomy_terms = array();
476
-
477
  if (!empty($import->options['attribute_name'][0])){
478
- foreach ($import->options['attribute_name'] as $j => $attribute_name) { if ($attribute_name == "") continue;
479
- $attribute_keys[$j] = XmlImportParser::factory($xml, $cxpath, $attribute_name, $file)->parse($records); $tmp_files[] = $file;
480
- $attribute_values[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['attribute_value'][$j], $file)->parse($records); $tmp_files[] = $file;
481
- $attribute_in_variation[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['in_variations'][$j], $file)->parse($records); $tmp_files[] = $file;
482
- $attribute_is_visible[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['is_visible'][$j], $file)->parse($records); $tmp_files[] = $file;
483
- $attribute_is_taxonomy[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['is_taxonomy'][$j], $file)->parse($records); $tmp_files[] = $file;
484
- $attribute_create_taxonomy_terms[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['create_taxonomy_in_not_exists'][$j], $file)->parse($records); $tmp_files[] = $file;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
  }
486
  }
487
 
@@ -534,7 +625,7 @@ class PMWI_Import_Record extends PMWI_Model_Record {
534
  $is_new_product = empty($articleData['ID']);
535
 
536
  // Get types
537
- $product_type = 'simple';
538
 
539
  if ($this->options['update_all_data'] == 'no' and ! $this->options['is_update_product_type'] and ! $is_new_product ){
540
  $product = get_product($pid);
@@ -557,7 +648,7 @@ class PMWI_Import_Record extends PMWI_Model_Record {
557
  $is_featured = $product_featured[$i];
558
 
559
  // Product type + Downloadable/Virtual
560
- if ($is_new_product or $this->options['update_all_data'] == 'no' and $this->options['is_update_product_type']){
561
  //wp_set_object_terms( $pid, $product_type, 'product_type' );
562
  $product_type_term = term_exists($product_type, 'product_type', 0);
563
  if ( ! empty($product_type_term) and ! is_wp_error($product_type_term) ){
@@ -590,21 +681,21 @@ class PMWI_Import_Record extends PMWI_Model_Record {
590
  $this->pushmeta($pid, '_height', '' );
591
  }
592
 
593
- $this->wpdb->update( $this->wpdb->posts, array('comment_status' => ($product_enable_reviews[$i] == 'yes') ? 'open' : 'closed' ), array('ID' => $pid));
594
 
595
  if ($this->options['update_all_data'] == 'yes' or $this->options['is_update_menu_order']) $this->wpdb->update( $this->wpdb->posts, array('menu_order' => ($product_menu_order[$i] != '') ? (int) $product_menu_order[$i] : 0 ), array('ID' => $pid));
596
 
597
  // Save shipping class
598
  if ( pmwi_is_update_taxonomy($articleData, $this->options, 'product_shipping_class') )
599
- {
600
- $p_shipping_class = false;
601
 
602
- if (ctype_digit($product_shipping_class[$i]))
 
 
603
  {
604
- $p_shipping_class = $product_shipping_class[$i] > 0 && $product_type != 'external' ? absint( $product_shipping_class[$i] ) : '';
605
 
606
- if ( $p_shipping_class != '' )
607
- {
608
  $t_shipping_class = get_term_by('slug', $p_shipping_class, 'product_shipping_class');
609
 
610
  if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
@@ -631,20 +722,11 @@ class PMWI_Import_Record extends PMWI_Model_Record {
631
  $p_shipping_class = (int) $t_shipping_class['term_taxonomy_id'];
632
  }
633
  }
634
- }
635
  }
636
- }
637
- else{
638
-
639
- $t_shipping_class = term_exists($product_shipping_class[$i], 'product_shipping_class', 0);
640
-
641
- if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
642
- {
643
- $p_shipping_class = (int) $t_shipping_class['term_taxonomy_id'];
644
- }
645
- else
646
- {
647
- $t_shipping_class = term_exists(htmlspecialchars(strtolower($product_shipping_class[$i])), 'product_shipping_class', 0);
648
 
649
  if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
650
  {
@@ -652,17 +734,26 @@ class PMWI_Import_Record extends PMWI_Model_Record {
652
  }
653
  else
654
  {
655
- $t_shipping_class = wp_insert_term(
656
- $product_shipping_class[$i], // the term
657
- 'product_shipping_class' // the taxonomy
658
- );
659
-
660
  if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
661
- {
662
  $p_shipping_class = (int) $t_shipping_class['term_taxonomy_id'];
663
  }
664
- }
665
- }
 
 
 
 
 
 
 
 
 
 
 
 
666
  }
667
 
668
  if ( $p_shipping_class !== false and ! is_wp_error($p_shipping_class)) $this->associate_terms( $pid, array( $p_shipping_class ), 'product_shipping_class' );
@@ -960,7 +1051,43 @@ class PMWI_Import_Record extends PMWI_Model_Record {
960
  $this->wpdb->update( $this->wpdb->posts, array('post_parent' => absint( $product_grouping_parent[$i] ) ), array('ID' => $pid));
961
 
962
  }
963
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
964
 
965
  // Sold Individuall
966
  if ( "yes" == $product_sold_individually[$i] ) {
@@ -1101,7 +1228,18 @@ class PMWI_Import_Record extends PMWI_Model_Record {
1101
  if ( isset( $product_download_type[$i] ) )
1102
  $this->pushmeta($pid, '_download_type', esc_attr( $product_download_type ));
1103
 
1104
- }
 
 
 
 
 
 
 
 
 
 
 
1105
 
1106
  // prepare bulk SQL query
1107
  //$this->executeSQL();
@@ -1255,16 +1393,18 @@ class PMWI_Import_Record extends PMWI_Model_Record {
1255
  return;
1256
  }
1257
 
1258
- foreach ($assign_taxes as $tt) {
1259
- $this->wpdb->insert( $this->wpdb->term_relationships, array( 'object_id' => $pid, 'term_taxonomy_id' => $tt ) );
1260
- $this->wpdb->query( "UPDATE {$this->wpdb->term_taxonomy} SET count = count + 1 WHERE term_taxonomy_id = $tt" );
1261
- delete_transient( 'wc_ln_count_' . md5( sanitize_key( $tx_name ) . sanitize_key( $tt ) ) );
1262
- }
1263
 
1264
  $values = array();
1265
  $term_order = 0;
1266
  foreach ( $assign_taxes as $tt ){
1267
  $values[] = $this->wpdb->prepare( "(%d, %d, %d)", $pid, $tt, ++$term_order);
 
 
1268
  }
1269
 
1270
 
@@ -1289,13 +1429,13 @@ class PMWI_Import_Record extends PMWI_Model_Record {
1289
  $sql_query_sel = array();
1290
  $sql_query = "INSERT INTO $table (post_id, meta_key, meta_value) ";
1291
  foreach ($post_meta_infos as $meta_info) {
1292
- if ($this->is_update_cf($meta_info->meta_key)){
1293
- update_post_meta($new_id, $meta_info->meta_key, $meta_info->meta_value);
1294
  //$meta_key = $meta_info->meta_key;
1295
  // $this->wpdb->query($this->wpdb->prepare("DELETE FROM $table WHERE `post_id` = $new_id AND `meta_key` = %s", $meta_key));
1296
  // $meta_value = addslashes($meta_info->meta_value);
1297
  // $sql_query_sel[]= "SELECT $new_id, '$meta_key', '$meta_value'";
1298
- }
1299
  }
1300
  // if ( ! empty($sql_query_sel) ){
1301
  // $sql_query.= implode(" UNION ALL ", $sql_query_sel);
@@ -1312,7 +1452,7 @@ class PMWI_Import_Record extends PMWI_Model_Record {
1312
  $post_meta_infos = $this->wpdb->get_results("SELECT meta_key, meta_value FROM $table WHERE post_id=$pid");
1313
 
1314
  foreach ($post_meta_infos as $meta_info) {
1315
- if (in_array($meta_info->meta_key, array('_regular_price', '_sale_price', '_sale_price_dates_from', '_sale_price_dates_from', '_sale_price_dates_to', '_price'))){
1316
  $this->pushmeta($pid, $meta_info->meta_key . '_tmp', $meta_info->meta_value);
1317
  }
1318
  }
@@ -1328,7 +1468,7 @@ class PMWI_Import_Record extends PMWI_Model_Record {
1328
  $post_meta_infos = $this->wpdb->get_results("SELECT meta_key, meta_value FROM $table WHERE post_id=$pid");
1329
 
1330
  foreach ($post_meta_infos as $meta_info) {
1331
- if (in_array($meta_info->meta_key, array('_regular_price_tmp', '_sale_price_tmp', '_sale_price_dates_from_tmp', '_sale_price_dates_from_tmp', '_sale_price_dates_to_tmp', '_price_tmp'))){
1332
  $this->pushmeta($pid, str_replace('_tmp', '', $meta_info->meta_key), $meta_info->meta_value);
1333
  delete_post_meta( $pid, $meta_info->meta_key );
1334
  }
@@ -1396,7 +1536,242 @@ class PMWI_Import_Record extends PMWI_Model_Record {
1396
  }
1397
  }
1398
  }
1399
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1400
 
1401
  public function _filter_has_cap_unfiltered_html($caps)
1402
  {
@@ -1495,7 +1870,7 @@ class PMWI_Import_Record extends PMWI_Model_Record {
1495
 
1496
  function prepare_price( $price ){
1497
 
1498
- return pmwi_prepare_price( $price, $this->options['disable_prepare_price'], $this->options['prepare_price_to_woo_format'] );
1499
 
1500
  }
1501
 
473
  $attribute_is_visible = array();
474
  $attribute_is_taxonomy = array();
475
  $attribute_create_taxonomy_terms = array();
476
+
477
  if (!empty($import->options['attribute_name'][0])){
478
+ foreach ($import->options['attribute_name'] as $j => $attribute_name) { if ($attribute_name == "") continue;
479
+
480
+ $attribute_keys[$j] = XmlImportParser::factory($xml, $cxpath, $attribute_name, $file)->parse($records); $tmp_files[] = $file;
481
+ $attribute_values[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['attribute_value'][$j], $file)->parse($records); $tmp_files[] = $file;
482
+
483
+ if (empty($import->options['is_advanced'][$j]))
484
+ {
485
+ $attribute_in_variation[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['in_variations'][$j], $file)->parse($records); $tmp_files[] = $file;
486
+ $attribute_is_visible[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['is_visible'][$j], $file)->parse($records); $tmp_files[] = $file;
487
+ $attribute_is_taxonomy[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['is_taxonomy'][$j], $file)->parse($records); $tmp_files[] = $file;
488
+ $attribute_create_taxonomy_terms[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['create_taxonomy_in_not_exists'][$j], $file)->parse($records); $tmp_files[] = $file;
489
+ }
490
+ else
491
+ {
492
+ // Is attribute In Variations
493
+ if ($import->options['advanced_in_variations'][$j] == 'xpath' and "" != $import->options['advanced_in_variations_xpath'][$j])
494
+ {
495
+ $attribute_in_variation[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['advanced_in_variations_xpath'][$j], $file)->parse($records); $tmp_files[] = $file;
496
+ }
497
+ else
498
+ {
499
+ $attribute_in_variation[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['advanced_in_variations'][$j], $file)->parse($records); $tmp_files[] = $file;
500
+ }
501
+
502
+ foreach ($attribute_in_variation[$j] as $key => $value) {
503
+ if ( ! in_array($value, array('yes', 'no')))
504
+ {
505
+ $attribute_in_variation[$j][$key] = 1;
506
+ }
507
+ else
508
+ {
509
+ $attribute_in_variation[$j][$key] = ($value == 'yes') ? 1 : 0;
510
+ }
511
+ }
512
+
513
+ // Is attribute Visible
514
+ if ($import->options['advanced_is_visible'][$j] == 'xpath' and "" != $import->options['advanced_is_visible_xpath'][$j])
515
+ {
516
+ $attribute_is_visible[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['advanced_is_visible_xpath'][$j], $file)->parse($records); $tmp_files[] = $file;
517
+ }
518
+ else
519
+ {
520
+ $attribute_is_visible[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['advanced_is_visible'][$j], $file)->parse($records); $tmp_files[] = $file;
521
+ }
522
+
523
+ foreach ($attribute_is_visible[$j] as $key => $value) {
524
+ if ( ! in_array($value, array('yes', 'no')))
525
+ {
526
+ $attribute_is_visible[$j][$key] = 1;
527
+ }
528
+ else
529
+ {
530
+ $attribute_is_visible[$j][$key] = ($value == 'yes') ? 1 : 0;
531
+ }
532
+ }
533
+
534
+ // Is attribute Taxonomy
535
+ if ($import->options['advanced_is_taxonomy'][$j] == 'xpath' and "" != $import->options['advanced_is_taxonomy_xpath'][$j])
536
+ {
537
+ $attribute_is_taxonomy[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['advanced_is_taxonomy_xpath'][$j], $file)->parse($records); $tmp_files[] = $file;
538
+ }
539
+ else
540
+ {
541
+ $attribute_is_taxonomy[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['advanced_is_taxonomy'][$j], $file)->parse($records); $tmp_files[] = $file;
542
+ }
543
+
544
+ foreach ($attribute_is_taxonomy[$j] as $key => $value) {
545
+ if ( ! in_array($value, array('yes', 'no')))
546
+ {
547
+ $attribute_is_taxonomy[$j][$key] = 1;
548
+ }
549
+ else
550
+ {
551
+ $attribute_is_taxonomy[$j][$key] = ($value == 'yes') ? 1 : 0;
552
+ }
553
+ }
554
+
555
+ // Is auto-create terms
556
+ if ($import->options['advanced_is_create_terms'][$j] == 'xpath' and "" != $import->options['advanced_is_create_terms_xpath'][$j])
557
+ {
558
+ $attribute_create_taxonomy_terms[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['advanced_is_create_terms_xpath'][$j], $file)->parse($records); $tmp_files[] = $file;
559
+ }
560
+ else
561
+ {
562
+ $attribute_create_taxonomy_terms[$j] = XmlImportParser::factory($xml, $cxpath, $import->options['advanced_is_create_terms'][$j], $file)->parse($records); $tmp_files[] = $file;
563
+ }
564
+
565
+ foreach ($attribute_create_taxonomy_terms[$j] as $key => $value) {
566
+ if ( ! in_array($value, array('yes', 'no')))
567
+ {
568
+ $attribute_create_taxonomy_terms[$j][$key] = 1;
569
+ }
570
+ else
571
+ {
572
+ $attribute_create_taxonomy_terms[$j][$key] = ($value == 'yes') ? 1 : 0;
573
+ }
574
+ }
575
+ }
576
  }
577
  }
578
 
625
  $is_new_product = empty($articleData['ID']);
626
 
627
  // Get types
628
+ $product_type = empty( $product_types[$i] ) ? 'simple' : sanitize_title( stripslashes( $product_types[$i] ) );
629
 
630
  if ($this->options['update_all_data'] == 'no' and ! $this->options['is_update_product_type'] and ! $is_new_product ){
631
  $product = get_product($pid);
648
  $is_featured = $product_featured[$i];
649
 
650
  // Product type + Downloadable/Virtual
651
+ if ($is_new_product or $this->options['update_all_data'] == 'yes' or ($this->options['update_all_data'] == 'no' and $this->options['is_update_product_type'])) {
652
  //wp_set_object_terms( $pid, $product_type, 'product_type' );
653
  $product_type_term = term_exists($product_type, 'product_type', 0);
654
  if ( ! empty($product_type_term) and ! is_wp_error($product_type_term) ){
681
  $this->pushmeta($pid, '_height', '' );
682
  }
683
 
684
+ if ($this->options['is_update_comment_status']) $this->wpdb->update( $this->wpdb->posts, array('comment_status' => ($product_enable_reviews[$i] == 'yes') ? 'open' : 'closed' ), array('ID' => $pid));
685
 
686
  if ($this->options['update_all_data'] == 'yes' or $this->options['is_update_menu_order']) $this->wpdb->update( $this->wpdb->posts, array('menu_order' => ($product_menu_order[$i] != '') ? (int) $product_menu_order[$i] : 0 ), array('ID' => $pid));
687
 
688
  // Save shipping class
689
  if ( pmwi_is_update_taxonomy($articleData, $this->options, 'product_shipping_class') )
690
+ {
 
691
 
692
+ $p_shipping_class = $product_shipping_class[$i] > 0 && $product_type != 'external' ? absint( $product_shipping_class[$i] ) : '';
693
+
694
+ if ( $p_shipping_class != '' )
695
  {
 
696
 
697
+ if (ctype_digit($product_shipping_class[$i]))
698
+ {
699
  $t_shipping_class = get_term_by('slug', $p_shipping_class, 'product_shipping_class');
700
 
701
  if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
722
  $p_shipping_class = (int) $t_shipping_class['term_taxonomy_id'];
723
  }
724
  }
725
+ }
726
  }
727
+ else{
728
+
729
+ $t_shipping_class = term_exists($product_shipping_class[$i], 'product_shipping_class', 0);
 
 
 
 
 
 
 
 
 
730
 
731
  if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
732
  {
734
  }
735
  else
736
  {
737
+ $t_shipping_class = term_exists(htmlspecialchars(strtolower($product_shipping_class[$i])), 'product_shipping_class', 0);
738
+
 
 
 
739
  if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
740
+ {
741
  $p_shipping_class = (int) $t_shipping_class['term_taxonomy_id'];
742
  }
743
+ else
744
+ {
745
+ $t_shipping_class = wp_insert_term(
746
+ $product_shipping_class[$i], // the term
747
+ 'product_shipping_class' // the taxonomy
748
+ );
749
+
750
+ if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
751
+ {
752
+ $p_shipping_class = (int) $t_shipping_class['term_taxonomy_id'];
753
+ }
754
+ }
755
+ }
756
+ }
757
  }
758
 
759
  if ( $p_shipping_class !== false and ! is_wp_error($p_shipping_class)) $this->associate_terms( $pid, array( $p_shipping_class ), 'product_shipping_class' );
1051
  $this->wpdb->update( $this->wpdb->posts, array('post_parent' => absint( $product_grouping_parent[$i] ) ), array('ID' => $pid));
1052
 
1053
  }
1054
+ }
1055
+
1056
+ // Update parent if grouped so price sorting works and stays in sync with the cheapest child
1057
+ if ( $product_type == 'grouped' || ( "" != $product_grouping_parent[$i] and absint($product_grouping_parent[$i]) > 0)) {
1058
+
1059
+ $clear_parent_ids = array();
1060
+
1061
+ if ( $product_type == 'grouped' )
1062
+ $clear_parent_ids[] = $pid;
1063
+
1064
+ if ( "" != $product_grouping_parent[$i] and absint($product_grouping_parent[$i]) > 0 )
1065
+ $clear_parent_ids[] = absint( $product_grouping_parent[$i] );
1066
+
1067
+ if ( $clear_parent_ids ) {
1068
+ foreach( $clear_parent_ids as $clear_id ) {
1069
+
1070
+ $children_by_price = get_posts( array(
1071
+ 'post_parent' => $clear_id,
1072
+ 'orderby' => 'meta_value_num',
1073
+ 'order' => 'asc',
1074
+ 'meta_key' => '_price',
1075
+ 'posts_per_page'=> 1,
1076
+ 'post_type' => 'product',
1077
+ 'fields' => 'ids'
1078
+ ) );
1079
+ if ( $children_by_price ) {
1080
+ foreach ( $children_by_price as $child ) {
1081
+ $child_price = get_post_meta( $child, '_price', true );
1082
+ update_post_meta( $clear_id, '_price', $child_price );
1083
+ }
1084
+ }
1085
+
1086
+ // Clear cache/transients
1087
+ //wc_delete_product_transients( $clear_id );
1088
+ }
1089
+ }
1090
+ }
1091
 
1092
  // Sold Individuall
1093
  if ( "yes" == $product_sold_individually[$i] ) {
1228
  if ( isset( $product_download_type[$i] ) )
1229
  $this->pushmeta($pid, '_download_type', esc_attr( $product_download_type ));
1230
 
1231
+ }
1232
+
1233
+ // Product url
1234
+ if ( $product_type == 'external' ) {
1235
+ if ( isset( $product_url[$i] ) && $product_url[$i] ){
1236
+ $this->auto_cloak_links($import, $product_url[$i]);
1237
+ $this->pushmeta($pid, '_product_url', esc_attr( $product_url[$i] ));
1238
+ }
1239
+ if ( isset( $product_button_text[$i] ) && $product_button_text[$i] ){
1240
+ $this->pushmeta($pid, '_button_text', esc_attr( $product_button_text[$i] ));
1241
+ }
1242
+ }
1243
 
1244
  // prepare bulk SQL query
1245
  //$this->executeSQL();
1393
  return;
1394
  }
1395
 
1396
+ // foreach ($assign_taxes as $tt) {
1397
+ // $this->wpdb->insert( $this->wpdb->term_relationships, array( 'object_id' => $pid, 'term_taxonomy_id' => $tt ) );
1398
+ // $this->wpdb->query( "UPDATE {$this->wpdb->term_taxonomy} SET count = count + 1 WHERE term_taxonomy_id = $tt" );
1399
+ // delete_transient( 'wc_ln_count_' . md5( sanitize_key( $tx_name ) . sanitize_key( $tt ) ) );
1400
+ // }
1401
 
1402
  $values = array();
1403
  $term_order = 0;
1404
  foreach ( $assign_taxes as $tt ){
1405
  $values[] = $this->wpdb->prepare( "(%d, %d, %d)", $pid, $tt, ++$term_order);
1406
+ $this->wpdb->query( "UPDATE {$this->wpdb->term_taxonomy} SET count = count + 1 WHERE term_taxonomy_id = $tt" );
1407
+ delete_transient( 'wc_ln_count_' . md5( sanitize_key( $tx_name ) . sanitize_key( $tt ) ) );
1408
  }
1409
 
1410
 
1429
  $sql_query_sel = array();
1430
  $sql_query = "INSERT INTO $table (post_id, meta_key, meta_value) ";
1431
  foreach ($post_meta_infos as $meta_info) {
1432
+ //if ($this->is_update_cf($meta_info->meta_key)){
1433
+ $this->pushmeta($new_id, $meta_info->meta_key, $meta_info->meta_value);
1434
  //$meta_key = $meta_info->meta_key;
1435
  // $this->wpdb->query($this->wpdb->prepare("DELETE FROM $table WHERE `post_id` = $new_id AND `meta_key` = %s", $meta_key));
1436
  // $meta_value = addslashes($meta_info->meta_value);
1437
  // $sql_query_sel[]= "SELECT $new_id, '$meta_key', '$meta_value'";
1438
+ //}
1439
  }
1440
  // if ( ! empty($sql_query_sel) ){
1441
  // $sql_query.= implode(" UNION ALL ", $sql_query_sel);
1452
  $post_meta_infos = $this->wpdb->get_results("SELECT meta_key, meta_value FROM $table WHERE post_id=$pid");
1453
 
1454
  foreach ($post_meta_infos as $meta_info) {
1455
+ if (in_array($meta_info->meta_key, array('_regular_price', '_sale_price', '_sale_price_dates_from', '_sale_price_dates_from', '_sale_price_dates_to', '_price', '_stock'))){
1456
  $this->pushmeta($pid, $meta_info->meta_key . '_tmp', $meta_info->meta_value);
1457
  }
1458
  }
1468
  $post_meta_infos = $this->wpdb->get_results("SELECT meta_key, meta_value FROM $table WHERE post_id=$pid");
1469
 
1470
  foreach ($post_meta_infos as $meta_info) {
1471
+ if (in_array($meta_info->meta_key, array('_regular_price_tmp', '_sale_price_tmp', '_sale_price_dates_from_tmp', '_sale_price_dates_from_tmp', '_sale_price_dates_to_tmp', '_price_tmp', '_stock_tmp'))){
1472
  $this->pushmeta($pid, str_replace('_tmp', '', $meta_info->meta_key), $meta_info->meta_value);
1473
  delete_post_meta( $pid, $meta_info->meta_key );
1474
  }
1536
  }
1537
  }
1538
  }
1539
+ }
1540
+
1541
+ function pmwi_link_all_variations($product_id, $options = array()) {
1542
+
1543
+ global $woocommerce;
1544
+
1545
+ @set_time_limit(0);
1546
+
1547
+ $post_id = intval( $product_id );
1548
+
1549
+ if ( ! $post_id ) return 0;
1550
+
1551
+ $variations = array();
1552
+
1553
+ $_product = get_product( $post_id, array( 'product_type' => 'variable' ) );
1554
+
1555
+ $v = $_product->get_attributes();
1556
+
1557
+ // Put variation attributes into an array
1558
+ foreach ( $_product->get_attributes() as $attribute ) {
1559
+
1560
+ if ( ! $attribute['is_variation'] ) continue;
1561
+
1562
+ $attribute_field_name = 'attribute_' . sanitize_title( $attribute['name'] );
1563
+
1564
+ if ( $attribute['is_taxonomy'] ) {
1565
+ $post_terms = wp_get_post_terms( $post_id, $attribute['name'] );
1566
+ $options = array();
1567
+ foreach ( $post_terms as $term ) {
1568
+ $options[] = $term->slug;
1569
+ }
1570
+ } else {
1571
+ $options = explode( '|', $attribute['value'] );
1572
+ }
1573
+
1574
+ $options = array_map( 'sanitize_title', array_map( 'trim', $options ) );
1575
+
1576
+ $variations[ $attribute_field_name ] = $options;
1577
+ }
1578
+
1579
+ // Quit out if none were found
1580
+ if ( sizeof( $variations ) == 0 ) return 0;
1581
+
1582
+ // Get existing variations so we don't create duplicates
1583
+ $available_variations = array();
1584
+
1585
+ foreach( $_product->get_children() as $child_id ) {
1586
+ $child = $_product->get_child( $child_id );
1587
+
1588
+ if ( ! empty( $child->variation_id ) ) {
1589
+ $available_variations[] = $child->get_variation_attributes();
1590
+
1591
+ update_post_meta( $child->variation_id, '_regular_price', get_post_meta( $post_id, '_regular_price', true ) );
1592
+ update_post_meta( $child->variation_id, '_sale_price', get_post_meta( $post_id, '_sale_price', true ) );
1593
+ if ( class_exists('woocommerce_wholesale_pricing') ) update_post_meta( $child->variation_id, 'pmxi_wholesale_price', get_post_meta( $post_id, 'pmxi_wholesale_price', true ) );
1594
+ update_post_meta( $child->variation_id, '_sale_price_dates_from', get_post_meta( $post_id, '_sale_price_dates_from', true ) );
1595
+ update_post_meta( $child->variation_id, '_sale_price_dates_to', get_post_meta( $post_id, '_sale_price_dates_to', true ) );
1596
+ update_post_meta( $child->variation_id, '_price', get_post_meta( $post_id, '_price', true ) );
1597
+ update_post_meta( $child->variation_id, '_stock', get_post_meta( $post_id, '_stock', true ) );
1598
+ update_post_meta( $child->variation_id, '_stock_status', get_post_meta( $post_id, '_stock_status', true ) );
1599
+ update_post_meta( $child->variation_id, '_manage_stock', get_post_meta( $post_id, '_manage_stock', true ) );
1600
+ update_post_meta( $child->variation_id, '_backorders', get_post_meta( $post_id, '_backorders', true ) );
1601
+ }
1602
+ }
1603
+
1604
+ // Created posts will all have the following data
1605
+ $variation_post_data = array(
1606
+ 'post_title' => 'Product #' . $post_id . ' Variation',
1607
+ 'post_content' => '',
1608
+ 'post_status' => 'publish',
1609
+ 'post_author' => get_current_user_id(),
1610
+ 'post_parent' => $post_id,
1611
+ 'post_type' => 'product_variation'
1612
+ );
1613
+
1614
+ $variation_ids = array();
1615
+ $added = 0;
1616
+ $possible_variations = $this->array_cartesian( $variations );
1617
+
1618
+ foreach ( $possible_variations as $variation ) {
1619
+
1620
+ // Check if variation already exists
1621
+ if ( in_array( $variation, $available_variations ) )
1622
+ continue;
1623
+
1624
+ $variation_id = wp_insert_post( $variation_post_data );
1625
+
1626
+ update_post_meta( $variation_id, '_regular_price', get_post_meta( $post_id, '_regular_price', true ) );
1627
+ update_post_meta( $variation_id, '_sale_price', get_post_meta( $post_id, '_sale_price', true ) );
1628
+ if ( class_exists('woocommerce_wholesale_pricing') ) update_post_meta( $variation_id, 'pmxi_wholesale_price', get_post_meta( $post_id, 'pmxi_wholesale_price', true ) );
1629
+ update_post_meta( $variation_id, '_sale_price_dates_from', get_post_meta( $post_id, '_sale_price_dates_from', true ) );
1630
+ update_post_meta( $variation_id, '_sale_price_dates_to', get_post_meta( $post_id, '_sale_price_dates_to', true ) );
1631
+ update_post_meta( $variation_id, '_price', get_post_meta( $post_id, '_price', true ) );
1632
+ update_post_meta( $variation_id, '_stock', get_post_meta( $post_id, '_stock', true ) );
1633
+ update_post_meta( $variation_id, '_stock_status', get_post_meta( $post_id, '_stock_status', true ) );
1634
+ update_post_meta( $variation_id, '_manage_stock', get_post_meta( $post_id, '_manage_stock', true ) );
1635
+ update_post_meta( $variation_id, '_backorders', get_post_meta( $post_id, '_backorders', true ) );
1636
+
1637
+
1638
+ $variation_ids[] = $variation_id;
1639
+
1640
+ foreach ( $variation as $key => $value ) {
1641
+ update_post_meta( $variation_id, $key, $value );
1642
+ }
1643
+
1644
+ $added++;
1645
+
1646
+ //do_action( 'product_variation_linked', $variation_id );
1647
+
1648
+ }
1649
+
1650
+ $children = get_posts( array(
1651
+ 'post_parent' => $post_id,
1652
+ 'posts_per_page'=> -1,
1653
+ 'post_type' => 'product_variation',
1654
+ 'fields' => 'ids',
1655
+ 'orderby' => 'ID',
1656
+ 'order' => 'ASC',
1657
+ 'post_status' => array('draft', 'publish', 'trash', 'pending', 'future', 'private')
1658
+ ) );
1659
+
1660
+ // $total_instock = 0;
1661
+
1662
+ // if ( $children ) {
1663
+ // foreach ( $children as $n => $child ) {
1664
+ // $_variation_stock = get_post_meta($child, '_stock_status', true);
1665
+
1666
+ // $total_instock += ($_variation_stock == 'instock') ? 1 : 0;
1667
+ // }
1668
+ // }
1669
+
1670
+ // $this->pushmeta($post_id, '_stock_status', ($total_instock > 0) ? 'instock' : 'outofstock');
1671
+
1672
+ $default_attributes = array();
1673
+ foreach ( $v as $attribute ) {
1674
+
1675
+ $default_attributes[ sanitize_title($attribute['name']) ] = array();
1676
+
1677
+ $values = array();
1678
+
1679
+ foreach ( $children as $child ) {
1680
+
1681
+ $value = array_map( 'stripslashes', array_map( 'strip_tags', explode("|", trim( get_post_meta($child, 'attribute_'.sanitize_title($attribute['name']), true)))));
1682
+
1683
+ if ( ! empty($value) ){
1684
+ //$this->pushmeta($child, 'attribute_' . sanitize_title( $attribute['name'] ), $value[0]);
1685
+ foreach ($value as $val) {
1686
+ if ( ! in_array($val, $values, true) ) $values[] = $val;
1687
+ }
1688
+ }
1689
+
1690
+ if ( $attribute['is_variation'] ) {
1691
+
1692
+ if ( ! empty($values) and empty($default_attributes[ $attribute['name'] ])){
1693
+ switch ($this->options['default_attributes_type']) {
1694
+ case 'instock':
1695
+ $is_instock = get_post_meta($child, '_stock_status', true);
1696
+ if ($is_instock == 'instock'){
1697
+ $default_attributes[ sanitize_title($attribute['name']) ] = sanitize_title((is_array($value)) ? $value[0] : $value);
1698
+ }
1699
+ break;
1700
+ case 'first':
1701
+ $default_attributes[ sanitize_title($attribute['name']) ] = sanitize_title((is_array($values)) ? $values[0] : $values);
1702
+ break;
1703
+
1704
+ default:
1705
+ # code...
1706
+ break;
1707
+ }
1708
+ }
1709
+ }
1710
+ }
1711
+ }
1712
+
1713
+ if ($this->options['is_default_attributes']) $this->pushmeta($post_id, '_default_attributes', $default_attributes);
1714
+
1715
+ wc_delete_product_transients( $post_id );
1716
+
1717
+ return $added;
1718
+ }
1719
+
1720
+
1721
+ function array_cartesian( $input ) {
1722
+
1723
+ $result = array();
1724
+
1725
+ while ( list( $key, $values ) = each( $input ) ) {
1726
+ // If a sub-array is empty, it doesn't affect the cartesian product
1727
+ if ( empty( $values ) ) {
1728
+ continue;
1729
+ }
1730
+
1731
+ // Special case: seeding the product array with the values from the first sub-array
1732
+ if ( empty( $result ) ) {
1733
+ foreach ( $values as $value ) {
1734
+ $result[] = array( $key => $value );
1735
+ }
1736
+ }
1737
+ else {
1738
+ // Second and subsequent input sub-arrays work like this:
1739
+ // 1. In each existing array inside $product, add an item with
1740
+ // key == $key and value == first item in input sub-array
1741
+ // 2. Then, for each remaining item in current input sub-array,
1742
+ // add a copy of each existing array inside $product with
1743
+ // key == $key and value == first item in current input sub-array
1744
+
1745
+ // Store all items to be added to $product here; adding them on the spot
1746
+ // inside the foreach will result in an infinite loop
1747
+ $append = array();
1748
+ foreach( $result as &$product ) {
1749
+ // Do step 1 above. array_shift is not the most efficient, but it
1750
+ // allows us to iterate over the rest of the items with a simple
1751
+ // foreach, making the code short and familiar.
1752
+ $product[ $key ] = array_shift( $values );
1753
+
1754
+ // $product is by reference (that's why the key we added above
1755
+ // will appear in the end result), so make a copy of it here
1756
+ $copy = $product;
1757
+
1758
+ // Do step 2 above.
1759
+ foreach( $values as $item ) {
1760
+ $copy[ $key ] = $item;
1761
+ $append[] = $copy;
1762
+ }
1763
+
1764
+ // Undo the side effecst of array_shift
1765
+ array_unshift( $values, $product[ $key ] );
1766
+ }
1767
+
1768
+ // Out of the foreach, we can add to $results now
1769
+ $result = array_merge( $result, $append );
1770
+ }
1771
+ }
1772
+
1773
+ return $result;
1774
+ }
1775
 
1776
  public function _filter_has_cap_unfiltered_html($caps)
1777
  {
1870
 
1871
  function prepare_price( $price ){
1872
 
1873
+ return pmwi_prepare_price( $price, $this->options['disable_prepare_price'], $this->options['prepare_price_to_woo_format'], $this->options['convert_decimal_separator'] );
1874
 
1875
  }
1876
 
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP All Import - WooCommerce Add-On
4
  Plugin URI: http://www.wpallimport.com/
5
  Description: An extremely easy, drag & drop importer to import WooCommerce simple products. A paid upgrade is available for premium support and support for Variable, Grouped, and External/Affiliate products
6
- Version: 1.2.4
7
  Author: Soflyy
8
  */
9
  /**
@@ -24,7 +24,7 @@ define('PMWI_ROOT_URL', rtrim(plugin_dir_url(__FILE__), '/'));
24
  */
25
  define('PMWI_PREFIX', 'pmwi_');
26
 
27
- define('PMWI_FREE_VERSION', '1.2.4');
28
 
29
  define('PMWI_EDITION', 'free');
30
 
@@ -477,6 +477,17 @@ final class PMWI_Plugin {
477
  'is_visible' => array(),
478
  'is_taxonomy' => array(),
479
  'create_taxonomy_in_not_exists' => array(),
 
 
 
 
 
 
 
 
 
 
 
480
  'single_product_purchase_note' => '',
481
  'single_product_menu_order' => 0,
482
  'is_product_enable_reviews' => 'no',
@@ -573,6 +584,7 @@ final class PMWI_Plugin {
573
  'disable_sku_matching' => 1,
574
  'disable_prepare_price' => 1,
575
  'prepare_price_to_woo_format' => 0,
 
576
  'grouping_indicator' => 'xpath',
577
  'custom_grouping_indicator_name' => '',
578
  'custom_grouping_indicator_value' => '',
3
  Plugin Name: WP All Import - WooCommerce Add-On
4
  Plugin URI: http://www.wpallimport.com/
5
  Description: An extremely easy, drag & drop importer to import WooCommerce simple products. A paid upgrade is available for premium support and support for Variable, Grouped, and External/Affiliate products
6
+ Version: 1.2.5
7
  Author: Soflyy
8
  */
9
  /**
24
  */
25
  define('PMWI_PREFIX', 'pmwi_');
26
 
27
+ define('PMWI_FREE_VERSION', '1.2.5');
28
 
29
  define('PMWI_EDITION', 'free');
30
 
477
  'is_visible' => array(),
478
  'is_taxonomy' => array(),
479
  'create_taxonomy_in_not_exists' => array(),
480
+
481
+ 'is_advanced' => array(),
482
+ 'advanced_in_variations' => array(),
483
+ 'advanced_in_variations_xpath' => array(),
484
+ 'advanced_is_visible' => array(),
485
+ 'advanced_is_visible_xpath' => array(),
486
+ 'advanced_is_taxonomy' => array(),
487
+ 'advanced_is_taxonomy_xpath' => array(),
488
+ 'advanced_is_create_terms' => array(),
489
+ 'advanced_is_create_terms_xpath' => array(),
490
+
491
  'single_product_purchase_note' => '',
492
  'single_product_menu_order' => 0,
493
  'is_product_enable_reviews' => 'no',
584
  'disable_sku_matching' => 1,
585
  'disable_prepare_price' => 1,
586
  'prepare_price_to_woo_format' => 0,
587
+ 'convert_decimal_separator' => 1,
588
  'grouping_indicator' => 'xpath',
589
  'custom_grouping_indicator_name' => '',
590
  'custom_grouping_indicator_value' => '',
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: soflyy, wpallimport
3
  Requires at least: 4.1
4
  Tested up to: 4.3
5
- Stable tag: 1.2.4
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
  Tags: woocommerce xml import, woocommerce csv import, woocommerce, import, xml, csv, wp all import, csv import, import csv, xml import, import xml, woocommerce csv importer, woocommerce xml importer, csv importer, csv import suite
@@ -83,6 +83,11 @@ The WooCommerce add-on will appear in the Step 4 of WP All Import.
83
 
84
  == Changelog ==
85
 
 
 
 
 
 
86
  = 1.2.4 =
87
  * added Variation Description field
88
  * added auto create shipping classes
2
  Contributors: soflyy, wpallimport
3
  Requires at least: 4.1
4
  Tested up to: 4.3
5
+ Stable tag: 1.2.5
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
  Tags: woocommerce xml import, woocommerce csv import, woocommerce, import, xml, csv, wp all import, csv import, import csv, xml import, import xml, woocommerce csv importer, woocommerce xml importer, csv importer, csv import suite
83
 
84
  == Changelog ==
85
 
86
+ = 1.2.5 =
87
+ * fixed conflict between options [update only these custom fields & update only these attributes]
88
+ * added feature to dynamically set attribute options
89
+ * added new option "Convert decimal separator to a period"
90
+
91
  = 1.2.4 =
92
  * added Variation Description field
93
  * added auto create shipping classes
static/css/admin.css CHANGED
@@ -62,11 +62,15 @@
62
  .wpallimport-plugin .in_variations select, .wpallimport-plugin .is_visible select, .wpallimport-plugin .is_taxonomy select{
63
  float:none !important;
64
  }
65
- .wpallimport-plugin .in_variations, .wpallimport-plugin .is_visible, .wpallimport-plugin .is_taxonomy, .wpallimport-plugin .is_create_taxonomy{
66
  display: block;
67
  float: left;
68
- margin-top: 10px;
69
- margin-left: 5px;
 
 
 
 
70
  }
71
  .wpallimport-plugin .in_variations label, .wpallimport-plugin .is_visible label, .wpallimport-plugin .is_taxonomy label{
72
  width: 80px;
@@ -321,4 +325,60 @@
321
  position: relative;
322
  z-index: 9999999;
323
  display: block;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  }
62
  .wpallimport-plugin .in_variations select, .wpallimport-plugin .is_visible select, .wpallimport-plugin .is_taxonomy select{
63
  float:none !important;
64
  }
65
+ .wpallimport-plugin .in_variations, .wpallimport-plugin .is_visible, .wpallimport-plugin .is_taxonomy{
66
  display: block;
67
  float: left;
68
+ margin: 5px 0 0 5px;
69
+ }
70
+ .wpallimport-plugin .is_create_taxonomy {
71
+ display: block;
72
+ float: left;
73
+ margin: 5px 0 15px 5px;
74
  }
75
  .wpallimport-plugin .in_variations label, .wpallimport-plugin .is_visible label, .wpallimport-plugin .is_taxonomy label{
76
  width: 80px;
325
  position: relative;
326
  z-index: 9999999;
327
  display: block;
328
+ }
329
+ .wpallimport-plugin .advanced_attributes{
330
+ display: inline-block;
331
+ float: left;
332
+ width: 16px;
333
+ height: 16px;
334
+ margin: 6px 3px 0px 3px;
335
+ }
336
+ .wpallimport-plugin .advanced_attributes{
337
+ font-size: 12px;
338
+ width:100%;
339
+ height:25px;
340
+ color:#21759B;
341
+ font-family: "Open Sans",​sans-serif;
342
+ padding-top: 2px;
343
+ text-decoration: underline;
344
+ /*margin: 0 auto; */
345
+ }
346
+ .wpallimport-plugin .advanced_attributes span{
347
+ font-size: 16px;
348
+ position: relative;
349
+ top: 1px;
350
+ }
351
+ .wpallimport-plugin .advanced_attribute_settings{
352
+ clear: both;
353
+ display: none;
354
+ margin-bottom: 10px;
355
+ padding-bottom: 5px;
356
+ border-bottom: 1px solid #e5e5e5;
357
+ }
358
+ .wpallimport-plugin .advanced_attribute_settings div.input{
359
+ clear: both;
360
+ vertical-align: top;
361
+ }
362
+
363
+ .wpallimport-plugin .advanced_attribute_settings>div.input {
364
+ width: 40%;
365
+ min-width: 170px;
366
+ margin-top: 10px;
367
+ }
368
+
369
+ .wpallimport-plugin .advanced_attribute_settings>div.input:nth-child(3),
370
+ .wpallimport-plugin .advanced_attribute_settings>div.input:nth-child(4){
371
+ margin-top: 15px;
372
+ }
373
+ .wpallimport-plugin .advanced_attribute_settings div.input label{
374
+ top: -7px !important;
375
+ }
376
+ .wpallimport-plugin .advanced_attribute_settings input[type="text"]{
377
+ font-size: 12px !important;
378
+ height: 30px !important;
379
+ /*float: right;*/
380
+ /*width: 120px;*/
381
+ }
382
+ .wpallimport-plugin .advanced_attribute_settings input[type="radio"]{
383
+ float: left;
384
  }
static/js/admin.js CHANGED
@@ -222,7 +222,7 @@
222
  });
223
 
224
 
225
- $('.variation_attributes, #woocommerce_attributes').find('label').live({
226
  mouseenter:
227
  function()
228
  {
@@ -232,6 +232,8 @@
232
 
233
  $(this).parents('span:first').find('input').attr('id', $(this).parents('span:first').find('input').attr('name').replace('[]','') + '_' + counter );
234
  $(this).attr('for', $(this).parents('span:first').find('input').attr('id'));
 
 
235
  }
236
  },
237
  mouseleave:
@@ -241,6 +243,46 @@
241
  }
242
  });
243
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  $('#variations_tag').draggable({ containment: "#wpwrap", zIndex: 100 }).hide();
245
 
246
  $('#toggle_xml_tree').click(function(){
@@ -302,20 +344,30 @@
302
  $('.pmwi_adjust_prices').slideToggle();
303
  });
304
 
305
- $('.form-field, .main_choise').live('click', function(){
306
- if ($(this).find('input:first').attr('disabled') == 'disabled'){
307
- var $el = $(".upgrade_template:visible"),
308
- x = 100,
309
- originalColor = $el.css("background"),
310
- i = 2; //counter
311
-
312
- (function loop() { //recurisve IIFE
313
- $el.css("background", "#FF8383");
314
- setTimeout(function () {
315
- $el.css("background", originalColor);
316
- if (--i) setTimeout(loop, x); //restart loop
317
- }, x);
318
- }());
 
 
 
 
 
 
 
 
 
 
319
  }
320
  });
321
 
222
  });
223
 
224
 
225
+ $('.variation_attributes').find('label').live({
226
  mouseenter:
227
  function()
228
  {
232
 
233
  $(this).parents('span:first').find('input').attr('id', $(this).parents('span:first').find('input').attr('name').replace('[]','') + '_' + counter );
234
  $(this).attr('for', $(this).parents('span:first').find('input').attr('id'));
235
+ var $create_terms = $(this).parents('.wpallimport-radio-field:first').find('.is_create_taxonomy');
236
+ if ( ! $create_terms.hasClass('switcher-target-is_taxonomy_' + counter)) $create_terms.addClass('switcher-target-is_taxonomy_' + counter);
237
  }
238
  },
239
  mouseleave:
243
  }
244
  });
245
 
246
+ $('.add-new-custom').click(function(){
247
+
248
+ var counter = $(this).parents('table:first').find('tr.form-field:visible').length - 1;
249
+
250
+ $('#woocommerce_attributes').find('.default_attribute_settings').find('label').each(function(){
251
+ if ( "" == $(this).attr('for') )
252
+ {
253
+ var $parent = $(this).parents('tr.form-field:first');
254
+ if ( ! $parent.hasClass('template'))
255
+ {
256
+ $(this).parents('span:first').find('input').attr('id', $(this).parents('span:first').find('input').attr('name').replace('[]','') + '_' + counter );
257
+ $(this).attr('for', $(this).parents('span:first').find('input').attr('id'));
258
+ var $create_terms = $(this).parents('.wpallimport-radio-field:first').find('.is_create_taxonomy');
259
+ if ( ! $create_terms.hasClass('switcher-target-is_taxonomy_' + counter)) $create_terms.addClass('switcher-target-is_taxonomy_' + counter);
260
+ }
261
+ }
262
+ });
263
+
264
+ $('#woocommerce_attributes').find('.advanced_settings_template').each(function(){
265
+ var $tpl = $(this).parents('tr.form-field:first');
266
+ if ( ! $tpl.hasClass('template'))
267
+ {
268
+ $(this).find('label').each(function(){
269
+ $(this).attr('for', $(this).attr('for').replace('00', counter));
270
+ });
271
+ $(this).find('input').each(function(){
272
+ if (typeof $(this).attr('id') != "undefined") $(this).attr('id', $(this).attr('id').replace('00', counter));
273
+ $(this).attr('name', $(this).attr('name').replace('00', counter));
274
+ });
275
+ $(this).find('div.set_with_xpath').each(function(){
276
+ var $parent = $(this).parents('.wpallimport-radio-field:first');
277
+ $(this).addClass('switcher-target-' + $parent.find('input.switcher').attr('id'));
278
+ $parent.find('input.switcher').change();
279
+ });
280
+ $(this).removeClass('advanced_settings_template');
281
+ }
282
+ });
283
+
284
+ });
285
+
286
  $('#variations_tag').draggable({ containment: "#wpwrap", zIndex: 100 }).hide();
287
 
288
  $('#toggle_xml_tree').click(function(){
344
  $('.pmwi_adjust_prices').slideToggle();
345
  });
346
 
347
+ $('.advanced_attributes').live('click', function(){
348
+ var $parent = $(this).parent('div.wpallimport-radio-field:first');
349
+
350
+ if ($(this).find('span').html() == "+")
351
+ {
352
+ $parent.find('.default_attribute_settings').hide();
353
+ $parent.find('.advanced_attribute_settings').fadeIn();
354
+ $parent.find('input[name^=is_advanced]').val('1');
355
+ $(this).find('span').html("-");
356
+ }
357
+ else
358
+ {
359
+ $parent.find('.advanced_attribute_settings').hide();
360
+ $parent.find('.default_attribute_settings').fadeIn();
361
+ $parent.find('input[name^=is_advanced]').val('0');
362
+ $(this).find('span').html("+");
363
+ }
364
+ });
365
+
366
+ $('input[name^=is_advanced]').each(function(){
367
+ if ($(this).val() == '1')
368
+ {
369
+ var $parent = $(this).parent('div.wpallimport-radio-field:first');
370
+ $parent.find('.advanced_attributes').click();
371
  }
372
  });
373
 
views/admin/import/_tabs/_attributes.php CHANGED
@@ -26,27 +26,126 @@
26
  <td style="width: 50%;">
27
  <input type="text" class="widefat" name="attribute_value[]" value="<?php echo str_replace("&amp;","&", htmlentities(htmlentities($post['attribute_value'][$i]))); ?>" style="width:100%;"/>
28
  <span class="wpallimport-clear"></span>
29
- <p class="form-field wpallimport-radio-field" style="padding: 0 !important; position: relative; left: -100%; width: 200%;">
30
- <span class='in_variations'>
31
- <input type="checkbox" name="in_variations[]" id="in_variations_<?php echo $i; ?>" <?php echo ($post['in_variations'][$i]) ? 'checked="checked"' : ''; ?> style="float: left;" value="1"/>
32
- <label for="in_variations_<?php echo $i; ?>"><?php _e('In Variations','pmxi_plugin');?></label>
33
- </span>
34
 
35
- <span class='is_visible'>
36
- <input type="checkbox" name="is_visible[]" id="is_visible_<?php echo $i; ?>" <?php echo ($post['is_visible'][$i]) ? 'checked="checked"' : ''; ?> style="float: left;" value="1"/>
37
- <label for="is_visible_<?php echo $i; ?>"><?php _e('Is Visible','pmxi_plugin');?></label>
38
- </span>
 
 
 
 
 
 
 
 
 
 
 
39
 
40
- <span class='is_taxonomy'>
41
- <input type="checkbox" name="is_taxonomy[]" id="is_taxonomy_<?php echo $i; ?>" <?php echo ($post['is_taxonomy'][$i]) ? 'checked="checked"' : ''; ?> style="float: left;" value="1"/>
42
- <label for="is_taxonomy_<?php echo $i; ?>"><?php _e('Taxonomy','pmxi_plugin');?></label>
 
43
  </span>
44
 
45
- <span class='is_create_taxonomy'>
46
- <input type="checkbox" name="create_taxonomy_in_not_exists[]" id="create_taxonomy_in_not_exists_<?php echo $i; ?>" <?php echo ($post['create_taxonomy_in_not_exists'][$i]) ? 'checked="checked"' : ''; ?> style="float: left;" value="1"/>
47
- <label for="create_taxonomy_in_not_exists_<?php echo $i; ?>"><?php _e('Auto-Create Terms','pmxi_plugin');?></label>
48
- </span>
49
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  </td>
51
  <td class="action remove"><a href="#remove" style="top:9px;"></a></td>
52
  </tr>
@@ -59,24 +158,123 @@
59
  <td style="width: 50%;">
60
  <input type="text" name="attribute_value[]" class="widefat" vaalue="" style="width:100%;"/>
61
  <span class="wpallimport-clear"></span>
62
- <p class="form-field wpallimport-radio-field" style="padding: 0 !important; position: relative; left: -100%; width: 200%;">
63
- <span class='in_variations'>
64
- <input type="checkbox" name="in_variations[]" id="in_variations_0" checked="checked" style="float: left;" value="1"/>
65
- <label for="in_variations_0"><?php _e('In Variations','pmxi_plugin');?></label>
66
- </span>
67
- <span class='is_visible'>
68
- <input type="checkbox" name="is_visible[]" id="is_visible_0" checked="checked" style="float: left;" value="1"/>
69
- <label for="is_visible_0"><?php _e('Is Visible','pmxi_plugin');?></label>
70
- </span>
71
- <span class='is_taxonomy'>
72
- <input type="checkbox" name="is_taxonomy[]" id="is_taxonomy_0" checked="checked" style="float: left;" value="1"/>
73
- <label for="is_taxonomy_0"><?php _e('Taxonomy','pmxi_plugin');?></label>
74
- </span>
75
- <span class='is_create_taxonomy'>
76
- <input type="checkbox" name="create_taxonomy_in_not_exists[]" id="create_taxonomy_in_not_exists_0" checked="checked" style="float: left;" value="1"/>
77
- <label for="create_taxonomy_in_not_exists_0"><?php _e('Auto-Create Terms','pmxi_plugin');?></label>
 
 
 
 
 
 
78
  </span>
79
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  </td>
81
  <td class="action remove"><a href="#remove" style="top: 9px;"></a></td>
82
  </tr>
@@ -88,24 +286,123 @@
88
  <td style="width: 50%;">
89
  <input type="text" name="attribute_value[]" class="widefat" value="" style="width:100%;"/>
90
  <span class="wpallimport-clear"></span>
91
- <p class="form-field wpallimport-radio-field" style="padding: 0 !important; position: relative; left: -100%; width: 200%;">
92
- <span class='in_variations'>
93
- <input type="checkbox" name="in_variations[]" checked="checked" style="float: left;" value="1"/>
94
- <label for=""><?php _e('In Variations','pmxi_plugin');?></label>
95
- </span>
96
- <span class='is_visible'>
97
- <input type="checkbox" name="is_visible[]" checked="checked" style="float: left;" value="1"/>
98
- <label for=""><?php _e('Is Visible','pmxi_plugin');?></label>
99
- </span>
100
- <span class='is_taxonomy'>
101
- <input type="checkbox" name="is_taxonomy[]" checked="checked" style="float: left;" value="1"/>
102
- <label for=""><?php _e('Taxonomy','pmxi_plugin');?></label>
 
 
 
 
 
 
 
 
 
 
103
  </span>
104
- <span class='is_create_taxonomy'>
105
- <input type="checkbox" name="create_taxonomy_in_not_exists[]" checked="checked" style="float: left;" value="1"/>
106
- <label for=""><?php _e('Auto-Create Terms','pmxi_plugin');?></label>
107
- </span>
108
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  </td>
110
  <td class="action remove"><a href="#remove" style="top: 9px;"></a></td>
111
  </tr>
26
  <td style="width: 50%;">
27
  <input type="text" class="widefat" name="attribute_value[]" value="<?php echo str_replace("&amp;","&", htmlentities(htmlentities($post['attribute_value'][$i]))); ?>" style="width:100%;"/>
28
  <span class="wpallimport-clear"></span>
29
+ <div class="form-field wpallimport-radio-field" style="padding: 0 !important; position: relative; left: -100%; width: 200%;">
30
+
31
+ <a href="javascript:void(0);" id="advanced_attributes_<?php echo $i; ?>" class="action advanced_attributes"><span>+</span> <?php _e('Advanced', 'pmxi_plugin') ?></a>
32
+ <input type="hidden" value="<?php echo (empty($post['is_advanced'][$i])) ? '0' : $post['is_advanced'][$i];?>" name="is_advanced[]">
 
33
 
34
+ <span class="default_attribute_settings">
35
+ <span class='in_variations'>
36
+ <input type="checkbox" name="in_variations[]" id="in_variations_<?php echo $i; ?>" <?php echo ($post['in_variations'][$i]) ? 'checked="checked"' : ''; ?> style="float: left;" value="1"/>
37
+ <label for="in_variations_<?php echo $i; ?>"><?php _e('In Variations','pmxi_plugin');?></label>
38
+ </span>
39
+
40
+ <span class='is_visible'>
41
+ <input type="checkbox" name="is_visible[]" id="is_visible_<?php echo $i; ?>" <?php echo ($post['is_visible'][$i]) ? 'checked="checked"' : ''; ?> style="float: left;" value="1"/>
42
+ <label for="is_visible_<?php echo $i; ?>"><?php _e('Is Visible','pmxi_plugin');?></label>
43
+ </span>
44
+
45
+ <span class='is_taxonomy'>
46
+ <input type="checkbox" name="is_taxonomy[]" id="is_taxonomy_<?php echo $i; ?>" <?php echo ($post['is_taxonomy'][$i]) ? 'checked="checked"' : ''; ?> style="float: left;" value="1" class="switcher"/>
47
+ <label for="is_taxonomy_<?php echo $i; ?>"><?php _e('Is Taxonomy','pmxi_plugin');?></label>
48
+ </span>
49
 
50
+ <span class='is_create_taxonomy switcher-target-is_taxonomy_<?php echo $i; ?>'>
51
+ <input type="checkbox" name="create_taxonomy_in_not_exists[]" id="create_taxonomy_in_not_exists_<?php echo $i; ?>" <?php echo ($post['create_taxonomy_in_not_exists'][$i]) ? 'checked="checked"' : ''; ?> style="float: left;" value="1"/>
52
+ <label for="create_taxonomy_in_not_exists_<?php echo $i; ?>"><?php _e('Auto-Create Terms','pmxi_plugin');?></label>
53
+ </span>
54
  </span>
55
 
56
+ <div class="advanced_attribute_settings">
57
+
58
+ <div class="input" style="display:inline-block;">
59
+ <div class="input">
60
+ <input type="radio" id="advanced_in_variations_yes_<?php echo $i; ?>" class="switcher" name="advanced_in_variations[<?php echo $i; ?>]" value="yes" <?php echo ( empty($post['advanced_in_variations'][$i]) or ( ! empty($post['advanced_in_variations'][$i]) and ! in_array($post['advanced_in_variations'][$i], array('no', 'xpath'))) ) ? 'checked="checked"': '' ?>/>
61
+ <label for="advanced_in_variations_yes_<?php echo $i; ?>"><?php _e("In Variations"); ?></label>
62
+ </div>
63
+ <div class="input">
64
+ <input type="radio" id="advanced_in_variations_no_<?php echo $i; ?>" class="switcher" name="advanced_in_variations[<?php echo $i; ?>]" value="no" <?php echo (!empty($post['advanced_in_variations'][$i]) and 'no' == $post['advanced_in_variations'][$i]) ? 'checked="checked"': '' ?>/>
65
+ <label for="advanced_in_variations_no_<?php echo $i; ?>"><?php _e("Not In Variations"); ?></label>
66
+ </div>
67
+ <div class="input wpallimport-radio-field">
68
+ <input type="radio" id="advanced_in_variations_xpath_<?php echo $i; ?>" class="switcher" name="advanced_in_variations[<?php echo $i; ?>]" value="xpath" <?php echo (!empty($post['advanced_in_variations'][$i]) and 'xpath' == $post['advanced_in_variations'][$i]) ? 'checked="checked"': '' ?>/>
69
+ <label for="advanced_in_variations_xpath_<?php echo $i; ?>"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
70
+ <span class="wpallimport-clear"></span>
71
+ <div class="switcher-target-advanced_in_variations_xpath_<?php echo $i; ?> set_with_xpath">
72
+ <span class="wpallimport-slide-content" style="padding-left:0;">
73
+ <input type="text" class="smaller-text" name="advanced_in_variations_xpath[<?php echo $i; ?>]" value="<?php echo (!empty($post['advanced_in_variations_xpath'][$i])) ? esc_attr($post['advanced_in_variations_xpath'][$i]) : ''; ?>"/>
74
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
75
+ </span>
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+ <div class="input" style="display:inline-block;">
81
+ <div class="input">
82
+ <input type="radio" id="advanced_is_visible_yes_<?php echo $i; ?>" class="switcher" name="advanced_is_visible[<?php echo $i; ?>]" value="yes" <?php echo ( empty($post['advanced_is_visible'][$i]) or ( ! empty($post['advanced_is_visible'][$i]) and ! in_array($post['advanced_is_visible'][$i], array('no', 'xpath'))) ) ? 'checked="checked"': '' ?>/>
83
+ <label for="advanced_is_visible_yes_<?php echo $i; ?>"><?php _e("Is Visible"); ?></label>
84
+ </div>
85
+ <div class="input">
86
+ <input type="radio" id="advanced_is_visible_no_<?php echo $i; ?>" class="switcher" name="advanced_is_visible[<?php echo $i; ?>]" value="no" <?php echo (!empty($post['advanced_is_visible'][$i]) and 'no' == $post['advanced_is_visible'][$i]) ? 'checked="checked"': '' ?>/>
87
+ <label for="advanced_is_visible_no_<?php echo $i; ?>"><?php _e("Not Visible"); ?></label>
88
+ </div>
89
+ <div class="input wpallimport-radio-field">
90
+ <input type="radio" id="advanced_is_visible_xpath_<?php echo $i; ?>" class="switcher" name="advanced_is_visible[<?php echo $i; ?>]" value="xpath" <?php echo (!empty($post['advanced_is_visible'][$i]) and 'xpath' == $post['advanced_is_visible'][$i]) ? 'checked="checked"': '' ?>/>
91
+ <label for="advanced_is_visible_xpath_<?php echo $i; ?>"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
92
+ <span class="wpallimport-clear"></span>
93
+ <div class="switcher-target-advanced_is_visible_xpath_<?php echo $i; ?> set_with_xpath">
94
+ <span class="wpallimport-slide-content" style="padding-left:0;">
95
+ <input type="text" class="smaller-text" name="advanced_is_visible_xpath[<?php echo $i; ?>]" value="<?php echo (!empty($post['advanced_is_visible_xpath'][$i])) ? esc_attr($post['advanced_is_visible_xpath'][$i]) : ''; ?>"/>
96
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
97
+ </span>
98
+ </div>
99
+ </div>
100
+ </div>
101
+
102
+ <div class="input" style="display:inline-block;">
103
+ <div class="input">
104
+ <input type="radio" id="advanced_is_taxonomy_yes_<?php echo $i; ?>" class="switcher" name="advanced_is_taxonomy[<?php echo $i; ?>]" value="yes" <?php echo (empty($post['advanced_is_taxonomy'][$i]) or ( !empty($post['advanced_is_taxonomy'][$i]) and ! in_array($post['advanced_is_taxonomy'][$i], array('no', 'xpath'))) ) ? 'checked="checked"': '' ?>/>
105
+ <label for="advanced_is_taxonomy_yes_<?php echo $i; ?>"><?php _e("Is Taxonomy"); ?></label>
106
+ </div>
107
+ <div class="input">
108
+ <input type="radio" id="advanced_is_taxonomy_no_<?php echo $i; ?>" class="switcher" name="advanced_is_taxonomy[<?php echo $i; ?>]" value="no" <?php echo (!empty($post['advanced_is_taxonomy'][$i]) and 'no' == $post['advanced_is_taxonomy'][$i]) ? 'checked="checked"': '' ?>/>
109
+ <label for="advanced_is_taxonomy_no_<?php echo $i; ?>"><?php _e("Not Taxonomy"); ?></label>
110
+ </div>
111
+ <div class="input wpallimport-radio-field">
112
+ <input type="radio" id="advanced_is_taxonomy_xpath_<?php echo $i; ?>" class="switcher" name="advanced_is_taxonomy[<?php echo $i; ?>]" value="xpath" <?php echo (!empty($post['advanced_is_taxonomy'][$i]) and 'xpath' == $post['advanced_is_taxonomy'][$i]) ? 'checked="checked"': '' ?>/>
113
+ <label for="advanced_is_taxonomy_xpath_<?php echo $i; ?>"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
114
+ <span class="wpallimport-clear"></span>
115
+ <div class="switcher-target-advanced_is_taxonomy_xpath_<?php echo $i; ?> set_with_xpath">
116
+ <span class="wpallimport-slide-content" style="padding-left:0;">
117
+ <input type="text" class="smaller-text" name="advanced_is_taxonomy_xpath[<?php echo $i; ?>]" value="<?php echo (!empty($post['advanced_is_taxonomy_xpath'][$i])) ? esc_attr($post['advanced_is_taxonomy_xpath'][$i]) : ''; ?>"/>
118
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
119
+ </span>
120
+ </div>
121
+ </div>
122
+ </div>
123
+
124
+ <div class="input" style="display:inline-block;">
125
+ <div class="input">
126
+ <input type="radio" id="advanced_is_create_terms_yes_<?php echo $i; ?>" class="switcher" name="advanced_is_create_terms[<?php echo $i; ?>]" value="yes" <?php echo (empty($post['advanced_is_create_terms'][$i]) or ( ! empty($post['advanced_is_create_terms'][$i]) and ! in_array($post['advanced_is_create_terms'][$i], array('no', 'xpath'))) ) ? 'checked="checked"': '' ?>/>
127
+ <label for="advanced_is_create_terms_yes_<?php echo $i; ?>"><?php _e("Auto-Create Terms"); ?></label>
128
+ </div>
129
+ <div class="input">
130
+ <input type="radio" id="advanced_is_create_terms_no_<?php echo $i; ?>" class="switcher" name="advanced_is_create_terms[<?php echo $i; ?>]" value="no" <?php echo ( ! empty($post['advanced_is_create_terms'][$i]) and 'no' == $post['advanced_is_create_terms'][$i]) ? 'checked="checked"': '' ?>/>
131
+ <label for="advanced_is_create_terms_no_<?php echo $i; ?>"><?php _e("Do Not Create Terms"); ?></label>
132
+ </div>
133
+ <div class="input wpallimport-radio-field">
134
+ <input type="radio" id="advanced_is_create_terms_xpath_<?php echo $i; ?>" class="switcher" name="advanced_is_create_terms[<?php echo $i; ?>]" value="xpath" <?php echo (!empty($post['advanced_is_create_terms'][$i]) and 'xpath' == $post['advanced_is_create_terms'][$i]) ? 'checked="checked"': '' ?>/>
135
+ <label for="advanced_is_create_terms_xpath_<?php echo $i; ?>"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
136
+ <span class="wpallimport-clear"></span>
137
+ <div class="switcher-target-advanced_is_create_terms_xpath_<?php echo $i; ?> set_with_xpath">
138
+ <span class="wpallimport-slide-content" style="padding-left:0;">
139
+ <input type="text" class="smaller-text" name="advanced_is_create_terms_xpath[<?php echo $i; ?>]" value="<?php echo (!empty($post['advanced_is_create_terms_xpath'][$i])) ? esc_attr($post['advanced_is_create_terms_xpath'][$i]) : ''; ?>"/>
140
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
141
+ </span>
142
+ </div>
143
+ </div>
144
+ </div>
145
+
146
+ </div>
147
+
148
+ </div>
149
  </td>
150
  <td class="action remove"><a href="#remove" style="top:9px;"></a></td>
151
  </tr>
158
  <td style="width: 50%;">
159
  <input type="text" name="attribute_value[]" class="widefat" vaalue="" style="width:100%;"/>
160
  <span class="wpallimport-clear"></span>
161
+ <div class="form-field wpallimport-radio-field" style="padding: 0 !important; position: relative; left: -100%; width: 200%;">
162
+
163
+ <a href="javascript:void(0);" id="advanced_attributes_0" class="action advanced_attributes"><span>+</span> <?php _e('Advanced', 'pmxi_plugin') ?></a>
164
+ <input type="hidden" value="0" name="is_advanced[]">
165
+
166
+ <span class="default_attribute_settings">
167
+ <span class='in_variations'>
168
+ <input type="checkbox" name="in_variations[]" id="in_variations_0" checked="checked" style="float: left;" value="1"/>
169
+ <label for="in_variations_0"><?php _e('In Variations','pmxi_plugin');?></label>
170
+ </span>
171
+ <span class='is_visible'>
172
+ <input type="checkbox" name="is_visible[]" id="is_visible_0" checked="checked" style="float: left;" value="1"/>
173
+ <label for="is_visible_0"><?php _e('Is Visible','pmxi_plugin');?></label>
174
+ </span>
175
+ <span class='is_taxonomy'>
176
+ <input type="checkbox" name="is_taxonomy[]" id="is_taxonomy_0" checked="checked" style="float: left;" value="1" class="switcher"/>
177
+ <label for="is_taxonomy_0"><?php _e('Is Taxonomy','pmxi_plugin');?></label>
178
+ </span>
179
+ <span class='is_create_taxonomy switcher-target-is_taxonomy_0'>
180
+ <input type="checkbox" name="create_taxonomy_in_not_exists[]" id="create_taxonomy_in_not_exists_0" checked="checked" style="float: left;" value="1"/>
181
+ <label for="create_taxonomy_in_not_exists_0"><?php _e('Auto-Create Terms','pmxi_plugin');?></label>
182
+ </span>
183
  </span>
184
+
185
+ <div class="advanced_attribute_settings">
186
+
187
+ <div class="input" style="display:inline-block;">
188
+ <div class="input">
189
+ <input type="radio" id="advanced_in_variations_yes_0" class="switcher" name="advanced_in_variations[0]" value="yes" checked="checked"/>
190
+ <label for="advanced_in_variations_yes_0"><?php _e("In Variations"); ?></label>
191
+ </div>
192
+ <div class="input">
193
+ <input type="radio" id="advanced_in_variations_no_0" class="switcher" name="advanced_in_variations[0]" value="no"/>
194
+ <label for="advanced_in_variations_no_0"><?php _e("Not In Variations"); ?></label>
195
+ </div>
196
+ <div class="input wpallimport-radio-field">
197
+ <input type="radio" id="advanced_in_variations_xpath_0" class="switcher" name="advanced_in_variations[0]" value="xpath"/>
198
+ <label for="advanced_in_variations_xpath_0"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
199
+ <span class="wpallimport-clear"></span>
200
+ <div class="switcher-target-advanced_in_variations_xpath_0 set_with_xpath">
201
+ <span class="wpallimport-slide-content" style="padding-left:0;">
202
+ <input type="text" class="smaller-text" name="advanced_in_variations_xpath[0]" value=""/>
203
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
204
+ </span>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+ <div class="input" style="display:inline-block;">
210
+ <div class="input">
211
+ <input type="radio" id="advanced_is_visible_yes_0" class="switcher" name="advanced_is_visible[0]" value="yes" checked="checked"/>
212
+ <label for="advanced_is_visible_yes_0"><?php _e("Is Visible"); ?></label>
213
+ </div>
214
+ <div class="input">
215
+ <input type="radio" id="advanced_is_visible_no_0" class="switcher" name="advanced_is_visible[0]" value="no"/>
216
+ <label for="advanced_is_visible_no_0"><?php _e("Not Visible"); ?></label>
217
+ </div>
218
+ <div class="input wpallimport-radio-field">
219
+ <input type="radio" id="advanced_is_visible_xpath_0" class="switcher" name="advanced_is_visible[0]" value="xpath"/>
220
+ <label for="advanced_is_visible_xpath_0"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
221
+ <span class="wpallimport-clear"></span>
222
+ <div class="switcher-target-advanced_is_visible_xpath_0 set_with_xpath">
223
+ <span class="wpallimport-slide-content" style="padding-left:0;">
224
+ <input type="text" class="smaller-text" name="advanced_is_visible_xpath[0]" value=""/>
225
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
226
+ </span>
227
+ </div>
228
+ </div>
229
+ </div>
230
+
231
+ <div class="input" style="display:inline-block;">
232
+ <div class="input">
233
+ <input type="radio" id="advanced_is_taxonomy_yes_0" class="switcher" name="advanced_is_taxonomy[0]" value="yes" checked="checked"/>
234
+ <label for="advanced_is_taxonomy_yes_0"><?php _e("Is Taxonomy"); ?></label>
235
+ </div>
236
+ <div class="input">
237
+ <input type="radio" id="advanced_is_taxonomy_no_0" class="switcher" name="advanced_is_taxonomy[0]" value="no"/>
238
+ <label for="advanced_is_taxonomy_no_0"><?php _e("Not Taxonomy"); ?></label>
239
+ </div>
240
+ <div class="input wpallimport-radio-field">
241
+ <input type="radio" id="advanced_is_taxonomy_xpath_0" class="switcher" name="advanced_is_taxonomy[0]" value="xpath"/>
242
+ <label for="advanced_is_taxonomy_xpath_0"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
243
+ <span class="wpallimport-clear"></span>
244
+ <div class="switcher-target-advanced_is_taxonomy_xpath_0 set_with_xpath">
245
+ <span class="wpallimport-slide-content" style="padding-left:0;">
246
+ <input type="text" class="smaller-text" name="advanced_is_taxonomy_xpath[0]" value=""/>
247
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
248
+ </span>
249
+ </div>
250
+ </div>
251
+ </div>
252
+
253
+ <div class="input" style="display:inline-block;">
254
+ <div class="input">
255
+ <input type="radio" id="advanced_is_create_terms_yes_0" class="switcher" name="advanced_is_create_terms[0]" value="yes" checked="checked"/>
256
+ <label for="advanced_is_create_terms_yes_0"><?php _e("Auto-Create Terms"); ?></label>
257
+ </div>
258
+ <div class="input">
259
+ <input type="radio" id="advanced_is_create_terms_no_0" class="switcher" name="advanced_is_create_terms[0]" value="no"/>
260
+ <label for="advanced_is_create_terms_no_0"><?php _e("Do Not Create Terms"); ?></label>
261
+ </div>
262
+ <div class="input wpallimport-radio-field">
263
+ <input type="radio" id="advanced_is_create_terms_xpath_0" class="switcher" name="advanced_is_create_terms[0]" value="xpath"/>
264
+ <label for="advanced_is_create_terms_xpath_0"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
265
+ <span class="wpallimport-clear"></span>
266
+ <div class="switcher-target-advanced_is_create_terms_xpath_0 set_with_xpath">
267
+ <span class="wpallimport-slide-content" style="padding-left:0;">
268
+ <input type="text" class="smaller-text" name="advanced_is_create_terms_xpath[0]" value=""/>
269
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
270
+ </span>
271
+ </div>
272
+ </div>
273
+ </div>
274
+
275
+ </div>
276
+
277
+ </div>
278
  </td>
279
  <td class="action remove"><a href="#remove" style="top: 9px;"></a></td>
280
  </tr>
286
  <td style="width: 50%;">
287
  <input type="text" name="attribute_value[]" class="widefat" value="" style="width:100%;"/>
288
  <span class="wpallimport-clear"></span>
289
+ <div class="form-field wpallimport-radio-field" style="padding: 0 !important; position: relative; left: -100%; width: 200%;">
290
+
291
+ <a href="javascript:void(0);" id="advanced_attributes_0" class="action advanced_attributes"><span>+</span> <?php _e('Advanced', 'pmxi_plugin') ?></a>
292
+ <input type="hidden" value="0" name="is_advanced[]">
293
+
294
+ <span class="default_attribute_settings">
295
+ <span class='in_variations'>
296
+ <input type="checkbox" name="in_variations[]" checked="checked" style="float: left;" value="1"/>
297
+ <label for=""><?php _e('In Variations','pmxi_plugin');?></label>
298
+ </span>
299
+ <span class='is_visible'>
300
+ <input type="checkbox" name="is_visible[]" checked="checked" style="float: left;" value="1"/>
301
+ <label for=""><?php _e('Is Visible','pmxi_plugin');?></label>
302
+ </span>
303
+ <span class='is_taxonomy'>
304
+ <input type="checkbox" name="is_taxonomy[]" checked="checked" style="float: left;" value="1" class="switcher"/>
305
+ <label for=""><?php _e('Is Taxonomy','pmxi_plugin');?></label>
306
+ </span>
307
+ <span class='is_create_taxonomy'>
308
+ <input type="checkbox" name="create_taxonomy_in_not_exists[]" checked="checked" style="float: left;" value="1"/>
309
+ <label for=""><?php _e('Auto-Create Terms','pmxi_plugin');?></label>
310
+ </span>
311
  </span>
312
+
313
+ <div class="advanced_attribute_settings advanced_settings_template">
314
+
315
+ <div class="input" style="display:inline-block;">
316
+ <div class="input">
317
+ <input type="radio" id="advanced_in_variations_yes_00" class="switcher" name="advanced_in_variations[00]" value="yes" checked="checked"/>
318
+ <label for="advanced_in_variations_yes_00"><?php _e("In Variations"); ?></label>
319
+ </div>
320
+ <div class="input">
321
+ <input type="radio" id="advanced_in_variations_no_00" class="switcher" name="advanced_in_variations[00]" value="no"/>
322
+ <label for="advanced_in_variations_no_00"><?php _e("Not In Variations"); ?></label>
323
+ </div>
324
+ <div class="input wpallimport-radio-field">
325
+ <input type="radio" id="advanced_in_variations_xpath_00" class="switcher" name="advanced_in_variations[00]" value="xpath"/>
326
+ <label for="advanced_in_variations_xpath_00"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
327
+ <span class="wpallimport-clear"></span>
328
+ <div class="set_with_xpath">
329
+ <span class="wpallimport-slide-content" style="padding-left:0;">
330
+ <input type="text" class="smaller-text" name="advanced_in_variations_xpath[00]" value=""/>
331
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
332
+ </span>
333
+ </div>
334
+ </div>
335
+ </div>
336
+
337
+ <div class="input" style="display:inline-block;">
338
+ <div class="input">
339
+ <input type="radio" id="advanced_is_visible_yes_00" class="switcher" name="advanced_is_visible[00]" value="yes" checked="checked"/>
340
+ <label for="advanced_is_visible_yes_00"><?php _e("Is Visible"); ?></label>
341
+ </div>
342
+ <div class="input">
343
+ <input type="radio" id="advanced_is_visible_no_00" class="switcher" name="advanced_is_visible[00]" value="no"/>
344
+ <label for="advanced_is_visible_no_00"><?php _e("Not Visible"); ?></label>
345
+ </div>
346
+ <div class="input wpallimport-radio-field">
347
+ <input type="radio" id="advanced_is_visible_xpath_00" class="switcher" name="advanced_is_visible[00]" value="xpath"/>
348
+ <label for="advanced_is_visible_xpath_00"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
349
+ <span class="wpallimport-clear"></span>
350
+ <div class="set_with_xpath">
351
+ <span class="wpallimport-slide-content" style="padding-left:0;">
352
+ <input type="text" class="smaller-text" name="advanced_is_visible_xpath[00]" value=""/>
353
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
354
+ </span>
355
+ </div>
356
+ </div>
357
+ </div>
358
+
359
+ <div class="input" style="display:inline-block;">
360
+ <div class="input">
361
+ <input type="radio" id="advanced_is_taxonomy_yes_00" class="switcher" name="advanced_is_taxonomy[00]" value="yes" checked="checked"/>
362
+ <label for="advanced_is_taxonomy_yes_00"><?php _e("Is Taxonomy"); ?></label>
363
+ </div>
364
+ <div class="input">
365
+ <input type="radio" id="advanced_is_taxonomy_no_00" class="switcher" name="advanced_is_taxonomy[00]" value="no"/>
366
+ <label for="advanced_is_taxonomy_no_00"><?php _e("Not Taxonomy"); ?></label>
367
+ </div>
368
+ <div class="input wpallimport-radio-field">
369
+ <input type="radio" id="advanced_is_taxonomy_xpath_00" class="switcher" name="advanced_is_taxonomy[00]" value="xpath"/>
370
+ <label for="advanced_is_taxonomy_xpath_00"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
371
+ <span class="wpallimport-clear"></span>
372
+ <div class="set_with_xpath">
373
+ <span class="wpallimport-slide-content" style="padding-left:0;">
374
+ <input type="text" class="smaller-text" name="advanced_is_taxonomy_xpath[00]" value=""/>
375
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
376
+ </span>
377
+ </div>
378
+ </div>
379
+ </div>
380
+
381
+ <div class="input" style="display:inline-block;">
382
+ <div class="input">
383
+ <input type="radio" id="advanced_is_create_terms_yes_00" class="switcher" name="advanced_is_create_terms[00]" value="yes" checked="checked"/>
384
+ <label for="advanced_is_create_terms_yes_00"><?php _e("Auto-Create Terms"); ?></label>
385
+ </div>
386
+ <div class="input">
387
+ <input type="radio" id="advanced_is_create_terms_no_00" class="switcher" name="advanced_is_create_terms[00]" value="no"/>
388
+ <label for="advanced_is_create_terms_no_00"><?php _e("Do Not Create Terms"); ?></label>
389
+ </div>
390
+ <div class="input wpallimport-radio-field">
391
+ <input type="radio" id="advanced_is_create_terms_xpath_00" class="switcher" name="advanced_is_create_terms[00]" value="xpath"/>
392
+ <label for="advanced_is_create_terms_xpath_00"><?php _e('Set with XPath', 'pmxi_plugin' )?></label>
393
+ <span class="wpallimport-clear"></span>
394
+ <div class="set_with_xpath">
395
+ <span class="wpallimport-slide-content" style="padding-left:0;">
396
+ <input type="text" class="smaller-text" name="advanced_is_create_terms_xpath[00]" value=""/>
397
+ <a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'yes\', \'no\').', 'pmxi_plugin') ?>">?</a>
398
+ </span>
399
+ </div>
400
+ </div>
401
+ </div>
402
+
403
+ </div>
404
+
405
+ </div>
406
  </td>
407
  <td class="action remove"><a href="#remove" style="top: 9px;"></a></td>
408
  </tr>
views/admin/import/_tabs/_general.php CHANGED
@@ -82,6 +82,13 @@
82
  <a href="#help" class="wpallimport-help" title="<?php _e('WP All Import attempt to remove currency symbols from prices.', 'pmxi_plugin') ?>" style="position:relative; top:1px;">?</a>
83
  </p>
84
 
 
 
 
 
 
 
 
85
  <p class="form-field wpallimport-radio-field">
86
  <input type="hidden" name="prepare_price_to_woo_format" value="0" />
87
  <input type="checkbox" id="prepare_price_to_woo_format" name="prepare_price_to_woo_format" value="1" <?php echo $post['prepare_price_to_woo_format'] ? 'checked="checked"' : '' ?> />
82
  <a href="#help" class="wpallimport-help" title="<?php _e('WP All Import attempt to remove currency symbols from prices.', 'pmxi_plugin') ?>" style="position:relative; top:1px;">?</a>
83
  </p>
84
 
85
+ <p class="form-field wpallimport-radio-field">
86
+ <input type="hidden" name="convert_decimal_separator" value="0" />
87
+ <input type="checkbox" id="convert_decimal_separator" name="convert_decimal_separator" value="1" <?php echo $post['convert_decimal_separator'] ? 'checked="checked"' : '' ?> />
88
+ <label for="convert_decimal_separator" style="width:220px;"><?php _e('Convert decimal separator to a period', 'pmxi_plugin') ?></label>
89
+ <a href="#help" class="wpallimport-help" title="<?php _e('Prices must be imported using a period as the decimal separator. If you\'d like to change the decimal separator you can do so by editing your WooCommerce settings.', 'pmxi_plugin') ?>" style="position:relative; top:1px;">?</a>
90
+ </p>
91
+
92
  <p class="form-field wpallimport-radio-field">
93
  <input type="hidden" name="prepare_price_to_woo_format" value="0" />
94
  <input type="checkbox" id="prepare_price_to_woo_format" name="prepare_price_to_woo_format" value="1" <?php echo $post['prepare_price_to_woo_format'] ? 'checked="checked"' : '' ?> />