Version Description
- Tested OK with WC 5.5.
- Added external/affiliate and grouped product support.
Download this release
Release Info
Developer | webtoffee |
Plugin | Product Import Export for WooCommerce |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
- admin/modules/export/assets/js/main.js +10 -3
- admin/modules/export/export.php +1 -1
- admin/modules/import/assets/js/main.js +2 -2
- admin/modules/import/import.php +3 -3
- admin/modules/product/data/data-allowed-product-types.php +0 -63
- admin/modules/product/data/data-product-post-columns.php +38 -39
- admin/modules/product/data/data/data-wf-reserved-fields-pair.php +34 -35
- admin/modules/product/export/export.php +9 -9
- admin/modules/product/import/import.php +76 -109
- admin/modules/product/product.php +21 -13
- includes/class-wf-prodimpexp-plugin-uninstall-feedback.php +18 -0
- includes/class-wt-import-export-for-woo.php +1 -1
- product-import-export-for-woo.php +10 -3
- readme.txt +84 -62
admin/modules/export/assets/js/main.js
CHANGED
@@ -5,7 +5,7 @@ var wt_iew_basic_export=(function( $ ) {
|
|
5 |
ajax_data:{},
|
6 |
selected_template:0,
|
7 |
selected_template_name:'',
|
8 |
-
to_export:'',
|
9 |
to_export_title:'',
|
10 |
export_method:'',
|
11 |
current_step:'',
|
@@ -607,9 +607,16 @@ var wt_iew_basic_export=(function( $ ) {
|
|
607 |
},
|
608 |
current_step_actions:function() /* current page actions after page is visible */
|
609 |
{
|
610 |
-
if(this.current_step=='filter')
|
611 |
{
|
612 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
}else if(this.current_step=='advanced')
|
614 |
{
|
615 |
wt_field_group.Set();
|
5 |
ajax_data:{},
|
6 |
selected_template:0,
|
7 |
selected_template_name:'',
|
8 |
+
to_export:'product',
|
9 |
to_export_title:'',
|
10 |
export_method:'',
|
11 |
current_step:'',
|
607 |
},
|
608 |
current_step_actions:function() /* current page actions after page is visible */
|
609 |
{
|
610 |
+
if(this.current_step=='filter' || this.current_step=='mapping')
|
611 |
{
|
612 |
+
if(this.is_step_loaded('mapping'))
|
613 |
+
{
|
614 |
+
this.load_meta_mapping_fields();
|
615 |
+
}else
|
616 |
+
{
|
617 |
+
this.load_steps(['mapping']);
|
618 |
+
}
|
619 |
+
|
620 |
}else if(this.current_step=='advanced')
|
621 |
{
|
622 |
wt_field_group.Set();
|
admin/modules/export/export.php
CHANGED
@@ -348,7 +348,7 @@ class Wt_Import_Export_For_Woo_Basic_Export
|
|
348 |
wp_enqueue_script($this->module_id, plugin_dir_url(__FILE__).'assets/js/main.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-datepicker'), WT_P_IEW_VERSION);
|
349 |
wp_enqueue_style('jquery-ui-datepicker');
|
350 |
wp_enqueue_style(WT_IEW_PLUGIN_ID_BASIC.'-jquery-ui', WT_P_IEW_PLUGIN_URL.'admin/css/jquery-ui.css', array(), WT_P_IEW_VERSION, 'all');
|
351 |
-
|
352 |
'item_type'=>'',
|
353 |
'steps'=>$this->steps,
|
354 |
'rerun_id'=>$this->rerun_id,
|
348 |
wp_enqueue_script($this->module_id, plugin_dir_url(__FILE__).'assets/js/main.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-datepicker'), WT_P_IEW_VERSION);
|
349 |
wp_enqueue_style('jquery-ui-datepicker');
|
350 |
wp_enqueue_style(WT_IEW_PLUGIN_ID_BASIC.'-jquery-ui', WT_P_IEW_PLUGIN_URL.'admin/css/jquery-ui.css', array(), WT_P_IEW_VERSION, 'all');
|
351 |
+
$params=array(
|
352 |
'item_type'=>'',
|
353 |
'steps'=>$this->steps,
|
354 |
'rerun_id'=>$this->rerun_id,
|
admin/modules/import/assets/js/main.js
CHANGED
@@ -5,7 +5,7 @@ var wt_iew_basic_import=(function( $ ) {
|
|
5 |
ajax_data:{},
|
6 |
selected_template:0,
|
7 |
selected_template_name:'',
|
8 |
-
to_import:'',
|
9 |
to_import_title:'',
|
10 |
import_method:'',
|
11 |
current_step:'',
|
@@ -471,7 +471,7 @@ var wt_iew_basic_import=(function( $ ) {
|
|
471 |
}
|
472 |
}
|
473 |
|
474 |
-
if(this.current_step=='method_import' && !this.is_valid_file) /* method import page, then check file validation is done. */
|
475 |
{
|
476 |
if(action_type=='step' && this.is_previous_step(action)) /* step action and previous step */
|
477 |
{
|
5 |
ajax_data:{},
|
6 |
selected_template:0,
|
7 |
selected_template_name:'',
|
8 |
+
to_import:'product',
|
9 |
to_import_title:'',
|
10 |
import_method:'',
|
11 |
current_step:'',
|
471 |
}
|
472 |
}
|
473 |
|
474 |
+
if(this.current_step=='method_import')// && !this.is_valid_file) /* method import page, then check file validation is done. */
|
475 |
{
|
476 |
if(action_type=='step' && this.is_previous_step(action)) /* step action and previous step */
|
477 |
{
|
admin/modules/import/import.php
CHANGED
@@ -106,7 +106,7 @@ class Wt_Import_Export_For_Woo_Basic_Import
|
|
106 |
public function advanced_setting_fields($fields)
|
107 |
{
|
108 |
$fields['enable_import_log']=array(
|
109 |
-
'label'=>__("
|
110 |
'type'=>'radio',
|
111 |
'radio_fields'=>array(
|
112 |
1=>__('Yes'),
|
@@ -115,7 +115,7 @@ class Wt_Import_Export_For_Woo_Basic_Import
|
|
115 |
'value' =>1,
|
116 |
'field_name'=>'enable_import_log',
|
117 |
'field_group'=>'advanced_field',
|
118 |
-
'help_text'=>__('
|
119 |
'validation_rule'=>array('type'=>'absint'),
|
120 |
);
|
121 |
$import_methods=array_map(function($vl){ return $vl['title']; }, $this->import_methods);
|
@@ -123,7 +123,7 @@ class Wt_Import_Export_For_Woo_Basic_Import
|
|
123 |
'label'=>__("Default Import method"),
|
124 |
'type'=>'select',
|
125 |
'sele_vals'=>$import_methods,
|
126 |
-
'value' =>'
|
127 |
'field_name'=>'default_import_method',
|
128 |
'field_group'=>'advanced_field',
|
129 |
'help_text'=>__('Select the default method of import.'),
|
106 |
public function advanced_setting_fields($fields)
|
107 |
{
|
108 |
$fields['enable_import_log']=array(
|
109 |
+
'label'=>__("Generate Import log"),
|
110 |
'type'=>'radio',
|
111 |
'radio_fields'=>array(
|
112 |
1=>__('Yes'),
|
115 |
'value' =>1,
|
116 |
'field_name'=>'enable_import_log',
|
117 |
'field_group'=>'advanced_field',
|
118 |
+
'help_text'=>__('Generate import log as text file and make it available in the history section.'),
|
119 |
'validation_rule'=>array('type'=>'absint'),
|
120 |
);
|
121 |
$import_methods=array_map(function($vl){ return $vl['title']; }, $this->import_methods);
|
123 |
'label'=>__("Default Import method"),
|
124 |
'type'=>'select',
|
125 |
'sele_vals'=>$import_methods,
|
126 |
+
'value' =>'new',
|
127 |
'field_name'=>'default_import_method',
|
128 |
'field_group'=>'advanced_field',
|
129 |
'help_text'=>__('Select the default method of import.'),
|
admin/modules/product/data/data-allowed-product-types.php
CHANGED
@@ -7,69 +7,6 @@ $allowed_product_types = array(
|
|
7 |
'simple' => __('Simple product', 'woocommerce'),
|
8 |
'grouped' => __('Grouped product', 'woocommerce'),
|
9 |
'external' => __('External/Affiliate product', 'woocommerce'),
|
10 |
-
'variable' => __('Variable product', 'woocommerce'),
|
11 |
);
|
12 |
|
13 |
-
|
14 |
-
// Subscription product types
|
15 |
-
if (class_exists('WC_Subscriptions')) {
|
16 |
-
$subscription_term = get_term_by('slug', 'subscription', 'product_type');
|
17 |
-
$variable_subscription_term = get_term_by('slug', 'variable-subscription', 'product_type');
|
18 |
-
|
19 |
-
$allowed_product_types['subscription'] = $subscription_term->name;
|
20 |
-
$allowed_product_types['variable-subscription'] = $variable_subscription_term->name;
|
21 |
-
}
|
22 |
-
|
23 |
-
// Composite product type
|
24 |
-
if (class_exists('WC_Composite_Products')) {
|
25 |
-
$composite_term = get_term_by('name', 'composite', 'product_type');
|
26 |
-
|
27 |
-
if ($composite_term) {
|
28 |
-
$allowed_product_types['composite'] = $composite_term->name;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
// Simple Auction product type
|
32 |
-
if (class_exists('WooCommerce_simple_auction')) {
|
33 |
-
$auction_term = get_term_by('name', 'auction', 'product_type');
|
34 |
-
|
35 |
-
if ($auction_term) {
|
36 |
-
$allowed_product_types['auction'] = $auction_term->name;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
// Bundle product type
|
41 |
-
if (class_exists('WC_Bundles')) {
|
42 |
-
$bundle_term = get_term_by('name', 'bundle', 'product_type');
|
43 |
-
|
44 |
-
if ($bundle_term) {
|
45 |
-
$allowed_product_types['bundle'] = $bundle_term->name;
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
// Wcpb Product Bundle
|
50 |
-
if (class_exists('WC_Product_Wcpb')) {
|
51 |
-
$wcbundle_term = get_term_by('name', 'wcpb', 'product_type');
|
52 |
-
|
53 |
-
if ($wcbundle_term) {
|
54 |
-
$allowed_product_types['wcpb'] = $wcbundle_term->name;
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
// Booking product types
|
59 |
-
if (class_exists('WC_Booking')) {
|
60 |
-
$booking_term = get_term_by('slug', 'booking', 'product_type');
|
61 |
-
|
62 |
-
if ($booking_term) {
|
63 |
-
$allowed_product_types['booking'] = $booking_term->name;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
// Photography product types
|
68 |
-
if (class_exists('WC_Photography')) {
|
69 |
-
$photography_term = get_term_by('slug', 'photography', 'product_type');
|
70 |
-
|
71 |
-
if ($photography_term) {
|
72 |
-
$allowed_product_types['photography'] = $photography_term->name;
|
73 |
-
}
|
74 |
-
}
|
75 |
return apply_filters('wt_iew_allowed_product_types', $allowed_product_types);
|
7 |
'simple' => __('Simple product', 'woocommerce'),
|
8 |
'grouped' => __('Grouped product', 'woocommerce'),
|
9 |
'external' => __('External/Affiliate product', 'woocommerce'),
|
|
|
10 |
);
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
return apply_filters('wt_iew_allowed_product_types', $allowed_product_types);
|
admin/modules/product/data/data-product-post-columns.php
CHANGED
@@ -12,58 +12,57 @@ if (function_exists('wc_get_filename_from_url')) {
|
|
12 |
|
13 |
|
14 |
$post_columns = array(
|
15 |
-
'post_title' => 'Product
|
16 |
-
'post_name' => 'Product
|
17 |
'post_parent' => 'Parent ID',
|
18 |
'ID' => 'ID',
|
19 |
-
'post_excerpt' => 'Short Description',
|
20 |
'post_content' => 'Description',
|
|
|
21 |
'post_status' => 'Status',
|
22 |
-
'post_password' => '
|
23 |
-
'menu_order' => '
|
24 |
-
'post_date' => '
|
25 |
-
'post_author' => '
|
26 |
-
'comment_status' => '
|
27 |
// Meta
|
28 |
|
29 |
-
'sku' => '
|
30 |
-
'parent_sku' => '
|
31 |
-
'
|
32 |
-
'
|
33 |
-
'
|
34 |
-
'
|
35 |
-
'
|
36 |
-
'
|
37 |
-
'
|
38 |
-
'
|
39 |
-
'
|
40 |
-
'
|
41 |
-
'
|
42 |
-
'
|
43 |
-
'
|
44 |
-
'
|
45 |
-
'
|
46 |
-
'
|
47 |
-
'
|
48 |
-
'
|
49 |
-
'
|
50 |
-
'
|
51 |
-
'
|
52 |
-
'
|
53 |
-
'
|
54 |
-
'sale_price_dates_to' => 'sale_price_dates_to',
|
55 |
// Downloadable products
|
56 |
-
'download_limit' => '
|
57 |
-
'download_expiry' => '
|
58 |
// Virtual products
|
59 |
-
'product_url' => '
|
60 |
-
'button_text' => '
|
61 |
|
62 |
|
63 |
|
64 |
'images' => 'Images (featured and gallery)',
|
65 |
"$file_path_header" => 'Downloadable file paths',
|
66 |
-
'product_page_url' => 'Product
|
67 |
//'taxonomies' => 'Taxonomies (cat/tags/shipping-class)',
|
68 |
//'meta' => 'Meta (custom fields)',
|
69 |
//'attributes' => 'Attributes',
|
12 |
|
13 |
|
14 |
$post_columns = array(
|
15 |
+
'post_title' => 'Product name',
|
16 |
+
'post_name' => 'Product slug',
|
17 |
'post_parent' => 'Parent ID',
|
18 |
'ID' => 'ID',
|
|
|
19 |
'post_content' => 'Description',
|
20 |
+
'post_excerpt' => 'Short description',
|
21 |
'post_status' => 'Status',
|
22 |
+
'post_password' => 'Post password',
|
23 |
+
'menu_order' => 'Menu order',
|
24 |
+
'post_date' => 'Post date',
|
25 |
+
'post_author' => 'Post author',
|
26 |
+
'comment_status' => 'Comment status',
|
27 |
// Meta
|
28 |
|
29 |
+
'sku' => 'SKU',
|
30 |
+
'parent_sku' => 'Parent SKU',
|
31 |
+
'children' => 'Children', //For Grouped products
|
32 |
+
'downloadable' => 'Downloadable',
|
33 |
+
'virtual' => 'Virtual',
|
34 |
+
'stock' => 'Stock',
|
35 |
+
'regular_price' => 'Regular price',
|
36 |
+
'sale_price' => 'Sale price',
|
37 |
+
'weight' => 'Weight',
|
38 |
+
'length' => 'Length',
|
39 |
+
'width' => 'Width',
|
40 |
+
'height' => 'Height',
|
41 |
+
'tax_class' => 'Tax class',
|
42 |
+
'visibility' => 'Visibility',
|
43 |
+
'stock_status' => 'Stock status',
|
44 |
+
'backorders' => 'Backorders',
|
45 |
+
'sold_individually' => 'Sold individually',
|
46 |
+
'low_stock_amount' => 'Low stock amount',
|
47 |
+
'manage_stock' => 'Manage stock',
|
48 |
+
'tax_status' => 'Tax status',
|
49 |
+
'upsell_ids' => 'Upsell IDs',
|
50 |
+
'crosssell_ids' => 'Crosssell IDs',
|
51 |
+
'purchase_note' => 'Purchase note',
|
52 |
+
'sale_price_dates_from' => 'Sale price dates from',
|
53 |
+
'sale_price_dates_to' => 'Sale price dates_to',
|
|
|
54 |
// Downloadable products
|
55 |
+
'download_limit' => 'Download limit',
|
56 |
+
'download_expiry' => 'Download expiry',
|
57 |
// Virtual products
|
58 |
+
'product_url' => 'Product URL',
|
59 |
+
'button_text' => 'Button text',
|
60 |
|
61 |
|
62 |
|
63 |
'images' => 'Images (featured and gallery)',
|
64 |
"$file_path_header" => 'Downloadable file paths',
|
65 |
+
'product_page_url' => 'Product page URL',
|
66 |
//'taxonomies' => 'Taxonomies (cat/tags/shipping-class)',
|
67 |
//'meta' => 'Meta (custom fields)',
|
68 |
//'attributes' => 'Attributes',
|
admin/modules/product/data/data/data-wf-reserved-fields-pair.php
CHANGED
@@ -2,54 +2,53 @@
|
|
2 |
|
3 |
// Reserved column names
|
4 |
$post_columns = array(
|
5 |
-
'post_title' => array('title'=>'Product
|
6 |
-
'post_name' => array('title'=>'Product
|
7 |
-
'ID' => array('title'=>'
|
8 |
'post_parent' => array('title'=>'Parent ID','description'=>'Parent Product ID , if you are importing variation Product'),
|
9 |
-
'post_status' => array('title'=>'
|
10 |
-
'post_content' => array('title'=>'
|
11 |
-
'post_excerpt' => array('title'=>'
|
12 |
-
'post_date' => array('title'=>'Post
|
13 |
-
'post_password' => array('title'=>'Post
|
14 |
-
'post_author' => array('title'=>'Product
|
15 |
-
'menu_order' => array('title'=>'Menu
|
16 |
-
'comment_status' => array('title'=>'Comment
|
17 |
//'post_date_gmt' => array('title'=>'Post Date GMT','description'=>'Tooltip data Status'),
|
18 |
-
|
19 |
-
'
|
20 |
-
'parent_sku' => array('title'=>'Parent SKU','description'=>'Parent Product SKU , if you are importing variation Product'),
|
21 |
-
|
22 |
-
'children' => array('title'=>'Children Product ID','description'=>'Linked Products id if you are importing Grouped products'),
|
23 |
'downloadable' => array('title'=>'Type: Downloadable','description'=>'Is Product is downloadable eg:- Book'),
|
24 |
'virtual' => array('title'=>'Type: Virtual','description'=>'Is Product is virtual'),
|
25 |
'visibility' => array('title'=>'Visibility: Visibility','description'=>'Visibility status ( hidden or visible)'),
|
26 |
'purchase_note' => array('title'=>'Purchase note','description'=>'Purchase note'),
|
27 |
'stock' => array('title'=>'Inventory: Stock','description'=>'Stock quantity'),
|
28 |
-
'stock_status' => array('title'=>'Inventory: Stock
|
29 |
'backorders' => array('title'=>'Inventory: Backorders','description'=>'Backorders'),
|
30 |
'sold_individually' => array('title'=>'Inventory: Sold individually','description'=>'Sold individually'),
|
31 |
'low_stock_amount' => array('title'=>'Inventory: Low stock amount','description'=>'Low stock amount'),
|
32 |
-
'manage_stock' => array('title'=>'Inventory: Manage
|
33 |
-
'sale_price' => array('title'=>'Price:
|
34 |
-
'regular_price' => array('title'=>'Price:
|
35 |
-
'sale_price_dates_from' => array('title'=>'Sale
|
36 |
-
'sale_price_dates_to' => array('title'=>'Sale
|
37 |
'weight' => array('title'=>'Dimensions: Weight','description'=>'Wight of product in LB , OZ , KG as of your woocommerce Unit'),
|
38 |
-
'length' => array('title'=>'Dimensions:
|
39 |
-
'width' => array('title'=>'Dimensions:
|
40 |
-
'height' => array('title'=>'Dimensions:
|
41 |
-
'tax_status' => array('title'=>'Tax: Tax
|
42 |
-
'tax_class' => array('title'=>'Tax: Tax
|
43 |
-
'upsell_ids' => array('title'=>'Related
|
44 |
-
'crosssell_ids' => array('title'=>'Related
|
45 |
-
'file_paths' => array('title'=>'Downloads: File
|
46 |
-
'downloadable_files' => array('title'=>'Downloads: Downloadable
|
47 |
-
'download_limit' => array('title'=>'Downloads: Download
|
48 |
-
'download_expiry' => array('title'=>'Downloads: Download
|
49 |
'product_url' => array('title'=>'External: Product URL','description'=>'Product URL if the Product is external'),
|
50 |
-
'button_text' => array('title'=>'External: Button
|
51 |
'images' => array('title'=>'Images/Gallery','description'=>'Image URLs seperated with |'),
|
52 |
-
'product_page_url' => array('title'=>'Product
|
53 |
'meta:total_sales' => array('title'=>'meta:total_sales','description'=>'Total sales for the Product'),
|
54 |
// 'tax:product_type' => array('title'=>'Product Type','description'=>'( eg:- simple , variable)'),
|
55 |
// 'tax:product_cat' => array('title'=>'Product Categories','description'=>'Product related categories'),
|
2 |
|
3 |
// Reserved column names
|
4 |
$post_columns = array(
|
5 |
+
'post_title' => array('title'=>'Product name','description'=>'Product Title. ie Name of the product'),
|
6 |
+
'post_name' => array('title'=>'Product permalink','description'=>'Unique part of the product URL'),
|
7 |
+
'ID' => array('title'=>'ID','description'=>'Product ID'),
|
8 |
'post_parent' => array('title'=>'Parent ID','description'=>'Parent Product ID , if you are importing variation Product'),
|
9 |
+
'post_status' => array('title'=>'Status','description'=>'Product Status ( published , draft ...)'),
|
10 |
+
'post_content' => array('title'=>'Description','description'=>'Description about the Product'),
|
11 |
+
'post_excerpt' => array('title'=>'Short description','description'=>'Short description about the Product'),
|
12 |
+
'post_date' => array('title'=>'Post date','description'=>'Product posted date', 'type' => 'date'),
|
13 |
+
'post_password' => array('title'=>'Post password','description'=>'To Protect a post with password'),
|
14 |
+
'post_author' => array('title'=>'Product author','description'=>'Product Author ( 1 - Admin )'),
|
15 |
+
'menu_order' => array('title'=>'Menu order','description'=>'If menu enabled , menu order'),
|
16 |
+
'comment_status' => array('title'=>'Comment status','description'=>'Comment Status ( Open or Closed comments for this prodcut)'),
|
17 |
//'post_date_gmt' => array('title'=>'Post Date GMT','description'=>'Tooltip data Status'),
|
18 |
+
|
19 |
+
'sku' => array('title'=>'SKU','description'=>'Product SKU - This will unique and Product identifier'),
|
20 |
+
'parent_sku' => array('title'=>'Parent SKU','description'=>'Parent Product SKU , if you are importing variation Product'),
|
21 |
+
'children' => array('title'=>'Child product ID','description'=>'Linked Products id if you are importing Grouped products'),
|
|
|
22 |
'downloadable' => array('title'=>'Type: Downloadable','description'=>'Is Product is downloadable eg:- Book'),
|
23 |
'virtual' => array('title'=>'Type: Virtual','description'=>'Is Product is virtual'),
|
24 |
'visibility' => array('title'=>'Visibility: Visibility','description'=>'Visibility status ( hidden or visible)'),
|
25 |
'purchase_note' => array('title'=>'Purchase note','description'=>'Purchase note'),
|
26 |
'stock' => array('title'=>'Inventory: Stock','description'=>'Stock quantity'),
|
27 |
+
'stock_status' => array('title'=>'Inventory: Stock status','description'=>'InStock or OutofStock'),
|
28 |
'backorders' => array('title'=>'Inventory: Backorders','description'=>'Backorders'),
|
29 |
'sold_individually' => array('title'=>'Inventory: Sold individually','description'=>'Sold individually'),
|
30 |
'low_stock_amount' => array('title'=>'Inventory: Low stock amount','description'=>'Low stock amount'),
|
31 |
+
'manage_stock' => array('title'=>'Inventory: Manage stock','description'=>'yes to enable no to disable'),
|
32 |
+
'sale_price' => array('title'=>'Price: sale price','description'=>'Sale Price'),
|
33 |
+
'regular_price' => array('title'=>'Price: regular price','description'=>'Regular Price'),
|
34 |
+
'sale_price_dates_from' => array('title'=>'Sale price dates: From','description'=>'Sale Price Dates effect from', 'type' => 'date'),
|
35 |
+
'sale_price_dates_to' => array('title'=>'Sale price dates: To','description'=>'Sale Price Dates effect to', 'type' => 'date'),
|
36 |
'weight' => array('title'=>'Dimensions: Weight','description'=>'Wight of product in LB , OZ , KG as of your woocommerce Unit'),
|
37 |
+
'length' => array('title'=>'Dimensions: Length','description'=>'Length'),
|
38 |
+
'width' => array('title'=>'Dimensions: Width','description'=>'Width'),
|
39 |
+
'height' => array('title'=>'Dimensions: Height','description'=>'Height'),
|
40 |
+
'tax_status' => array('title'=>'Tax: Tax status','description'=>'Taxable product or not'),
|
41 |
+
'tax_class' => array('title'=>'Tax: Tax class','description'=>'Tax class ( eg:- reduced rate)'),
|
42 |
+
'upsell_ids' => array('title'=>'Related products: Upsell IDs','description'=>'Upsell Product ids'),
|
43 |
+
'crosssell_ids' => array('title'=>'Related products: Crosssell IDs','description'=>'Crosssell Product ids'),
|
44 |
+
'file_paths' => array('title'=>'Downloads: File paths (WC 2.0.x)','description'=>'File Paths'),
|
45 |
+
'downloadable_files' => array('title'=>'Downloads: Downloadable files (WC 2.1.x)','description'=>'Downloadable Files'),
|
46 |
+
'download_limit' => array('title'=>'Downloads: Download limit','description'=>'Download Limit'),
|
47 |
+
'download_expiry' => array('title'=>'Downloads: Download expiry','description'=>'Download Expiry'),
|
48 |
'product_url' => array('title'=>'External: Product URL','description'=>'Product URL if the Product is external'),
|
49 |
+
'button_text' => array('title'=>'External: Button text','description'=>'Buy button text for Product , if the Product is external'),
|
50 |
'images' => array('title'=>'Images/Gallery','description'=>'Image URLs seperated with |'),
|
51 |
+
'product_page_url' => array('title'=>'Product page URL','description'=>'Product Page URL'),
|
52 |
'meta:total_sales' => array('title'=>'meta:total_sales','description'=>'Total sales for the Product'),
|
53 |
// 'tax:product_type' => array('title'=>'Product Type','description'=>'( eg:- simple , variable)'),
|
54 |
// 'tax:product_cat' => array('title'=>'Product Categories','description'=>'Product related categories'),
|
admin/modules/product/export/export.php
CHANGED
@@ -17,7 +17,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Export {
|
|
17 |
public function prepare_header() {
|
18 |
|
19 |
$export_columns = $this->parent_module->get_selected_column_names();
|
20 |
-
|
21 |
return apply_filters('hf_alter_product_export_csv_columns', $export_columns);
|
22 |
}
|
23 |
|
@@ -109,7 +109,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Export {
|
|
109 |
|
110 |
$args = apply_filters("woocommerce_csv_product_export_args", $args);
|
111 |
$products = wc_get_products($args);
|
112 |
-
|
113 |
$total_products=0;
|
114 |
if($batch_offset==0) //first batch
|
115 |
{
|
@@ -124,13 +124,12 @@ class Wt_Import_Export_For_Woo_Basic_Product_Export {
|
|
124 |
$products_ids = $products;
|
125 |
}else{
|
126 |
$products_ids = $products->products;
|
127 |
-
}
|
128 |
-
|
129 |
|
130 |
foreach ($products_ids as $key => $product_id) {
|
131 |
$product = wc_get_product($product_id);
|
132 |
-
|
133 |
-
if ($product->is_type('variable')
|
134 |
continue;
|
135 |
}else{
|
136 |
$product_array[] = $this->generate_row_data_wc_lower($product);
|
@@ -138,7 +137,8 @@ class Wt_Import_Export_For_Woo_Basic_Product_Export {
|
|
138 |
|
139 |
}
|
140 |
|
141 |
-
}
|
|
|
142 |
return array(
|
143 |
'total' => $total_products,
|
144 |
'data' => $product_array,
|
@@ -212,7 +212,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Export {
|
|
212 |
if (!$key) {
|
213 |
continue;
|
214 |
}
|
215 |
-
|
216 |
$key_to_find_default_attribute = $key;
|
217 |
if ($attribute['is_taxonomy'] == 1) {
|
218 |
$terms = wp_get_post_terms($product->ID, $key, array("fields" => "names"));
|
@@ -537,7 +537,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Export {
|
|
537 |
|
538 |
// handling default meta and other columns
|
539 |
if (isset($product->meta->$column)) {
|
540 |
-
if (in_array($column, array('_children','_upsell_ids','_crosssell_ids'))) {
|
541 |
if ($this->export_children_sku) {
|
542 |
$children_sku = '';
|
543 |
$children_id_array = str_replace('"', '', explode('|', trim($product->meta->$column, '[' . ']')));
|
17 |
public function prepare_header() {
|
18 |
|
19 |
$export_columns = $this->parent_module->get_selected_column_names();
|
20 |
+
|
21 |
return apply_filters('hf_alter_product_export_csv_columns', $export_columns);
|
22 |
}
|
23 |
|
109 |
|
110 |
$args = apply_filters("woocommerce_csv_product_export_args", $args);
|
111 |
$products = wc_get_products($args);
|
112 |
+
|
113 |
$total_products=0;
|
114 |
if($batch_offset==0) //first batch
|
115 |
{
|
124 |
$products_ids = $products;
|
125 |
}else{
|
126 |
$products_ids = $products->products;
|
127 |
+
}
|
|
|
128 |
|
129 |
foreach ($products_ids as $key => $product_id) {
|
130 |
$product = wc_get_product($product_id);
|
131 |
+
|
132 |
+
if ($product->is_type('variable') ) {
|
133 |
continue;
|
134 |
}else{
|
135 |
$product_array[] = $this->generate_row_data_wc_lower($product);
|
137 |
|
138 |
}
|
139 |
|
140 |
+
}
|
141 |
+
|
142 |
return array(
|
143 |
'total' => $total_products,
|
144 |
'data' => $product_array,
|
212 |
if (!$key) {
|
213 |
continue;
|
214 |
}
|
215 |
+
$key = rawurldecode($key);
|
216 |
$key_to_find_default_attribute = $key;
|
217 |
if ($attribute['is_taxonomy'] == 1) {
|
218 |
$terms = wp_get_post_terms($product->ID, $key, array("fields" => "names"));
|
537 |
|
538 |
// handling default meta and other columns
|
539 |
if (isset($product->meta->$column)) {
|
540 |
+
if (in_array($column, array('_children', 'children', '_upsell_ids','_crosssell_ids'))) {
|
541 |
if ($this->export_children_sku) {
|
542 |
$children_sku = '';
|
543 |
$children_id_array = str_replace('"', '', explode('|', trim($product->meta->$column, '[' . ']')));
|
admin/modules/product/import/import.php
CHANGED
@@ -175,9 +175,9 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
175 |
$mapped_data = apply_filters('wt_woocommerce_product_importer_pre_parse_data', $mapped_data);
|
176 |
|
177 |
$this->item_data = array(); // resetting WC default data before parsing new item to avoid merging last parsed item wp_parse_args
|
178 |
-
$this->product_id =
|
179 |
-
|
180 |
-
if((isset($mapped_data['ID']) && !empty($mapped_data['ID']))||(isset($mapped_data['_sku']) && !empty($mapped_data['_sku'])) ||(isset($mapped_data['sku']) && !empty($mapped_data['sku']))){
|
181 |
$this->item_data['id'] = $this->wt_product_existance_check($mapped_data); // to determine wether merge or import
|
182 |
}
|
183 |
|
@@ -192,7 +192,34 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
192 |
$this->item_data['id'] = $this->product_id; // re assinging id after reset default product datas for merge, $this->product_id set from wt_product_existance_check
|
193 |
}
|
194 |
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
foreach ($mapped_data as $column => $value) {
|
198 |
|
@@ -373,7 +400,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
373 |
$this->item_data['shipping_class_id'] = $this->wt_parse_shipping_class_field($value);
|
374 |
continue;
|
375 |
}
|
376 |
-
if ('downloads' == $column || '_downloadable_files' == $column) {
|
377 |
$this->item_data['downloads'] = $this->wt_parse_downloads_field($value);
|
378 |
continue;
|
379 |
}
|
@@ -818,9 +845,10 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
818 |
|
819 |
|
820 |
|
821 |
-
public function wt_product_existance_check($data){
|
822 |
global $wpdb;
|
823 |
$product_id = 0;
|
|
|
824 |
$this->is_product_exist = false;
|
825 |
|
826 |
$id = isset($data['ID']) && !empty($data['ID']) ? absint($data['ID']) : 0;
|
@@ -832,6 +860,8 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
832 |
$this->is_product_exist = true;
|
833 |
$product_id = $id_found_with_id;
|
834 |
}
|
|
|
|
|
835 |
}
|
836 |
}
|
837 |
|
@@ -883,7 +913,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
883 |
|
884 |
|
885 |
|
886 |
-
|
887 |
* Parse relative field and return ID.
|
888 |
*
|
889 |
* Handles `id` and Product SKU.
|
@@ -900,19 +930,25 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
900 |
return $this->item_data['id'];
|
901 |
}
|
902 |
|
903 |
-
|
|
|
|
|
|
|
904 |
$id = isset($data['ID']) && !empty($data['ID']) ? absint($data['ID']) : 0;
|
905 |
$found_id = $this->wt_product_existance_check($id);
|
906 |
if($found_id){
|
907 |
return $found_id;
|
908 |
}
|
909 |
-
|
910 |
-
|
|
|
911 |
$postdata = array( // if not specifiying id (id is empty) or if not found by given id or Product
|
912 |
-
'post_title' => (
|
913 |
'post_status' => 'importing',
|
914 |
'post_type' => $this->post_type,
|
915 |
-
|
|
|
|
|
916 |
if(isset($id) && !empty($id)){
|
917 |
$postdata['import_id'] = $id;
|
918 |
}
|
@@ -926,8 +962,6 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
926 |
}
|
927 |
|
928 |
}
|
929 |
-
|
930 |
-
|
931 |
/**
|
932 |
* Parse a comma-delineated field from a CSV.
|
933 |
*
|
@@ -1329,7 +1363,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1329 |
}
|
1330 |
|
1331 |
$object = $this->get_product_object($data);
|
1332 |
-
|
1333 |
if (is_wp_error($object)) {
|
1334 |
return $object;
|
1335 |
}
|
@@ -1373,15 +1407,9 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1373 |
}else{
|
1374 |
$data['raw_attributes'] = array();
|
1375 |
}
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
$this->set_variation_data($object, $data);
|
1380 |
-
} else {
|
1381 |
-
$this->set_product_data($object, $data);
|
1382 |
-
}
|
1383 |
-
|
1384 |
-
|
1385 |
$this->set_image_data($object, $data);
|
1386 |
|
1387 |
$this->set_meta_data($object, $data);
|
@@ -1412,19 +1440,24 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1412 |
}
|
1413 |
}
|
1414 |
|
1415 |
-
function get_product_object($data) {
|
1416 |
-
|
1417 |
$id = isset($data['id']) ? absint($data['id']) : 0;
|
1418 |
|
1419 |
// Type is the most important part here because we need to be using the correct class and methods.
|
1420 |
if (isset($data['type'])) {
|
1421 |
-
$types = array('simple','grouped','external');
|
1422 |
|
1423 |
if (!in_array($data['type'], $types, true)) {
|
1424 |
return new WP_Error('woocommerce_product_importer_invalid_type', __('Invalid product type.', 'woocommerce'), array('status' => 401));
|
1425 |
}
|
1426 |
-
|
1427 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1428 |
$product = wc_get_product($id);
|
1429 |
if (!$product) {
|
1430 |
return new WP_Error(
|
@@ -1435,73 +1468,12 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1435 |
)
|
1436 |
);
|
1437 |
}
|
|
|
|
|
1438 |
}
|
1439 |
|
1440 |
return apply_filters('wt_woocommerce_product_import_get_product_object', $product, $data);
|
1441 |
-
|
1442 |
-
|
1443 |
-
function set_variation_data(&$variation, $data) {
|
1444 |
-
$parent = false;
|
1445 |
-
|
1446 |
-
// Check if parent exist.
|
1447 |
-
if (isset($data['parent_id'])) {
|
1448 |
-
$parent = wc_get_product($data['parent_id']);
|
1449 |
-
|
1450 |
-
if ($parent) {
|
1451 |
-
$variation->set_parent_id($parent->get_id());
|
1452 |
-
}
|
1453 |
-
}
|
1454 |
-
|
1455 |
-
// Stop if parent does not exists.
|
1456 |
-
if (!$parent) {
|
1457 |
-
return new WP_Error('woocommerce_product_importer_missing_variation_parent_id', 'Variation cannot be imported: Missing parent ID or parent does not exist yet.', array('status' => 401));
|
1458 |
-
}
|
1459 |
-
|
1460 |
-
// Stop if parent is a product variation.
|
1461 |
-
if ($parent->is_type('variation')) {
|
1462 |
-
return new WP_Error('woocommerce_product_importer_parent_set_as_variation', 'Variation cannot be imported: Parent product cannot be a product variation', array('status' => 401));
|
1463 |
-
}
|
1464 |
-
|
1465 |
-
if (isset($data['raw_attributes']) && !empty($data['raw_attributes'])) {
|
1466 |
-
$attributes = array();
|
1467 |
-
$parent_attributes = $this->get_variation_parent_attributes($data['raw_attributes'], $parent);
|
1468 |
-
|
1469 |
-
foreach ($data['raw_attributes'] as $attribute) {
|
1470 |
-
$attribute_id = 0;
|
1471 |
-
|
1472 |
-
// Get ID if is a global attribute.
|
1473 |
-
if (!empty($attribute['taxonomy'])) {
|
1474 |
-
$attribute_id = $this->get_attribute_taxonomy_id($attribute['name']);
|
1475 |
-
}
|
1476 |
-
|
1477 |
-
if ($attribute_id) {
|
1478 |
-
$attribute_name = wc_attribute_taxonomy_name_by_id($attribute_id);
|
1479 |
-
} else {
|
1480 |
-
$attribute_name = sanitize_title($attribute['name']);
|
1481 |
-
}
|
1482 |
-
|
1483 |
-
if (!isset($parent_attributes[$attribute_name]) || !$parent_attributes[$attribute_name]->get_variation()) {
|
1484 |
-
continue;
|
1485 |
-
}
|
1486 |
-
|
1487 |
-
$attribute_key = sanitize_title($parent_attributes[$attribute_name]->get_name());
|
1488 |
-
$attribute_value = isset($attribute['value']) ? current($attribute['value']) : '';
|
1489 |
-
|
1490 |
-
if ($parent_attributes[$attribute_name]->is_taxonomy()) {
|
1491 |
-
// If dealing with a taxonomy, we need to get the slug from the name posted to the API.
|
1492 |
-
$term = get_term_by('name', $attribute_value, $attribute_name);
|
1493 |
-
|
1494 |
-
if ($term && !is_wp_error($term)) {
|
1495 |
-
$attribute_value = $term->slug;
|
1496 |
-
} else {
|
1497 |
-
$attribute_value = sanitize_title($attribute_value);
|
1498 |
-
}
|
1499 |
-
}
|
1500 |
-
|
1501 |
-
$attributes[$attribute_key] = $attribute_value;
|
1502 |
-
}
|
1503 |
-
$variation->set_attributes($attributes);
|
1504 |
-
}
|
1505 |
}
|
1506 |
|
1507 |
function get_attribute_taxonomy_id($raw_name) {
|
@@ -1522,10 +1494,11 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1522 |
return $attribute_id;
|
1523 |
}
|
1524 |
|
|
|
1525 |
// If the attribute does not exist, create it.
|
1526 |
$attribute_id = wc_create_attribute(
|
1527 |
array(
|
1528 |
-
'name' => $
|
1529 |
'slug' => $attribute_name,
|
1530 |
'type' => 'select',
|
1531 |
'order_by' => 'menu_order',
|
@@ -1605,7 +1578,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1605 |
$attributes = array();
|
1606 |
$default_attributes = array();
|
1607 |
$existing_attributes = $product->get_attributes();
|
1608 |
-
|
1609 |
foreach ($data['raw_attributes'] as $position => $attribute) {
|
1610 |
$attribute_id = 0;
|
1611 |
|
@@ -1627,14 +1600,6 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1627 |
// Set if is a variation attribute based on existing attributes if possible so updates via CSV do not change this.
|
1628 |
$is_variation = 0;
|
1629 |
|
1630 |
-
if ($existing_attributes) {
|
1631 |
-
foreach ($existing_attributes as $existing_attribute) {
|
1632 |
-
if (method_exists($existing_attribute,'get_name') && $existing_attribute->get_name() === $attribute_name) {
|
1633 |
-
$is_variation = $existing_attribute->get_variation();
|
1634 |
-
break;
|
1635 |
-
}
|
1636 |
-
}
|
1637 |
-
}
|
1638 |
|
1639 |
if ($attribute_id) {
|
1640 |
if (isset($attribute['value'])) {
|
@@ -1663,7 +1628,7 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1663 |
$attribute_object->set_id($attribute_id);
|
1664 |
$attribute_object->set_name($attribute_name);
|
1665 |
$attribute_object->set_options($options);
|
1666 |
-
$attribute_object->set_position($position);
|
1667 |
$attribute_object->set_visible($is_visible);
|
1668 |
$attribute_object->set_variation($is_variation);
|
1669 |
$attributes[] = $attribute_object;
|
@@ -1678,19 +1643,21 @@ class Wt_Import_Export_For_Woo_Basic_Product_Import {
|
|
1678 |
$attribute_object = new WC_Product_Attribute();
|
1679 |
$attribute_object->set_name($attribute['name']);
|
1680 |
$attribute_object->set_options($attribute['value']);
|
1681 |
-
$attribute_object->set_position($position);
|
1682 |
$attribute_object->set_visible($is_visible);
|
1683 |
$attribute_object->set_variation($is_variation);
|
1684 |
$attributes[] = $attribute_object;
|
1685 |
}
|
1686 |
}
|
1687 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1688 |
$product->set_attributes($attributes);
|
1689 |
|
1690 |
-
// Set variable default attributes.
|
1691 |
-
if ($product->is_type('variable')) {
|
1692 |
-
$product->set_default_attributes($default_attributes);
|
1693 |
-
}
|
1694 |
}
|
1695 |
}
|
1696 |
|
175 |
$mapped_data = apply_filters('wt_woocommerce_product_importer_pre_parse_data', $mapped_data);
|
176 |
|
177 |
$this->item_data = array(); // resetting WC default data before parsing new item to avoid merging last parsed item wp_parse_args
|
178 |
+
$this->product_id = '';
|
179 |
+
|
180 |
+
if((isset($mapped_data['ID']) && !empty($mapped_data['ID']))||(isset($mapped_data['_sku']) && !empty($mapped_data['_sku'])) || (isset($mapped_data['sku']) && !empty($mapped_data['sku']))){
|
181 |
$this->item_data['id'] = $this->wt_product_existance_check($mapped_data); // to determine wether merge or import
|
182 |
}
|
183 |
|
192 |
$this->item_data['id'] = $this->product_id; // re assinging id after reset default product datas for merge, $this->product_id set from wt_product_existance_check
|
193 |
}
|
194 |
|
195 |
+
// Relative stock updates
|
196 |
+
if ($this->merge && $this->product_id) {
|
197 |
+
if (isset($mapped_data['stock'])) {
|
198 |
+
|
199 |
+
$mapped_data['stock'] = trim($mapped_data['stock']);
|
200 |
+
|
201 |
+
$mode = substr($mapped_data['stock'], 0, 3);
|
202 |
+
|
203 |
+
if ($mode == '(+)') {
|
204 |
+
$old_stock = intval(get_post_meta($this->product_id, '_stock', true));
|
205 |
+
$amount = intval(substr($mapped_data['stock'], 3));
|
206 |
+
$new_stock = $old_stock + $amount;
|
207 |
+
$mapped_data['stock'] = $new_stock;
|
208 |
+
}
|
209 |
+
|
210 |
+
if ($mode == '(-)') {
|
211 |
+
$old_stock = intval(get_post_meta($this->product_id, '_stock', true));
|
212 |
+
$amount = intval(substr($mapped_data['stock'], 3));
|
213 |
+
$new_stock = $old_stock - $amount;
|
214 |
+
$mapped_data['stock'] = $new_stock;
|
215 |
+
}
|
216 |
+
}
|
217 |
+
}
|
218 |
+
|
219 |
+
if (!isset($data['meta_mapping_fields']['taxonomies']['tax:product_type'])) {
|
220 |
+
$this->item_data['type'] = 'simple';
|
221 |
+
|
222 |
+
}
|
223 |
|
224 |
foreach ($mapped_data as $column => $value) {
|
225 |
|
400 |
$this->item_data['shipping_class_id'] = $this->wt_parse_shipping_class_field($value);
|
401 |
continue;
|
402 |
}
|
403 |
+
if ('downloads' == $column || '_downloadable_files' == $column || 'downloadable_files' == $column) {
|
404 |
$this->item_data['downloads'] = $this->wt_parse_downloads_field($value);
|
405 |
continue;
|
406 |
}
|
845 |
|
846 |
|
847 |
|
848 |
+
public function wt_product_existance_check($data){
|
849 |
global $wpdb;
|
850 |
$product_id = 0;
|
851 |
+
$this->product_id = '';
|
852 |
$this->is_product_exist = false;
|
853 |
|
854 |
$id = isset($data['ID']) && !empty($data['ID']) ? absint($data['ID']) : 0;
|
860 |
$this->is_product_exist = true;
|
861 |
$product_id = $id_found_with_id;
|
862 |
}
|
863 |
+
}else{
|
864 |
+
$product_id = $data['ID'];
|
865 |
}
|
866 |
}
|
867 |
|
913 |
|
914 |
|
915 |
|
916 |
+
/**
|
917 |
* Parse relative field and return ID.
|
918 |
*
|
919 |
* Handles `id` and Product SKU.
|
930 |
return $this->item_data['id'];
|
931 |
}
|
932 |
|
933 |
+
// global $wpdb;
|
934 |
+
// $product_id = 0;
|
935 |
+
// $this->is_product_exist = false;
|
936 |
+
//
|
937 |
$id = isset($data['ID']) && !empty($data['ID']) ? absint($data['ID']) : 0;
|
938 |
$found_id = $this->wt_product_existance_check($id);
|
939 |
if($found_id){
|
940 |
return $found_id;
|
941 |
}
|
942 |
+
|
943 |
+
|
944 |
+
$this->item_data['type'] = isset($this->item_data['type']) ? $this->item_data['type'] : 'simple';
|
945 |
$postdata = array( // if not specifiying id (id is empty) or if not found by given id or Product
|
946 |
+
'post_title' => ($this->item_data['type'] == 'variation' ? 'product variation' : $this->item_data['name'] ),
|
947 |
'post_status' => 'importing',
|
948 |
'post_type' => $this->post_type,
|
949 |
+
'post_content' => isset($this->item_data['description']) ? $this->item_data['description'] : '',
|
950 |
+
'post_excerpt' => isset($this->item_data['short_description']) ? $this->item_data['short_description'] : ''
|
951 |
+
);
|
952 |
if(isset($id) && !empty($id)){
|
953 |
$postdata['import_id'] = $id;
|
954 |
}
|
962 |
}
|
963 |
|
964 |
}
|
|
|
|
|
965 |
/**
|
966 |
* Parse a comma-delineated field from a CSV.
|
967 |
*
|
1363 |
}
|
1364 |
|
1365 |
$object = $this->get_product_object($data);
|
1366 |
+
|
1367 |
if (is_wp_error($object)) {
|
1368 |
return $object;
|
1369 |
}
|
1407 |
}else{
|
1408 |
$data['raw_attributes'] = array();
|
1409 |
}
|
1410 |
+
|
1411 |
+
$this->set_product_data($object, $data);
|
1412 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
1413 |
$this->set_image_data($object, $data);
|
1414 |
|
1415 |
$this->set_meta_data($object, $data);
|
1440 |
}
|
1441 |
}
|
1442 |
|
1443 |
+
function get_product_object($data) {
|
|
|
1444 |
$id = isset($data['id']) ? absint($data['id']) : 0;
|
1445 |
|
1446 |
// Type is the most important part here because we need to be using the correct class and methods.
|
1447 |
if (isset($data['type'])) {
|
1448 |
+
$types = array('simple', 'grouped', 'external');
|
1449 |
|
1450 |
if (!in_array($data['type'], $types, true)) {
|
1451 |
return new WP_Error('woocommerce_product_importer_invalid_type', __('Invalid product type.', 'woocommerce'), array('status' => 401));
|
1452 |
}
|
1453 |
+
|
1454 |
+
try {
|
1455 |
+
|
1456 |
+
$product = wt_wc_get_product_object($data['type'], $id);
|
1457 |
+
} catch (WC_Data_Exception $e) {
|
1458 |
+
return new WP_Error('woocommerce_product_csv_importer_' . $e->getErrorCode(), $e->getMessage(), array('status' => 401));
|
1459 |
+
}
|
1460 |
+
} elseif (!empty($data['id'])) {
|
1461 |
$product = wc_get_product($id);
|
1462 |
if (!$product) {
|
1463 |
return new WP_Error(
|
1468 |
)
|
1469 |
);
|
1470 |
}
|
1471 |
+
} else {
|
1472 |
+
$product = wt_wc_get_product_object('simple', $id);
|
1473 |
}
|
1474 |
|
1475 |
return apply_filters('wt_woocommerce_product_import_get_product_object', $product, $data);
|
1476 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1477 |
}
|
1478 |
|
1479 |
function get_attribute_taxonomy_id($raw_name) {
|
1494 |
return $attribute_id;
|
1495 |
}
|
1496 |
|
1497 |
+
$beautify_attr_name = ucfirst(str_replace('-', ' ', $raw_name));
|
1498 |
// If the attribute does not exist, create it.
|
1499 |
$attribute_id = wc_create_attribute(
|
1500 |
array(
|
1501 |
+
'name' => $beautify_attr_name,
|
1502 |
'slug' => $attribute_name,
|
1503 |
'type' => 'select',
|
1504 |
'order_by' => 'menu_order',
|
1578 |
$attributes = array();
|
1579 |
$default_attributes = array();
|
1580 |
$existing_attributes = $product->get_attributes();
|
1581 |
+
|
1582 |
foreach ($data['raw_attributes'] as $position => $attribute) {
|
1583 |
$attribute_id = 0;
|
1584 |
|
1600 |
// Set if is a variation attribute based on existing attributes if possible so updates via CSV do not change this.
|
1601 |
$is_variation = 0;
|
1602 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1603 |
|
1604 |
if ($attribute_id) {
|
1605 |
if (isset($attribute['value'])) {
|
1628 |
$attribute_object->set_id($attribute_id);
|
1629 |
$attribute_object->set_name($attribute_name);
|
1630 |
$attribute_object->set_options($options);
|
1631 |
+
$attribute_object->set_position($attribute['position']);
|
1632 |
$attribute_object->set_visible($is_visible);
|
1633 |
$attribute_object->set_variation($is_variation);
|
1634 |
$attributes[] = $attribute_object;
|
1643 |
$attribute_object = new WC_Product_Attribute();
|
1644 |
$attribute_object->set_name($attribute['name']);
|
1645 |
$attribute_object->set_options($attribute['value']);
|
1646 |
+
$attribute_object->set_position($attribute['position']);
|
1647 |
$attribute_object->set_visible($is_visible);
|
1648 |
$attribute_object->set_variation($is_variation);
|
1649 |
$attributes[] = $attribute_object;
|
1650 |
}
|
1651 |
}
|
1652 |
|
1653 |
+
if(isset($existing_attributes)){
|
1654 |
+
foreach ($existing_attributes as $key => $existing_attribute) {
|
1655 |
+
$attributes[] = $existing_attribute;
|
1656 |
+
}
|
1657 |
+
}
|
1658 |
+
|
1659 |
$product->set_attributes($attributes);
|
1660 |
|
|
|
|
|
|
|
|
|
1661 |
}
|
1662 |
}
|
1663 |
|
admin/modules/product/product.php
CHANGED
@@ -241,14 +241,16 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
241 |
}
|
242 |
|
243 |
public static function get_product_types() {
|
244 |
-
|
245 |
-
|
246 |
$product_types = array();
|
247 |
foreach ( wc_get_product_types() as $value => $label ) {
|
248 |
$product_types[esc_attr( $value )] = esc_html( $label );
|
249 |
}
|
250 |
|
251 |
return array_merge($product_types, array('variation' => 'Product variations'));
|
|
|
|
|
252 |
}
|
253 |
|
254 |
public static function get_product_statuses() {
|
@@ -491,7 +493,7 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
491 |
$found_vattributes = self::get_all_product_attributes('product_variation');
|
492 |
$found_attributes = array_merge($found_pattributes, $found_vattributes);
|
493 |
$found_attributes = array_unique($found_attributes);
|
494 |
-
|
495 |
$this->product_attributes = $found_attributes;
|
496 |
return $this->product_attributes;
|
497 |
}
|
@@ -571,7 +573,7 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
571 |
$out = array();
|
572 |
|
573 |
$out['skip_new'] = array(
|
574 |
-
'label' => __("
|
575 |
'type' => 'radio',
|
576 |
'radio_fields' => array(
|
577 |
'1' => __('Yes'),
|
@@ -581,13 +583,13 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
581 |
'field_name' => 'skip_new',
|
582 |
'help_text_conditional'=>array(
|
583 |
array(
|
584 |
-
'help_text'=> __('
|
585 |
'condition'=>array(
|
586 |
array('field'=>'wt_iew_skip_new', 'value'=>1)
|
587 |
)
|
588 |
),
|
589 |
array(
|
590 |
-
'help_text'=> __('
|
591 |
'condition'=>array(
|
592 |
array('field'=>'wt_iew_skip_new', 'value'=>0)
|
593 |
)
|
@@ -608,14 +610,18 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
608 |
),
|
609 |
'value' => 'id',
|
610 |
'field_name' => 'merge_with',
|
611 |
-
'help_text' => __('The products are either looked up based on their ID or SKU as per the selection.'),
|
612 |
'help_text_conditional'=>array(
|
613 |
array(
|
614 |
-
'help_text'=> __('
|
615 |
'condition'=>array(
|
616 |
array('field'=>'wt_iew_merge_with', 'value'=>'id'),
|
617 |
-
|
618 |
-
|
|
|
|
|
|
|
|
|
619 |
)
|
620 |
)
|
621 |
)
|
@@ -632,13 +638,13 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
632 |
'field_name' => 'found_action',
|
633 |
'help_text_conditional'=>array(
|
634 |
array(
|
635 |
-
'help_text'=> __('
|
636 |
'condition'=>array(
|
637 |
array('field'=>'wt_iew_found_action', 'value'=>'skip')
|
638 |
)
|
639 |
),
|
640 |
array(
|
641 |
-
'help_text'=> __('
|
642 |
'condition'=>array(
|
643 |
array('field'=>'wt_iew_found_action', 'value'=>'update')
|
644 |
)
|
@@ -693,6 +699,7 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
693 |
$fields['product'] = array(
|
694 |
'label' => __('Products', 'wt-import-export-for-woo'),
|
695 |
'placeholder' => __('All products', 'wt-import-export-for-woo'),
|
|
|
696 |
'field_name' => 'product',
|
697 |
'sele_vals' => array(),
|
698 |
'help_text' => __('Export specific products. Keyin the product names to export to export multiple products.', 'wt-import-export-for-woo'),
|
@@ -704,6 +711,7 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
704 |
$fields['exclude_product'] = array(
|
705 |
'label' => __('Exclude products', 'wt-import-export-for-woo'),
|
706 |
'placeholder' => __('Exclude products', 'wt-import-export-for-woo'),
|
|
|
707 |
'field_name' => 'exclude_product',
|
708 |
'sele_vals' => array(),
|
709 |
'help_text' => __('Use this if you need to exclude a specific or multiple products from your export list.', 'wt-import-export-for-woo'),
|
@@ -720,7 +728,7 @@ class Wt_Import_Export_For_Woo_Basic_Product {
|
|
720 |
'help_text' => __('Export products belonging to a particular or from multiple categories. Just select the respective categories.', 'wt-import-export-for-woo'),
|
721 |
'type' => 'multi_select',
|
722 |
'css_class' => 'wc-enhanced-select',
|
723 |
-
'validation_rule' => array('type'=>'
|
724 |
);
|
725 |
|
726 |
$fields['product_tags'] = array(
|
241 |
}
|
242 |
|
243 |
public static function get_product_types() {
|
244 |
+
return include plugin_dir_path(__FILE__) . 'data/data-allowed-product-types.php';
|
245 |
+
/*
|
246 |
$product_types = array();
|
247 |
foreach ( wc_get_product_types() as $value => $label ) {
|
248 |
$product_types[esc_attr( $value )] = esc_html( $label );
|
249 |
}
|
250 |
|
251 |
return array_merge($product_types, array('variation' => 'Product variations'));
|
252 |
+
*
|
253 |
+
*/
|
254 |
}
|
255 |
|
256 |
public static function get_product_statuses() {
|
493 |
$found_vattributes = self::get_all_product_attributes('product_variation');
|
494 |
$found_attributes = array_merge($found_pattributes, $found_vattributes);
|
495 |
$found_attributes = array_unique($found_attributes);
|
496 |
+
$found_attributes = array_map('rawurldecode', $found_attributes);
|
497 |
$this->product_attributes = $found_attributes;
|
498 |
return $this->product_attributes;
|
499 |
}
|
573 |
$out = array();
|
574 |
|
575 |
$out['skip_new'] = array(
|
576 |
+
'label' => __("Skip import of new products"),
|
577 |
'type' => 'radio',
|
578 |
'radio_fields' => array(
|
579 |
'1' => __('Yes'),
|
583 |
'field_name' => 'skip_new',
|
584 |
'help_text_conditional'=>array(
|
585 |
array(
|
586 |
+
'help_text'=> __('This option will not import the new products from the input file.'),
|
587 |
'condition'=>array(
|
588 |
array('field'=>'wt_iew_skip_new', 'value'=>1)
|
589 |
)
|
590 |
),
|
591 |
array(
|
592 |
+
'help_text'=> __('This option will import the new products from the input file.'),
|
593 |
'condition'=>array(
|
594 |
array('field'=>'wt_iew_skip_new', 'value'=>0)
|
595 |
)
|
610 |
),
|
611 |
'value' => 'id',
|
612 |
'field_name' => 'merge_with',
|
613 |
+
//'help_text' => __('The products are either looked up based on their ID or SKU as per the selection.'),
|
614 |
'help_text_conditional'=>array(
|
615 |
array(
|
616 |
+
'help_text'=> __('To look up the product on the basis of ID.'),
|
617 |
'condition'=>array(
|
618 |
array('field'=>'wt_iew_merge_with', 'value'=>'id'),
|
619 |
+
)
|
620 |
+
),
|
621 |
+
array(
|
622 |
+
'help_text'=> __('<b>Note:</b> If the ID of a product in the input file is different from that of the product ID in site, then match products by SKU. If in case, the product has no SKU, it will be imported as a new item even if the file contains the correct ID. <br/><br/> To look up the product on the basis of SKU.'),
|
623 |
+
'condition'=>array(
|
624 |
+
array('field'=>'wt_iew_merge_with', 'value'=>'sku'),
|
625 |
)
|
626 |
)
|
627 |
)
|
638 |
'field_name' => 'found_action',
|
639 |
'help_text_conditional'=>array(
|
640 |
array(
|
641 |
+
'help_text'=> __('This option will not update the existing products.'),
|
642 |
'condition'=>array(
|
643 |
array('field'=>'wt_iew_found_action', 'value'=>'skip')
|
644 |
)
|
645 |
),
|
646 |
array(
|
647 |
+
'help_text'=> __('This option will update the existing products as per the data from the input file.'),
|
648 |
'condition'=>array(
|
649 |
array('field'=>'wt_iew_found_action', 'value'=>'update')
|
650 |
)
|
699 |
$fields['product'] = array(
|
700 |
'label' => __('Products', 'wt-import-export-for-woo'),
|
701 |
'placeholder' => __('All products', 'wt-import-export-for-woo'),
|
702 |
+
'attr' => array('data-exclude_type' => 'variable,variation'),
|
703 |
'field_name' => 'product',
|
704 |
'sele_vals' => array(),
|
705 |
'help_text' => __('Export specific products. Keyin the product names to export to export multiple products.', 'wt-import-export-for-woo'),
|
711 |
$fields['exclude_product'] = array(
|
712 |
'label' => __('Exclude products', 'wt-import-export-for-woo'),
|
713 |
'placeholder' => __('Exclude products', 'wt-import-export-for-woo'),
|
714 |
+
'attr' => array('data-exclude_type' => 'variable,variation'),
|
715 |
'field_name' => 'exclude_product',
|
716 |
'sele_vals' => array(),
|
717 |
'help_text' => __('Use this if you need to exclude a specific or multiple products from your export list.', 'wt-import-export-for-woo'),
|
728 |
'help_text' => __('Export products belonging to a particular or from multiple categories. Just select the respective categories.', 'wt-import-export-for-woo'),
|
729 |
'type' => 'multi_select',
|
730 |
'css_class' => 'wc-enhanced-select',
|
731 |
+
'validation_rule' => array('type'=>'skip')
|
732 |
);
|
733 |
|
734 |
$fields['product_tags'] = array(
|
includes/class-wf-prodimpexp-plugin-uninstall-feedback.php
CHANGED
@@ -32,6 +32,10 @@ if (!class_exists('WT_ProdImpExp_Uninstall_Feedback')) :
|
|
32 |
</li>
|
33 |
<?php } ?>
|
34 |
</ul>
|
|
|
|
|
|
|
|
|
35 |
</div>
|
36 |
<div class="pipe-modal-footer">
|
37 |
<a href="#" class="dont-bother-me"><?php _e('I rather wouldn\'t say', 'product-import-export-for-woo'); ?></a>
|
@@ -88,6 +92,20 @@ if (!class_exists('WT_ProdImpExp_Uninstall_Feedback')) :
|
|
88 |
.review-and-deactivate{
|
89 |
padding:5px;
|
90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
</style>
|
92 |
<script type="text/javascript">
|
93 |
(function ($) {
|
32 |
</li>
|
33 |
<?php } ?>
|
34 |
</ul>
|
35 |
+
<div class="wt-uninstall-feedback-privacy-policy">
|
36 |
+
<?php _e('We do not collect any personal data when you submit this form. It\'s your feedback that we value.', 'product-import-export-for-woo'); ?>
|
37 |
+
<a href="https://www.webtoffee.com/privacy-policy/" target="_blank"><?php _e('Privacy Policy', 'product-import-export-for-woo'); ?></a>
|
38 |
+
</div>
|
39 |
</div>
|
40 |
<div class="pipe-modal-footer">
|
41 |
<a href="#" class="dont-bother-me"><?php _e('I rather wouldn\'t say', 'product-import-export-for-woo'); ?></a>
|
92 |
.review-and-deactivate{
|
93 |
padding:5px;
|
94 |
}
|
95 |
+
.wt-uninstall-feedback-privacy-policy {
|
96 |
+
text-align: left;
|
97 |
+
font-size: 12px;
|
98 |
+
color: #aaa;
|
99 |
+
line-height: 14px;
|
100 |
+
margin-top: 20px;
|
101 |
+
font-style: italic;
|
102 |
+
}
|
103 |
+
|
104 |
+
.wt-uninstall-feedback-privacy-policy a {
|
105 |
+
font-size: 11px;
|
106 |
+
color: #4b9cc3;
|
107 |
+
text-decoration-color: #99c3d7;
|
108 |
+
}
|
109 |
</style>
|
110 |
<script type="text/javascript">
|
111 |
(function ($) {
|
includes/class-wt-import-export-for-woo.php
CHANGED
@@ -80,7 +80,7 @@ class Wt_Import_Export_For_Woo_Basic {
|
|
80 |
if ( defined( 'WT_P_IEW_VERSION' ) ) {
|
81 |
$this->version = WT_P_IEW_VERSION;
|
82 |
} else {
|
83 |
-
$this->version = '2.0.
|
84 |
}
|
85 |
$this->plugin_name = 'wt-import-export-for-woo-basic';
|
86 |
|
80 |
if ( defined( 'WT_P_IEW_VERSION' ) ) {
|
81 |
$this->version = WT_P_IEW_VERSION;
|
82 |
} else {
|
83 |
+
$this->version = '2.0.4';
|
84 |
}
|
85 |
$this->plugin_name = 'wt-import-export-for-woo-basic';
|
86 |
|
product-import-export-for-woo.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
Description: Import and Export Products From and To your WooCommerce Store.
|
6 |
Author: WebToffee
|
7 |
Author URI: https://www.webtoffee.com/product/product-import-export-woocommerce/
|
8 |
-
Version: 2.0.
|
9 |
-
WC tested up to: 5.
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
Text Domain: product-import-export-for-woo
|
@@ -43,7 +43,7 @@ if ( !defined( 'WT_IEW_DEBUG_BASIC_TROUBLESHOOT' ) ) {
|
|
43 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
44 |
* Rename this for your plugin and update it as you release new versions.
|
45 |
*/
|
46 |
-
define( 'WT_P_IEW_VERSION', '2.0.
|
47 |
|
48 |
/**
|
49 |
* The code that runs during plugin activation.
|
@@ -199,6 +199,13 @@ if ( !function_exists( 'wt_product_imex_basic_plugin_screen_update_js' ) ) {
|
|
199 |
include_once plugin_dir_path( __FILE__ ) . 'includes/class-wf-prodimpexp-plugin-uninstall-feedback.php';
|
200 |
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
|
203 |
// Add dismissble banner for legacy menu
|
204 |
include_once plugin_dir_path( __FILE__ ) . 'includes/class-wt-product-legacy-menu-moved.php';
|
5 |
Description: Import and Export Products From and To your WooCommerce Store.
|
6 |
Author: WebToffee
|
7 |
Author URI: https://www.webtoffee.com/product/product-import-export-woocommerce/
|
8 |
+
Version: 2.0.4
|
9 |
+
WC tested up to: 5.5
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
Text Domain: product-import-export-for-woo
|
43 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
44 |
* Rename this for your plugin and update it as you release new versions.
|
45 |
*/
|
46 |
+
define( 'WT_P_IEW_VERSION', '2.0.4' );
|
47 |
|
48 |
/**
|
49 |
* The code that runs during plugin activation.
|
199 |
include_once plugin_dir_path( __FILE__ ) . 'includes/class-wf-prodimpexp-plugin-uninstall-feedback.php';
|
200 |
|
201 |
|
202 |
+
/* for temparary fix, wc_get_product_object is not support below WC3.9.0 */
|
203 |
+
if(!function_exists('wt_wc_get_product_object')){ // need change this approch, cant activate WC while product add on in active state
|
204 |
+
function wt_wc_get_product_object( $product_type, $product_id = 0 ) {
|
205 |
+
$classname = WC_Product_Factory::get_product_classname( $product_id, $product_type );
|
206 |
+
return new $classname( $product_id );
|
207 |
+
}
|
208 |
+
}
|
209 |
|
210 |
// Add dismissble banner for legacy menu
|
211 |
include_once plugin_dir_path( __FILE__ ) . 'includes/class-wt-product-legacy-menu-moved.php';
|
readme.txt
CHANGED
@@ -5,109 +5,112 @@ Tags: product export, product import, CSV import export, woocommerce, CSV, produ
|
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.0.
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
12 |
|
13 |
-
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
-
The Product
|
18 |
|
19 |
|
20 |
-
|
21 |
-
🔸 Import products from CSV to WooCommerce (simple products only)
|
22 |
-
🔸 Export/Import products with images
|
23 |
-
🔸 Export/Import WooCommerce products by category, tags, products, product status
|
24 |
-
🔸 Export/Import product attributes, taxonomies
|
25 |
-
🔸 Bulk edit product data
|
26 |
-
🔸 Compatible with All-in-one SEO and Yoast WooCommerce SEO plugins
|
27 |
-
🔸 Tested OK with WooCommerce 5.4
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
🔸 Batch import-export, helpful for the import and export of large number of products
|
32 |
-
🔸 Bulk update existing products while importing
|
33 |
-
🔸 Choice to update or skip existing imported products
|
34 |
-
🔸 Set CSV delimiter for import
|
35 |
-
🔸 Select from multiple import/export methods
|
36 |
-
🔸 Export and import mapping
|
37 |
-
🔸 Import/export using pre-saved template, save import export settings as templates for future use
|
38 |
-
🔸 Import and export history, keep a record of all the imports and exports
|
39 |
-
🔸 View import log for easy debugging
|
40 |
|
|
|
41 |
|
42 |
-
|
43 |
|
44 |
-
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
<blockquote>
|
51 |
|
52 |
= Premium Version Features =
|
53 |
|
54 |
-
Product Import Export Plugin for WooCommerce is the leading tool for
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
|
70 |
|
71 |
-
Please visit <a rel="nofollow" href="https://www.webtoffee.com/product/product-import-export-woocommerce/">Product Import Export Plugin for WooCommerce</a> for more details
|
72 |
|
73 |
</blockquote>
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
WooCommerce import products & WooCommerce export products functionalities made easy.
|
78 |
|
79 |
[youtube http://www.youtube.com/watch?v=L-01qI1EZWE&rel=0&showinfo=0]
|
80 |
|
81 |
|
82 |
-
|
83 |
-
There are multiple cases where one
|
84 |
|
85 |
[youtube https://www.youtube.com/watch?v=Fn1IKbjqabM]
|
86 |
|
87 |
-
|
88 |
-
WooCommerce bulk product upload is one of the main use cases where WooCommerce product import functionality is used. With the plugin you can import products from any XML or CSV into WooCommerce. This saves lot of time and minimizes errors.
|
89 |
|
90 |
[youtube https://www.youtube.com/watch?v=i2GULQm5ftQ]
|
91 |
|
92 |
-
|
93 |
|
94 |
-
The plugin facilitates easy import of images related to a product. When the products are imported using the plugin, the first image related to a product in the image column of the CSV file is taken as its featured image. If there are multiple images in the same column, the image(s) after the first one is taken as the gallery images of the product.
|
95 |
|
96 |
-
|
97 |
|
98 |
Other useful plugins from WebToffee for migrating WooCommerce/WordPress data:
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
|
105 |
|
106 |
= About webtoffee.com =
|
107 |
|
108 |
<a rel="nofollow" href="https://www.webtoffee.com/">WebToffee</a> creates quality WordPress/WooCommerce plugins that are easy to use and customize. We are proud to have millions of customers actively using our plugins across the globe.
|
109 |
|
110 |
-
|
111 |
== Installation ==
|
112 |
|
113 |
1. Upload the plugin folder to the /wp-content/plugins/ directory.
|
@@ -124,6 +127,18 @@ Yes. You can import or export product images along with other details
|
|
124 |
|
125 |
LibreOffice.
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
== Screenshots ==
|
129 |
|
@@ -145,18 +160,24 @@ LibreOffice.
|
|
145 |
|
146 |
9. Import mapping for WooCommerce product import plugin
|
147 |
|
148 |
-
10.
|
149 |
|
150 |
-
11.
|
151 |
|
152 |
-
12.
|
153 |
|
154 |
-
13.
|
155 |
|
156 |
-
14. Import
|
|
|
|
|
157 |
|
158 |
== Changelog ==
|
159 |
|
|
|
|
|
|
|
|
|
160 |
= 2.0.3 =
|
161 |
* Bug fix: WC 3.8 compatibility.
|
162 |
|
@@ -453,5 +474,6 @@ LibreOffice.
|
|
453 |
|
454 |
== Upgrade Notice ==
|
455 |
|
456 |
-
= 2.0.
|
457 |
-
*
|
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.0.4
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
12 |
|
13 |
+
Import products to WooCommerce or export products (simple, grouped, external/affiliate). Import WooCommerce products from any CSV to WooCommerce.
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
+
The Product Import Export for WooCommerce plugin exports and imports WooCommerce simple, grouped, and external/affiliate products to and from CSV (variable products are only supported in the premium version). It is super simple!
|
18 |
|
19 |
|
20 |
+
##Major Features##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
* <strong>Export WooCommerce products into CSV</strong>
|
23 |
+
* <strong>Import products from CSV</strong> to WooCommerce
|
24 |
+
* Supported product types - <strong>simple, grouped, external/affiliate</strong>
|
25 |
+
* Export and import <strong>products with images</strong>
|
26 |
+
* Export and import <strong>products by category/tags/product status</strong>
|
27 |
+
* Export and import <strong>product attributes, taxonomies</strong>
|
28 |
+
* <strong>Bulk edit products</strong>
|
29 |
+
* Compatible with <strong>All-in-one SEO</strong> and <strong>Yoast WooCommerce SEO</strong> plugins
|
30 |
+
* <strong>Batch import-export</strong>
|
31 |
+
* Option to <strong>update or skip existing products</strong>
|
32 |
+
* <strong>Set CSV delimiter</strong> for import
|
33 |
+
* Select from <strong>multiple import/export methods</strong>
|
34 |
+
* Export and import <strong>column mapping</strong>
|
35 |
+
* Import/export using <strong>pre-saved configurations</strong>
|
36 |
+
* View <strong>import-export history</strong>
|
37 |
+
* View <strong>import log</strong> for easy debugging
|
38 |
+
* Tested OK with WooCommerce 5.5
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
###Setup Guide - Product Import Export for WooCommerce###
|
42 |
|
43 |
+
For learning more about the set up of the Product Import Export plugin for WooCommerce, refer to its <a href="https://www.webtoffee.com/product-import-export-plugin-woocommerce-user-guide/">setup guide</a>.
|
44 |
|
45 |
+
You can also check out this video to get a quick understanding of the plugin.[youtube https://www.youtube.com/watch?v=sYvt_KSYfNY]
|
46 |
|
47 |
+
### How Does the Plugin Work? (Import of WooCommerce Products using CSV) ###
|
48 |
|
49 |
+
The WooCommerce Product Import Export Plugin takes CSV (Comma-Separated Values) file as input. You must create a CSV ( UTF-8 Encoded ) file and enter the product details in a structured format.
|
50 |
+
|
51 |
+
This is to match each field of CSV file to the field of a particular product which otherwise Admin need to input manually. For example, the post_title field gets mapped to the product name and the regular_price field gets mapped to the regular price of the product.
|
52 |
+
|
53 |
+
You can create the CSV from scratch or you can export products to get the format of CSV. You can use a spreadsheet program, such as LibreOffice, Microsoft Excel, OpenOffice, or Google Spreadsheets for creating and modifying the CSV file. Save this file with extension ".CSV".
|
54 |
+
|
55 |
+
After entering all details about products in a spreadsheet, you can import products to your WooCommerce store. With this plugin, you can also export and download product details as a CSV.
|
56 |
|
57 |
<blockquote>
|
58 |
|
59 |
= Premium Version Features =
|
60 |
|
61 |
+
Product Import Export Plugin for WooCommerce is the leading tool for the export and import of WooCommerce products. Check out its features.
|
|
|
62 |
|
63 |
+
✅ Export/Import simple, group, external, custom and variation product types.</li>
|
64 |
+
✅ Export/Import custom fields(meta) and hidden meta.</li>
|
65 |
+
✅ Import/Export product reviews.</li>
|
66 |
+
✅ Choose from XML/CSV format for import/export.</li>
|
67 |
+
✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Step_3_Filter_d4">Various filter options for exporting products</a>
|
68 |
+
✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Step_3_Map_impo10">Map and transform fields during import</a>
|
69 |
+
✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Evaluate_field11">Bulk edit/evaluate data during import</a>
|
70 |
+
✅ WPML support for simple products.</li>
|
71 |
+
✅ Import/Export file via FTP/SFTP.</li>
|
72 |
+
✅ <a href="https://www.webtoffee.com/how-to-import-woocommerce-products-using-url/">Import from URL.</a></li>
|
73 |
+
✅ Automatic scheduled import and export.</li>
|
74 |
+
✅ <a href="https://www.webtoffee.com/product-import-export-plugin-third-party-compatibility/">Third party plugin customization support.</a></li>
|
75 |
|
76 |
|
77 |
+
Please visit <a rel="nofollow" href="https://www.webtoffee.com/product/product-import-export-woocommerce/">Product Import Export Plugin for WooCommerce</a> for more details.
|
78 |
|
79 |
</blockquote>
|
80 |
|
81 |
+
## Product Import Export Plugin for WooCommerce (Pro) ##
|
|
|
|
|
82 |
|
83 |
[youtube http://www.youtube.com/watch?v=L-01qI1EZWE&rel=0&showinfo=0]
|
84 |
|
85 |
|
86 |
+
### WooCommerce export products (all product types are supported) ###
|
87 |
+
There are multiple cases where one needs to export WooCommerce products. It could be either for sending the details to someone else or integrating with a third-party system. With the plugin, you can import all product types including custom product types such as subscription and bundled products.
|
88 |
|
89 |
[youtube https://www.youtube.com/watch?v=Fn1IKbjqabM]
|
90 |
|
91 |
+
### WooCommerce import products (all product types are supported) ###
|
92 |
+
WooCommerce bulk product upload is one of the main use cases where WooCommerce product import functionality is used. With the plugin, you can import products from any XML or CSV into WooCommerce. This saves a lot of time and minimizes errors.
|
93 |
|
94 |
[youtube https://www.youtube.com/watch?v=i2GULQm5ftQ]
|
95 |
|
96 |
+
###WooCommerce export and import products with images (supports simple & variation images) ###
|
97 |
|
98 |
+
The plugin facilitates the easy import of images related to a product. When the products are imported using the plugin, the first image related to a product in the image column of the CSV file is taken as its featured image. If there are multiple images in the same column, the image(s) after the first one is taken as the gallery images of the product.
|
99 |
|
100 |
+
###Related plugins from WebToffee ###
|
101 |
|
102 |
Other useful plugins from WebToffee for migrating WooCommerce/WordPress data:
|
103 |
|
104 |
+
🔸 <a href="https://wordpress.org/plugins/users-customers-import-export-for-wp-woocommerce/">Import Export WordPress Users/Customers</a>: Import and export the users in WordPress and customers in your WooCommerce store using a CSV file with the help of this plugin.
|
105 |
+
🔸 <a href="https://wordpress.org/plugins/order-import-export-for-woocommerce/">Order/Coupon Import-Export for WooCommerce</a>: Import and export orders and/or coupons from your WooCommerce store using CSV with the plugin.
|
106 |
+
🔸 <a href="https://wordpress.org/plugins/comments-import-export-woocommerce/">WordPress Comment Import Export</a>: Easily import and export comments from one WordPress site to another.
|
107 |
+
🔸 <a href="https://wordpress.org/plugins/wp-migration-duplicator/">WordPress Backup & Migration</a>: Quickly migrate and backup entire WordPress site or selected files from one location to another. Backup to FTP, Google drive, Amazon S3 or local storage and easily restore them back.
|
108 |
|
109 |
|
110 |
= About webtoffee.com =
|
111 |
|
112 |
<a rel="nofollow" href="https://www.webtoffee.com/">WebToffee</a> creates quality WordPress/WooCommerce plugins that are easy to use and customize. We are proud to have millions of customers actively using our plugins across the globe.
|
113 |
|
|
|
114 |
== Installation ==
|
115 |
|
116 |
1. Upload the plugin folder to the /wp-content/plugins/ directory.
|
127 |
|
128 |
LibreOffice.
|
129 |
|
130 |
+
= Does this plugin support importing taxonomy and attributes to WooCommerce?
|
131 |
+
|
132 |
+
Yes. You can import product taxonomy and attributes into WooCommerce using the plugin.
|
133 |
+
|
134 |
+
= Can I export products by category using this plugin?
|
135 |
+
|
136 |
+
Yes. You can export products by category using the category filter within the plugin.
|
137 |
+
|
138 |
+
= Is it possible to import grouped and external products to WooCommerce using the plugin?
|
139 |
+
|
140 |
+
Yes. You can import grouped, affiliate/external products in addition to simple products using the plugin.
|
141 |
+
|
142 |
|
143 |
== Screenshots ==
|
144 |
|
160 |
|
161 |
9. Import mapping for WooCommerce product import plugin
|
162 |
|
163 |
+
10. Import taxonomies and attribute mapping for WooCommerce product import plugin
|
164 |
|
165 |
+
11. Evaluation options for WooCommerce product import plugin
|
166 |
|
167 |
+
12. Advanced options for WooCommerce product import plugin
|
168 |
|
169 |
+
13. Save import template for WooCommerce product import plugin
|
170 |
|
171 |
+
14. Import logs for WooCommerce product import plugin
|
172 |
+
|
173 |
+
15. Import Export history for Product Import Export for WooCommerce
|
174 |
|
175 |
== Changelog ==
|
176 |
|
177 |
+
= 2.0.4 =
|
178 |
+
* Tested OK with WC 5.5.
|
179 |
+
* Added external/affiliate and grouped product support.
|
180 |
+
|
181 |
= 2.0.3 =
|
182 |
* Bug fix: WC 3.8 compatibility.
|
183 |
|
474 |
|
475 |
== Upgrade Notice ==
|
476 |
|
477 |
+
= 2.0.4 =
|
478 |
+
* Tested OK with WC 5.5.
|
479 |
+
* Added external/affiliate and grouped product support.
|