Version Description
- added Variation Description field
- added auto create shipping classes
- removed 'Virtual' and 'Downloadable' checkboxes
- hide 'Downloadable' settings if product not downloadable
Download this release
Release Info
Developer | soflyy |
Plugin | Import Products from any XML or CSV to WooCommerce |
Version | 1.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.4
- filters/pmxi_custom_field.php +11 -0
- filters/pmxi_custom_field_to_delete.php +2 -0
- filters/pmxi_custom_field_to_update.php +1 -1
- models/import/record.php +70 -24
- plugin.php +7 -2
- readme.txt +7 -1
- static/js/admin.js +20 -17
- views/admin/import/_tabs/_general.php +8 -2
- views/admin/import/_tabs/_linked_product.php +2 -1
- views/admin/import/_tabs/_variations.php +14 -16
- views/admin/import/index.php +3 -3
filters/pmxi_custom_field.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function pmwi_pmxi_custom_field($cf_value, $pid, $cf_key, $existing_meta_keys, $import_id){
|
4 |
+
|
5 |
+
if ($cf_key == 'total_sales')
|
6 |
+
{
|
7 |
+
delete_post_meta($pid, $cf_key);
|
8 |
+
}
|
9 |
+
|
10 |
+
return $cf_value;
|
11 |
+
}
|
filters/pmxi_custom_field_to_delete.php
CHANGED
@@ -3,6 +3,8 @@ function pmwi_pmxi_custom_field_to_delete($field_to_delete, $pid, $post_type, $o
|
|
3 |
|
4 |
if ($field_to_delete === false || $post_type != "product") return $field_to_delete;
|
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_") === 0)) return false;
|
8 |
|
3 |
|
4 |
if ($field_to_delete === false || $post_type != "product") return $field_to_delete;
|
5 |
|
6 |
+
if ($cur_meta_key == 'total_sales') return false;
|
7 |
+
|
8 |
// Do not update attributes
|
9 |
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_") === 0)) return false;
|
10 |
|
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') 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;
|
models/import/record.php
CHANGED
@@ -115,6 +115,13 @@ class PMWI_Import_Record extends PMWI_Model_Record {
|
|
115 |
$count and $this->data['product_sku'] = array_fill(0, $count, "");
|
116 |
}
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
if ("" != $import->options['single_product_url']){
|
119 |
$this->data['product_url'] = XmlImportParser::factory($xml, $cxpath, $import->options['single_product_url'], $file)->parse($records); $tmp_files[] = $file;
|
120 |
}
|
@@ -588,41 +595,78 @@ class PMWI_Import_Record extends PMWI_Model_Record {
|
|
588 |
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));
|
589 |
|
590 |
// Save shipping class
|
591 |
-
if ( pmwi_is_update_taxonomy($articleData, $this->options, 'product_shipping_class') )
|
592 |
-
|
593 |
-
|
594 |
|
|
|
|
|
595 |
$p_shipping_class = $product_shipping_class[$i] > 0 && $product_type != 'external' ? absint( $product_shipping_class[$i] ) : '';
|
596 |
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
610 |
}
|
611 |
}
|
612 |
else{
|
613 |
|
614 |
$t_shipping_class = term_exists($product_shipping_class[$i], 'product_shipping_class', 0);
|
615 |
-
|
616 |
-
|
|
|
|
|
617 |
}
|
618 |
-
|
619 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
}
|
621 |
|
622 |
-
$this->associate_terms( $pid, array( $p_shipping_class ), 'product_shipping_class' );
|
623 |
-
|
624 |
-
//wp_set_object_terms( $pid, $p_shipping_class, 'product_shipping_class');
|
625 |
-
|
626 |
}
|
627 |
|
628 |
// Unique SKU
|
@@ -663,6 +707,8 @@ class PMWI_Import_Record extends PMWI_Model_Record {
|
|
663 |
}
|
664 |
}
|
665 |
|
|
|
|
|
666 |
// Save Attributes
|
667 |
$attributes = array();
|
668 |
|
@@ -934,7 +980,7 @@ class PMWI_Import_Record extends PMWI_Model_Record {
|
|
934 |
|
935 |
$stock_status = 'instock';
|
936 |
|
937 |
-
} elseif ( 'variable' === $product_type ) {
|
938 |
|
939 |
// Stock status is always determined by children so sync later
|
940 |
$stock_status = '';
|
115 |
$count and $this->data['product_sku'] = array_fill(0, $count, "");
|
116 |
}
|
117 |
|
118 |
+
if ("" != $import->options['single_product_variation_description']){
|
119 |
+
$this->data['product_variation_description'] = XmlImportParser::factory($xml, $cxpath, $import->options['single_product_variation_description'], $file)->parse($records); $tmp_files[] = $file;
|
120 |
+
}
|
121 |
+
else{
|
122 |
+
$count and $this->data['product_variation_description'] = array_fill(0, $count, "");
|
123 |
+
}
|
124 |
+
|
125 |
if ("" != $import->options['single_product_url']){
|
126 |
$this->data['product_url'] = XmlImportParser::factory($xml, $cxpath, $import->options['single_product_url'], $file)->parse($records); $tmp_files[] = $file;
|
127 |
}
|
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) )
|
611 |
+
{
|
612 |
+
$p_shipping_class = (int) $t_shipping_class->term_taxonomy_id;
|
613 |
+
}
|
614 |
+
else
|
615 |
+
{
|
616 |
+
$t_shipping_class = term_exists( (int) $p_shipping_class, 'product_shipping_class', 0);
|
617 |
+
|
618 |
+
if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
|
619 |
+
{
|
620 |
+
$p_shipping_class = (int) $t_shipping_class['term_taxonomy_id'];
|
621 |
+
}
|
622 |
+
else
|
623 |
+
{
|
624 |
+
$t_shipping_class = wp_insert_term(
|
625 |
+
$p_shipping_class, // the term
|
626 |
+
'product_shipping_class' // the taxonomy
|
627 |
+
);
|
628 |
+
|
629 |
+
if ( ! empty($t_shipping_class) and ! is_wp_error($t_shipping_class) )
|
630 |
+
{
|
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 |
+
{
|
651 |
+
$p_shipping_class = (int) $t_shipping_class['term_taxonomy_id'];
|
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' );
|
669 |
+
|
|
|
|
|
670 |
}
|
671 |
|
672 |
// Unique SKU
|
707 |
}
|
708 |
}
|
709 |
|
710 |
+
$this->pushmeta($pid, '_variation_description', wp_kses_post($product_variation_description[$i]) );
|
711 |
+
|
712 |
// Save Attributes
|
713 |
$attributes = array();
|
714 |
|
980 |
|
981 |
$stock_status = 'instock';
|
982 |
|
983 |
+
} elseif ( 'variable' === $product_type and ! $this->options['link_all_variations'] ) {
|
984 |
|
985 |
// Stock status is always determined by children so sync later
|
986 |
$stock_status = '';
|
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.
|
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.
|
28 |
|
29 |
define('PMWI_EDITION', 'free');
|
30 |
|
@@ -558,6 +558,11 @@ final class PMWI_Plugin {
|
|
558 |
'single_variable_product_downloadable_use_parent' => 0,
|
559 |
'variable_download_limit_use_parent' => 0,
|
560 |
'variable_download_expiry_use_parent' => 0,
|
|
|
|
|
|
|
|
|
|
|
561 |
'first_is_parent' => 'yes',
|
562 |
'single_product_whosale_price' => '',
|
563 |
'variable_whosale_price' => '',
|
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 |
*/
|
25 |
define('PMWI_PREFIX', 'pmwi_');
|
26 |
|
27 |
+
define('PMWI_FREE_VERSION', '1.2.4');
|
28 |
|
29 |
define('PMWI_EDITION', 'free');
|
30 |
|
558 |
'single_variable_product_downloadable_use_parent' => 0,
|
559 |
'variable_download_limit_use_parent' => 0,
|
560 |
'variable_download_expiry_use_parent' => 0,
|
561 |
+
|
562 |
+
'single_product_variation_description' => '',
|
563 |
+
'variable_description' => '',
|
564 |
+
'variable_description_use_parent' => 0,
|
565 |
+
|
566 |
'first_is_parent' => 'yes',
|
567 |
'single_product_whosale_price' => '',
|
568 |
'variable_whosale_price' => '',
|
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.
|
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,12 @@ The WooCommerce add-on will appear in the Step 4 of WP All Import.
|
|
83 |
|
84 |
== Changelog ==
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
= 1.2.3 =
|
87 |
* fixed import total_sales
|
88 |
|
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 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
= 1.2.4 =
|
87 |
+
* added Variation Description field
|
88 |
+
* added auto create shipping classes
|
89 |
+
* removed 'Virtual' and 'Downloadable' checkboxes
|
90 |
+
* hide 'Downloadable' settings if product not downloadable
|
91 |
+
|
92 |
= 1.2.3 =
|
93 |
* fixed import total_sales
|
94 |
|
static/js/admin.js
CHANGED
@@ -17,7 +17,8 @@
|
|
17 |
var is_grouped = ($('#product-type').val() == 'grouped');
|
18 |
var is_simple = ($('#product-type').val() == 'simple');
|
19 |
var is_external = ($('#product-type').val() == 'external');
|
20 |
-
var is_downloadable = ($('
|
|
|
21 |
var is_virtual = ($('#_virtual').is(':checked'));
|
22 |
var is_multiple_product_type = ($('input[name=is_multiple_product_type]:checked').val() == 'yes');
|
23 |
|
@@ -65,11 +66,13 @@
|
|
65 |
|
66 |
if ($(this).hasClass('hide_if_virtual') ||
|
67 |
$(this).hasClass('show_if_virtual') ||
|
68 |
-
$(this).hasClass('show_if_downloadable')
|
|
|
69 |
{
|
70 |
if ($(this).hasClass('hide_if_virtual') && is_virtual) $(this).hide(); else if ( $(this).hasClass('hide_if_virtual') && !is_virtual ) $(this).show();
|
71 |
if ($(this).hasClass('show_if_virtual') && is_virtual) $(this).show(); else if ( $(this).hasClass('show_if_virtual') && !is_virtual ) $(this).hide();
|
72 |
if ($(this).hasClass('show_if_downloadable') && is_downloadable) $(this).show(); else if ( $(this).hasClass('show_if_downloadable') && !is_downloadable ) $(this).hide();
|
|
|
73 |
}
|
74 |
});
|
75 |
|
@@ -103,7 +106,7 @@
|
|
103 |
change_depencies();
|
104 |
$('.wc-tabs').find('li:visible:first').find('a').click();
|
105 |
});
|
106 |
-
$('#_virtual, #_downloadable, input[name=is_product_manage_stock], input[name=is_variable_product_manage_stock]').click(change_depencies);
|
107 |
$('input[name=is_multiple_product_type]').click(function(){
|
108 |
change_depencies();
|
109 |
$('.wc-tabs').find('li:visible:first').find('a').click();
|
@@ -138,20 +141,20 @@
|
|
138 |
$('#variable_sale_price_shedule').show();
|
139 |
});
|
140 |
|
141 |
-
$('#_variable_virtual').click(function(){
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
});
|
151 |
-
|
152 |
-
$('#_variable_downloadable').click(function(){
|
153 |
-
|
154 |
-
});
|
155 |
|
156 |
var variation_xpath = $('#variations_xpath').val();
|
157 |
|
17 |
var is_grouped = ($('#product-type').val() == 'grouped');
|
18 |
var is_simple = ($('#product-type').val() == 'simple');
|
19 |
var is_external = ($('#product-type').val() == 'external');
|
20 |
+
var is_downloadable = !($('input[name=is_product_downloadable]:checked').val() == 'no');
|
21 |
+
var is_variable_downloadable = !($('input[name=is_variable_product_downloadable]:checked').val() == 'no');
|
22 |
var is_virtual = ($('#_virtual').is(':checked'));
|
23 |
var is_multiple_product_type = ($('input[name=is_multiple_product_type]:checked').val() == 'yes');
|
24 |
|
66 |
|
67 |
if ($(this).hasClass('hide_if_virtual') ||
|
68 |
$(this).hasClass('show_if_virtual') ||
|
69 |
+
$(this).hasClass('show_if_downloadable') ||
|
70 |
+
$(this).hasClass('variable_downloadable'))
|
71 |
{
|
72 |
if ($(this).hasClass('hide_if_virtual') && is_virtual) $(this).hide(); else if ( $(this).hasClass('hide_if_virtual') && !is_virtual ) $(this).show();
|
73 |
if ($(this).hasClass('show_if_virtual') && is_virtual) $(this).show(); else if ( $(this).hasClass('show_if_virtual') && !is_virtual ) $(this).hide();
|
74 |
if ($(this).hasClass('show_if_downloadable') && is_downloadable) $(this).show(); else if ( $(this).hasClass('show_if_downloadable') && !is_downloadable ) $(this).hide();
|
75 |
+
if ($(this).hasClass('variable_downloadable') && is_variable_downloadable) $(this).show(); else if ( $(this).hasClass('variable_downloadable') && !is_variable_downloadable ) $(this).hide();
|
76 |
}
|
77 |
});
|
78 |
|
106 |
change_depencies();
|
107 |
$('.wc-tabs').find('li:visible:first').find('a').click();
|
108 |
});
|
109 |
+
$('#_virtual, #_downloadable, input[name=is_product_manage_stock], input[name=is_variable_product_manage_stock], input[name=is_product_downloadable], input[name=is_variable_product_downloadable]').click(change_depencies);
|
110 |
$('input[name=is_multiple_product_type]').click(function(){
|
111 |
change_depencies();
|
112 |
$('.wc-tabs').find('li:visible:first').find('a').click();
|
141 |
$('#variable_sale_price_shedule').show();
|
142 |
});
|
143 |
|
144 |
+
// $('#_variable_virtual').click(function(){
|
145 |
+
// if ($(this).is(':checked')){
|
146 |
+
// $('#variable_virtual').show();
|
147 |
+
// $('#variable_dimensions').hide();
|
148 |
+
// }
|
149 |
+
// else{
|
150 |
+
// $('#variable_virtual').hide();
|
151 |
+
// $('#variable_dimensions').show();
|
152 |
+
// }
|
153 |
+
// });
|
154 |
+
|
155 |
+
// $('#_variable_downloadable').click(function(){
|
156 |
+
// if ($(this).is(':checked')) $('.variable_downloadable').show(); else $('.variable_downloadable').hide();
|
157 |
+
// });
|
158 |
|
159 |
var variation_xpath = $('#variations_xpath').val();
|
160 |
|
views/admin/import/_tabs/_general.php
CHANGED
@@ -94,7 +94,13 @@
|
|
94 |
</p>
|
95 |
|
96 |
</div>
|
97 |
-
<div class="options_group
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
<p class="form-field wpallimport-radio-field">
|
100 |
<input type="radio" id="is_product_virtual_yes" class="switcher" name="is_product_virtual" value="yes" <?php echo 'yes' == $post['is_product_virtual'] ? 'checked="checked"': '' ?>/>
|
@@ -117,7 +123,7 @@
|
|
117 |
</div>
|
118 |
|
119 |
</div>
|
120 |
-
<div class="options_group
|
121 |
|
122 |
<p class="form-field wpallimport-radio-field">
|
123 |
<input type="radio" id="is_product_downloadable_yes" class="switcher" name="is_product_downloadable" value="yes" <?php echo 'yes' == $post['is_product_downloadable'] ? 'checked="checked"': '' ?>/>
|
94 |
</p>
|
95 |
|
96 |
</div>
|
97 |
+
<div class="options_group show_if_variable">
|
98 |
+
<p class="form-field">
|
99 |
+
<label><?php _e("Variation Description"); ?></label>
|
100 |
+
<input type="text" class="short" name="single_product_variation_description" value="<?php echo esc_attr($post['single_product_variation_description']) ?>"/>
|
101 |
+
</p>
|
102 |
+
</div>
|
103 |
+
<div class="options_group">
|
104 |
|
105 |
<p class="form-field wpallimport-radio-field">
|
106 |
<input type="radio" id="is_product_virtual_yes" class="switcher" name="is_product_virtual" value="yes" <?php echo 'yes' == $post['is_product_virtual'] ? 'checked="checked"': '' ?>/>
|
123 |
</div>
|
124 |
|
125 |
</div>
|
126 |
+
<div class="options_group">
|
127 |
|
128 |
<p class="form-field wpallimport-radio-field">
|
129 |
<input type="radio" id="is_product_downloadable_yes" class="switcher" name="is_product_downloadable" value="yes" <?php echo 'yes' == $post['is_product_downloadable'] ? 'checked="checked"': '' ?>/>
|
views/admin/import/_tabs/_linked_product.php
CHANGED
@@ -19,10 +19,11 @@
|
|
19 |
|
20 |
$posts_in = array_unique( (array) get_objects_in_term( get_term_by( 'slug', 'grouped', 'product_type' )->term_id, 'product_type' ) );
|
21 |
if ( sizeof( $posts_in ) > 0 ) {
|
|
|
22 |
$args = array(
|
23 |
'post_type' => 'product',
|
24 |
'post_status' => 'any',
|
25 |
-
'numberposts' =>
|
26 |
'orderby' => 'title',
|
27 |
'order' => 'asc',
|
28 |
'post_parent' => 0,
|
19 |
|
20 |
$posts_in = array_unique( (array) get_objects_in_term( get_term_by( 'slug', 'grouped', 'product_type' )->term_id, 'product_type' ) );
|
21 |
if ( sizeof( $posts_in ) > 0 ) {
|
22 |
+
$posts_in = array_slice($posts_in, 0, 100);
|
23 |
$args = array(
|
24 |
'post_type' => 'product',
|
25 |
'post_status' => 'any',
|
26 |
+
'numberposts' => 100,
|
27 |
'orderby' => 'title',
|
28 |
'order' => 'asc',
|
29 |
'post_parent' => 0,
|
views/admin/import/_tabs/_variations.php
CHANGED
@@ -103,18 +103,7 @@
|
|
103 |
<span id="variations_console"></span>
|
104 |
</p>
|
105 |
|
106 |
-
<div style="margin-right:2%;">
|
107 |
-
|
108 |
-
<div class="options_group">
|
109 |
-
<p class="form-field wpallimport-radio-field">
|
110 |
-
<label style="border-right:none;" for="_variable_virtual"><?php _e('Virtual', 'woocommerce');?> </label>
|
111 |
-
<input type="checkbox" name="_variable_virtual" id="_variable_virtual" style="position:relative; top:2px; margin-left:5px;" <?php echo ($post['_variable_virtual']) ? 'checked="checked"' : ''; ?>>
|
112 |
-
</p>
|
113 |
-
<p class="form-field wpallimport-radio-field">
|
114 |
-
<label for="_variable_downloadable" class="show_if_simple"><?php _e('Downloadable','woocommerce');?></label>
|
115 |
-
<input type="checkbox" name="_variable_downloadable" id="_variable_downloadable" style="position:relative; top:2px; margin-left:5px;" <?php echo ($post['_variable_downloadable']) ? 'checked="checked"' : ''; ?>>
|
116 |
-
</p>
|
117 |
-
</div>
|
118 |
|
119 |
<div class="options_group">
|
120 |
<p class="form-field">
|
@@ -136,6 +125,15 @@
|
|
136 |
<label for="variable_image_use_parent" style="top:0px;"><?php _e("XPath Is From Parent","pmxi_plugin"); ?></label>
|
137 |
</span>
|
138 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
</div>
|
140 |
|
141 |
<div class="options_group">
|
@@ -263,7 +261,7 @@
|
|
263 |
</p>
|
264 |
</div>
|
265 |
|
266 |
-
<div class="options_group"
|
267 |
|
268 |
<p class="form-field wpallimport-radio-field">
|
269 |
<input type="radio" id="is_variable_product_virtual_yes" class="switcher" name="is_variable_product_virtual" value="yes" <?php echo 'yes' == $post['is_variable_product_virtual'] ? 'checked="checked"': '' ?>/>
|
@@ -291,7 +289,7 @@
|
|
291 |
</div>
|
292 |
</div>
|
293 |
|
294 |
-
<div class="options_group"
|
295 |
<p class="form-field">
|
296 |
<label style="width:150px;"><?php _e('Weight','woocommerce');?></label>
|
297 |
<input type="text" placeholder="0.00" value="<?php echo esc_attr($post['variable_weight']) ?>" style="" name="variable_weight" class="short">
|
@@ -408,7 +406,7 @@
|
|
408 |
</div>
|
409 |
|
410 |
<!-- Downloadable -->
|
411 |
-
<div class="options_group
|
412 |
<p class="form-field wpallimport-radio-field">
|
413 |
<input type="radio" id="is_variable_product_downloadable_yes" class="switcher" name="is_variable_product_downloadable" value="yes" <?php echo 'yes' == $post['is_variable_product_downloadable'] ? 'checked="checked"': '' ?>/>
|
414 |
<label for="is_variable_product_downloadable_yes"><?php _e("Downloadable"); ?></label>
|
@@ -435,7 +433,7 @@
|
|
435 |
</div>
|
436 |
</div>
|
437 |
|
438 |
-
<div class="options_group variable_downloadable"
|
439 |
<p class="form-field">
|
440 |
<label style="width:150px;"><?php _e('File paths','woocommerce');?></label>
|
441 |
<input type="text" value="<?php echo esc_attr($post['variable_file_paths']) ?>" name="variable_file_paths" class="short" style="width:60% !important;">
|
103 |
<span id="variations_console"></span>
|
104 |
</p>
|
105 |
|
106 |
+
<div style="margin-right:2%;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
<div class="options_group">
|
109 |
<p class="form-field">
|
125 |
<label for="variable_image_use_parent" style="top:0px;"><?php _e("XPath Is From Parent","pmxi_plugin"); ?></label>
|
126 |
</span>
|
127 |
</p>
|
128 |
+
<p class="form-field">
|
129 |
+
<label style="width:150px;"><?php _e('Variation Description','woocommerce');?></label>
|
130 |
+
<input type="text" value="<?php echo esc_attr($post['variable_description']) ?>" style="" name="variable_description" class="short">
|
131 |
+
<span class="use_parent">
|
132 |
+
<input type="hidden" name="variable_description_use_parent" value="0"/>
|
133 |
+
<input type="checkbox" name="variable_description_use_parent" id="variable_description_use_parent" style="position:relative; top:1px; margin-left:5px; margin-right:5px;" <?php echo ($post['variable_description_use_parent']) ? 'checked="checked"' : ''; ?>>
|
134 |
+
<label for="variable_description_use_parent" style="top:0px;"><?php _e("XPath Is From Parent","pmxi_plugin"); ?></label>
|
135 |
+
</span>
|
136 |
+
</p>
|
137 |
</div>
|
138 |
|
139 |
<div class="options_group">
|
261 |
</p>
|
262 |
</div>
|
263 |
|
264 |
+
<div class="options_group" id="variable_virtual">
|
265 |
|
266 |
<p class="form-field wpallimport-radio-field">
|
267 |
<input type="radio" id="is_variable_product_virtual_yes" class="switcher" name="is_variable_product_virtual" value="yes" <?php echo 'yes' == $post['is_variable_product_virtual'] ? 'checked="checked"': '' ?>/>
|
289 |
</div>
|
290 |
</div>
|
291 |
|
292 |
+
<div class="options_group" id="variable_dimensions">
|
293 |
<p class="form-field">
|
294 |
<label style="width:150px;"><?php _e('Weight','woocommerce');?></label>
|
295 |
<input type="text" placeholder="0.00" value="<?php echo esc_attr($post['variable_weight']) ?>" style="" name="variable_weight" class="short">
|
406 |
</div>
|
407 |
|
408 |
<!-- Downloadable -->
|
409 |
+
<div class="options_group">
|
410 |
<p class="form-field wpallimport-radio-field">
|
411 |
<input type="radio" id="is_variable_product_downloadable_yes" class="switcher" name="is_variable_product_downloadable" value="yes" <?php echo 'yes' == $post['is_variable_product_downloadable'] ? 'checked="checked"': '' ?>/>
|
412 |
<label for="is_variable_product_downloadable_yes"><?php _e("Downloadable"); ?></label>
|
433 |
</div>
|
434 |
</div>
|
435 |
|
436 |
+
<div class="options_group variable_downloadable">
|
437 |
<p class="form-field">
|
438 |
<label style="width:150px;"><?php _e('File paths','woocommerce');?></label>
|
439 |
<input type="text" value="<?php echo esc_attr($post['variable_file_paths']) ?>" name="variable_file_paths" class="short" style="width:60% !important;">
|
views/admin/import/index.php
CHANGED
@@ -37,7 +37,7 @@
|
|
37 |
<a href="#help" class="wpallimport-help" style="top: -1px;" title="<?php _e('The value of presented XPath should be one of the following: (\'simple\', \'grouped\', \'external\', \'variable\').', 'pmxi_plugin') ?>">?</a>
|
38 |
</div>
|
39 |
</div>
|
40 |
-
|
41 |
<label class="show_if_simple" for="_virtual" style="border-right:none;">
|
42 |
<input type="hidden" name="_virtual" value="0"/>
|
43 |
<?php _e('Virtual','woocommerce');?>: <input type="checkbox" id="_virtual" name="_virtual" <?php echo ($post['_virtual']) ? 'checked="checked"' : ''; ?>>
|
@@ -46,7 +46,7 @@
|
|
46 |
<input type="hidden" name="_downloadable" value="0"/>
|
47 |
<?php _e('Downloadable','woocommerce');?>: <input type="checkbox" id="_downloadable" name="_downloadable" <?php echo ($post['_downloadable']) ? 'checked="checked"' : ''; ?>>
|
48 |
</label>
|
49 |
-
</div
|
50 |
</span>
|
51 |
</h3>
|
52 |
<div class="clear"></div>
|
@@ -59,7 +59,7 @@
|
|
59 |
|
60 |
<li class="inventory_tab show_if_simple show_if_variable show_if_grouped inventory_options" style="display: block;"><a href="javascript:void(0);" rel="inventory_product_data"><?php _e('Inventory', 'woocommerce');?></a></li>
|
61 |
|
62 |
-
<li class="shipping_tab
|
63 |
|
64 |
<li class="linked_product_tab linked_product_options"><a href="javascript:void(0);" rel="linked_product_data"><?php _e('Linked Products', 'woocommerce');?></a></li>
|
65 |
|
37 |
<a href="#help" class="wpallimport-help" style="top: -1px;" title="<?php _e('The value of presented XPath should be one of the following: (\'simple\', \'grouped\', \'external\', \'variable\').', 'pmxi_plugin') ?>">?</a>
|
38 |
</div>
|
39 |
</div>
|
40 |
+
<!--div style="float:right;">
|
41 |
<label class="show_if_simple" for="_virtual" style="border-right:none;">
|
42 |
<input type="hidden" name="_virtual" value="0"/>
|
43 |
<?php _e('Virtual','woocommerce');?>: <input type="checkbox" id="_virtual" name="_virtual" <?php echo ($post['_virtual']) ? 'checked="checked"' : ''; ?>>
|
46 |
<input type="hidden" name="_downloadable" value="0"/>
|
47 |
<?php _e('Downloadable','woocommerce');?>: <input type="checkbox" id="_downloadable" name="_downloadable" <?php echo ($post['_downloadable']) ? 'checked="checked"' : ''; ?>>
|
48 |
</label>
|
49 |
+
</div-->
|
50 |
</span>
|
51 |
</h3>
|
52 |
<div class="clear"></div>
|
59 |
|
60 |
<li class="inventory_tab show_if_simple show_if_variable show_if_grouped inventory_options" style="display: block;"><a href="javascript:void(0);" rel="inventory_product_data"><?php _e('Inventory', 'woocommerce');?></a></li>
|
61 |
|
62 |
+
<li class="shipping_tab shipping_options hide_if_grouped hide_if_external"><a href="javascript:void(0);" rel="shipping_product_data"><?php _e('Shipping', 'woocommerce');?></a></li>
|
63 |
|
64 |
<li class="linked_product_tab linked_product_options"><a href="javascript:void(0);" rel="linked_product_data"><?php _e('Linked Products', 'woocommerce');?></a></li>
|
65 |
|