Version Description
WooCommerce 5.0.0, 5.1.0 compatible, WordPress 5.7.0 compatible, PHP Fatal error: Call to a member function set_sku() on bool when importing products via CSV, jQuery 'ready' event is deprecated, Column names on Import/Export page, POT file. Recommended upgrade.
Download this release
Release Info
Developer | storeapps |
Plugin | WooCommerce Stock Manager |
Version | 2.5.5 |
Comparing to | |
See all releases |
Code changes from version 2.5.4 to 2.5.5
- admin/assets/build/index.css +1 -1
- admin/assets/build/index.css.map +1 -1
- admin/assets/package-lock.json +3 -3
- admin/includes/wcm-class-save.php +66 -63
- admin/views/import-export.php +75 -115
- languages/woocommerce-stock-manager.pot +157 -160
- public/class-stock-manager.php +1 -1
- readme.txt +19 -7
- woocommerce-stock-manager.php +4 -4
admin/assets/build/index.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
._2CIXIYB0caKpeb5T3QE42E{display:block}.dzXKX1eReJac01ZDD1vsr{display:flex;flex-flow:row wrap;margin-bottom:.5rem}.befaYpmTtAf1KXgs_N9ey{display:block;margin:0}._2cXs_e98FRkUCrgi3ha3dI{font-size:80%;display:block}
|
2 |
-
._2EHfsYSSSYLP_x_wCSYzCM{width:unset!important;min-width:100%;border-collapse:collapse}._2EHfsYSSSYLP_x_wCSYzCM thead th{position
|
3 |
.LeBzfrtpkbZ0lyFWvMvSJ{text-align:right;max-width:6rem}._1PgV74BJiCfl-N4Ac61yeW{white-space:nowrap;text-align:center}._1Drk3KIMXYY1J0xTIWVXCH{border:1px solid transparent}.x2Xrxi7P544k8Ha6U79O8{background-color:rgba(33,117,155,.2)}._22COTaMNqT94jvDgHf8hGU input{padding:5px 10px}._3cFHEj501YOlOmNFmDkp_N{text-align:right}._1zyd6QDy3y2Yss0yYZZSpl{max-width:100px;height:auto}
|
4 |
._3GaoP55EqKA862Gak5WDCr{box-sizing:border-box;position:fixed;bottom:0;right:0;background-color:#fff;padding:1rem 2rem;z-index:1000;box-shadow:0 -8px 16px 0 rgba(85,93,102,.3);display:flex;justify-content:flex-end}._3GaoP55EqKA862Gak5WDCr button{margin-left:1rem!important}
|
5 |
|
1 |
._2CIXIYB0caKpeb5T3QE42E{display:block}.dzXKX1eReJac01ZDD1vsr{display:flex;flex-flow:row wrap;margin-bottom:.5rem}.befaYpmTtAf1KXgs_N9ey{display:block;margin:0}._2cXs_e98FRkUCrgi3ha3dI{font-size:80%;display:block}
|
2 |
+
._2EHfsYSSSYLP_x_wCSYzCM{width:unset!important;min-width:100%;border-collapse:collapse}._2EHfsYSSSYLP_x_wCSYzCM thead th{position:sticky;top:32px;background-color:#fff}
|
3 |
.LeBzfrtpkbZ0lyFWvMvSJ{text-align:right;max-width:6rem}._1PgV74BJiCfl-N4Ac61yeW{white-space:nowrap;text-align:center}._1Drk3KIMXYY1J0xTIWVXCH{border:1px solid transparent}.x2Xrxi7P544k8Ha6U79O8{background-color:rgba(33,117,155,.2)}._22COTaMNqT94jvDgHf8hGU input{padding:5px 10px}._3cFHEj501YOlOmNFmDkp_N{text-align:right}._1zyd6QDy3y2Yss0yYZZSpl{max-width:100px;height:auto}
|
4 |
._3GaoP55EqKA862Gak5WDCr{box-sizing:border-box;position:fixed;bottom:0;right:0;background-color:#fff;padding:1rem 2rem;z-index:1000;box-shadow:0 -8px 16px 0 rgba(85,93,102,.3);display:flex;justify-content:flex-end}._3GaoP55EqKA862Gak5WDCr button{margin-left:1rem!important}
|
5 |
|
admin/assets/build/index.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///./src/components/ProductFilter.scss","webpack:///./src/components/Products.scss","webpack:///./src/components/Product.scss","webpack:///./src/components/SaveChanges.scss"],"names":[],"mappings":"AAAA,yBACE,aAAc,CACf,uBAGC,YAAa,CACb,kBAAmB,CACnB,mBAAqB,CACtB,uBAGC,aAAc,CACd,QAAS,CACV,yBAGC,aAAc,CACd,aAAc,C;ACjBhB,yBACE,qBAAuB,CACvB,cAAe,CACf,wBAAyB,CAC1B,kCAGC,
|
1 |
+
{"version":3,"sources":["webpack:///./src/components/ProductFilter.scss","webpack:///./src/components/Products.scss","webpack:///./src/components/Product.scss","webpack:///./src/components/SaveChanges.scss"],"names":[],"mappings":"AAAA,yBACE,aAAc,CACf,uBAGC,YAAa,CACb,kBAAmB,CACnB,mBAAqB,CACtB,uBAGC,aAAc,CACd,QAAS,CACV,yBAGC,aAAc,CACd,aAAc,C;ACjBhB,yBACE,qBAAuB,CACvB,cAAe,CACf,wBAAyB,CAC1B,kCAGC,eAAgB,CAChB,QAAS,CACT,qBAAuB,C;ACTzB,uBACE,gBAAiB,CACjB,cAAe,CAChB,yBAGC,kBAAmB,CACnB,iBAAkB,CACnB,yBAGC,4BAA6B,CAC9B,uBAGC,oCAAyC,CAC1C,+BAIG,gBAAiB,CAClB,yBAID,gBAAiB,CAClB,yBAGC,eAAgB,CAChB,WAAY,C;AC9Bd,yBACE,qBAAsB,CACtB,cAAe,CACf,QAAS,CACT,OAAQ,CACR,qBAAuB,CACvB,iBAAkB,CAClB,YAAa,CACb,2CAAgD,CAChD,YAAa,CACb,wBAAyB,CAV3B,gCAaI,0BAA4B,C","file":"index.css","sourcesContent":[".wrapper {\n display: block;\n}\n\n.row {\n display: flex;\n flex-flow: row wrap;\n margin-bottom: 0.5rem;\n}\n\n.field {\n display: block;\n margin: 0;\n}\n\n.label {\n font-size: 80%;\n display: block;\n}\n",".table {\n width: unset !important;\n min-width: 100%;\n border-collapse: collapse;\n}\n\n.table thead th {\n position: sticky;\n top: 32px;\n background-color: white;\n}\n",".numberControl {\n text-align: right;\n max-width: 6rem;\n}\n\n.productType {\n white-space: nowrap;\n text-align: center;\n}\n\n.normal {\n border: 1px solid transparent;\n}\n\n.changed {\n background-color: rgba(33, 117, 155, 0.2);\n}\n\n.inputCell {\n input {\n padding: 5px 10px;\n }\n}\n\n.variationId {\n text-align: right;\n}\n\n.thumbnail {\n max-width: 100px;\n height: auto;\n}\n",".wrapper {\n box-sizing: border-box;\n position: fixed;\n bottom: 0;\n right: 0;\n background-color: white;\n padding: 1rem 2rem;\n z-index: 1000;\n box-shadow: 0 -8px 16px 0 rgba(85, 93, 102, 0.3);\n display: flex;\n justify-content: flex-end;\n\n button {\n margin-left: 1rem !important;\n }\n}\n"],"sourceRoot":""}
|
admin/assets/package-lock.json
CHANGED
@@ -2184,9 +2184,9 @@
|
|
2184 |
}
|
2185 |
},
|
2186 |
"caniuse-lite": {
|
2187 |
-
"version": "1.0.
|
2188 |
-
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.
|
2189 |
-
"integrity": "sha512-
|
2190 |
"dev": true
|
2191 |
},
|
2192 |
"caseless": {
|
2184 |
}
|
2185 |
},
|
2186 |
"caniuse-lite": {
|
2187 |
+
"version": "1.0.30001202",
|
2188 |
+
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001202.tgz",
|
2189 |
+
"integrity": "sha512-ZcijQNqrcF8JNLjzvEiXqX4JUYxoZa7Pvcsd9UD8Kz4TvhTonOSNRsK+qtvpVL4l6+T1Rh4LFtLfnNWg6BGWCQ==",
|
2190 |
"dev": true
|
2191 |
},
|
2192 |
"caseless": {
|
admin/includes/wcm-class-save.php
CHANGED
@@ -124,81 +124,84 @@ class WCM_Save {
|
|
124 |
*
|
125 |
* @since 1.2.2
|
126 |
*/
|
127 |
-
public static function save_data( $data, $product_id ){
|
128 |
|
129 |
$display_option = get_option( 'wsm_display_option' );
|
130 |
|
131 |
$_product = wc_get_product( $product_id );
|
|
|
|
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
}
|
148 |
-
|
149 |
-
if( isset( $data['stock'] ) ) {
|
150 |
-
$_product->set_stock_quantity( $data['stock'] );
|
151 |
-
}
|
152 |
-
|
153 |
-
if( isset( $data['tax_status'] ) ) {
|
154 |
-
$_product->set_tax_status( $data['tax_status'] );
|
155 |
-
}
|
156 |
-
|
157 |
-
if( isset( $data['tax_class'] ) ) {
|
158 |
-
$_product->set_tax_class( $data['tax_class'] );
|
159 |
-
}
|
160 |
-
|
161 |
-
if( isset( $data['shipping_class'] ) ) {
|
162 |
-
$_product->set_shipping_class_id( $data['shipping_class'] );
|
163 |
-
}
|
164 |
-
|
165 |
-
if( isset( $data['weight'] ) ){
|
166 |
-
$_product->set_weight( $data['weight'] );
|
167 |
-
}
|
168 |
-
|
169 |
-
/* if( !empty( $data['regular_price'] ) ){
|
170 |
-
$price = sanitize_text_field($data['regular_price']);
|
171 |
-
if( !empty( $data['sales_price'] ) ){
|
172 |
-
$sale_price = sanitize_text_field($data['sales_price']);
|
173 |
-
wsm_save_price( $product_id, $price, $sale_price );
|
174 |
-
}else{
|
175 |
-
wsm_save_price( $product_id, $price );
|
176 |
-
}
|
177 |
-
}
|
178 |
-
*/
|
179 |
-
if( isset( $data['regular_price'] ) ) {
|
180 |
-
if( !empty( $data['regular_price'] ) ){
|
181 |
-
$_product->set_price( $data['regular_price'] );
|
182 |
-
$_product->set_regular_price( $data['regular_price'] );
|
183 |
}
|
184 |
-
|
185 |
-
|
186 |
-
$_product->
|
187 |
}
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
if( !empty( $data['sales_price'] ) ){
|
192 |
-
$_product->set_sale_price( $data['sales_price'] );
|
193 |
}
|
194 |
-
|
195 |
-
|
|
|
196 |
}
|
197 |
-
|
198 |
-
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
|
201 |
-
|
|
|
|
|
202 |
|
203 |
}
|
204 |
|
124 |
*
|
125 |
* @since 1.2.2
|
126 |
*/
|
127 |
+
public static function save_data( $data, $product_id ) {
|
128 |
|
129 |
$display_option = get_option( 'wsm_display_option' );
|
130 |
|
131 |
$_product = wc_get_product( $product_id );
|
132 |
+
// use is_a instead of instanceof to cover all product types.
|
133 |
+
if ( is_a( $_product, 'WC_Product' ) ) {
|
134 |
|
135 |
+
if( isset( $data['sku'] ) ) {
|
136 |
+
$_product->set_sku( $data['sku'] );
|
137 |
+
}
|
138 |
+
|
139 |
+
if( isset( $data['manage_stock'] ) ) {
|
140 |
+
$_product->set_manage_stock( $data['manage_stock'] );
|
141 |
+
}
|
142 |
|
143 |
+
if( isset( $data['backorders'] ) ) {
|
144 |
+
$_product->set_backorders( $data['backorders'] );
|
145 |
+
}
|
146 |
|
147 |
+
if( isset( $data['stock_status'] ) ) {
|
148 |
+
$_product->set_stock_status( $data['stock_status'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
}
|
150 |
+
|
151 |
+
if( isset( $data['stock'] ) ) {
|
152 |
+
$_product->set_stock_quantity( $data['stock'] );
|
153 |
}
|
154 |
+
|
155 |
+
if( isset( $data['tax_status'] ) ) {
|
156 |
+
$_product->set_tax_status( $data['tax_status'] );
|
|
|
|
|
157 |
}
|
158 |
+
|
159 |
+
if( isset( $data['tax_class'] ) ) {
|
160 |
+
$_product->set_tax_class( $data['tax_class'] );
|
161 |
}
|
162 |
+
|
163 |
+
if( isset( $data['shipping_class'] ) ) {
|
164 |
+
$_product->set_shipping_class_id( $data['shipping_class'] );
|
165 |
+
}
|
166 |
+
|
167 |
+
if( isset( $data['weight'] ) ){
|
168 |
+
$_product->set_weight( $data['weight'] );
|
169 |
+
}
|
170 |
+
|
171 |
+
/* if( !empty( $data['regular_price'] ) ){
|
172 |
+
$price = sanitize_text_field($data['regular_price']);
|
173 |
+
if( !empty( $data['sales_price'] ) ){
|
174 |
+
$sale_price = sanitize_text_field($data['sales_price']);
|
175 |
+
wsm_save_price( $product_id, $price, $sale_price );
|
176 |
+
}else{
|
177 |
+
wsm_save_price( $product_id, $price );
|
178 |
+
}
|
179 |
+
}
|
180 |
+
*/
|
181 |
+
if( isset( $data['regular_price'] ) ) {
|
182 |
+
if( !empty( $data['regular_price'] ) ){
|
183 |
+
$_product->set_price( $data['regular_price'] );
|
184 |
+
$_product->set_regular_price( $data['regular_price'] );
|
185 |
+
}
|
186 |
+
else{
|
187 |
+
$_product->set_price( '' );
|
188 |
+
$_product->set_regular_price( '' );
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
if( isset( $data['sales_price'] ) ) {
|
193 |
+
if( !empty( $data['sales_price'] ) ){
|
194 |
+
$_product->set_sale_price( $data['sales_price'] );
|
195 |
+
} else {
|
196 |
+
$_product->set_sale_price( '' );
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
$_product->save();
|
201 |
|
202 |
+
wc_delete_product_transients( $product_id );
|
203 |
+
|
204 |
+
}
|
205 |
|
206 |
}
|
207 |
|
admin/views/import-export.php
CHANGED
@@ -22,127 +22,88 @@ function stockautoUTF($s){
|
|
22 |
|
23 |
|
24 |
?>
|
25 |
-
<script>
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
columnDelimiter = args.columnDelimiter || ',';
|
39 |
-
lineDelimiter = args.lineDelimiter || '\n';
|
40 |
-
|
41 |
-
keys = Object.keys(data[0]);
|
42 |
-
|
43 |
-
result = '';
|
44 |
-
result += keys.join(columnDelimiter);
|
45 |
-
result += lineDelimiter;
|
46 |
-
|
47 |
-
data.forEach(function(item) {
|
48 |
-
ctr = 0;
|
49 |
-
keys.forEach(function(key) {
|
50 |
-
if (ctr > 0) result += columnDelimiter;
|
51 |
-
|
52 |
-
result += item[key];
|
53 |
-
ctr++;
|
54 |
-
});
|
55 |
result += lineDelimiter;
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
jQuery( '#csv' ).append( 'Generating csv file' );
|
66 |
-
jQuery( '#csv' ).css( 'display','block' );
|
67 |
-
|
68 |
-
var offset = '0';
|
69 |
-
wsm_export_products( offset );
|
70 |
-
|
71 |
-
function wsm_export_products( offset ) {
|
72 |
-
|
73 |
-
var data = {
|
74 |
-
'action' : 'wsm_get_products_or_export',
|
75 |
-
'offset' : offset
|
76 |
-
};
|
77 |
-
|
78 |
-
jQuery.post(ajaxurl, data, function( response ) {
|
79 |
-
|
80 |
-
var result = jQuery.parseJSON( response );
|
81 |
-
|
82 |
-
if( result.status != 'finish' ){
|
83 |
-
|
84 |
-
var jsonObject = JSON.stringify(result.data);
|
85 |
-
|
86 |
-
jsonObject = jsonObject.slice( 1 );
|
87 |
-
jsonObject = jsonObject.slice(0, -1);
|
88 |
-
|
89 |
-
jQuery( '.export-output' ).append( jsonObject + ',' );
|
90 |
-
|
91 |
-
wsm_export_products( result.offset );
|
92 |
-
|
93 |
-
|
94 |
-
}else{
|
95 |
-
|
96 |
-
var string = jQuery( '.export-output' ).text();
|
97 |
-
string = string.slice(0, -1);
|
98 |
-
|
99 |
-
string = '{' + string + '}';
|
100 |
-
|
101 |
-
jQuery( '#csv' ).empty();
|
102 |
-
jQuery( '#csv' ).append( 'All done!' );
|
103 |
-
|
104 |
-
var data = {
|
105 |
-
'action' : 'wsm_get_csv_file',
|
106 |
-
'data' : string
|
107 |
-
};
|
108 |
-
|
109 |
-
jQuery.post(ajaxurl, data, function( response ) {
|
110 |
-
|
111 |
-
var data, filename, link;
|
112 |
-
var csv = convertArrayOfObjectsToCSV({
|
113 |
-
datas: JSON.parse( response )
|
114 |
-
});
|
115 |
-
if (csv == null) return;
|
116 |
-
|
117 |
-
filename = 'stock-manager-export.csv';
|
118 |
-
|
119 |
-
if (!csv.match(/^data:text\/csv/i)) {
|
120 |
-
csv = 'data:text/csv;charset=utf-8,' + csv;
|
121 |
-
}
|
122 |
-
data = encodeURI(csv);
|
123 |
-
|
124 |
-
link = document.createElement('a');
|
125 |
-
link.setAttribute('href', data);
|
126 |
-
link.setAttribute('download', filename);
|
127 |
-
link.click();
|
128 |
-
|
129 |
-
});
|
130 |
-
|
131 |
-
}
|
132 |
-
|
133 |
-
|
134 |
});
|
|
|
135 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
});
|
137 |
-
});
|
138 |
</script>
|
139 |
<div class="wrap">
|
140 |
|
141 |
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
142 |
-
|
143 |
-
|
144 |
|
145 |
-
|
146 |
<div class="t-col-6">
|
147 |
<div class="toret-box box-info">
|
148 |
<div class="box-header">
|
@@ -152,7 +113,7 @@ jQuery( document ).ready(function() {
|
|
152 |
<h4><?php _e('You can upload csv file, with your stock data. ','woocommerce-stock-manager'); ?></h4>
|
153 |
<p><?php _e('CSV file must be in this format, or you can export file with exist data and edit them. ','woocommerce-stock-manager'); ?></p>
|
154 |
<p><?php _e('If you have a lot of products and export/import not working, increase memory limit.. ','woocommerce-stock-manager'); ?></p>
|
155 |
-
<h3><?php _e('File format
|
156 |
<table class="table-bordered">
|
157 |
<tr>
|
158 |
<td><?php _e('ID','woocommerce-stock-manager'); ?></td>
|
@@ -163,7 +124,7 @@ jQuery( document ).ready(function() {
|
|
163 |
<td><?php _e('Backorders','woocommerce-stock-manager'); ?></td>
|
164 |
<td><?php _e('Stock','woocommerce-stock-manager'); ?></td>
|
165 |
<td><?php _e('Product type','woocommerce-stock-manager'); ?></td>
|
166 |
-
<td><?php _e('Parent
|
167 |
</tr>
|
168 |
<tr>
|
169 |
<td><?php _e('123','woocommerce-stock-manager'); ?></td>
|
@@ -196,7 +157,6 @@ jQuery( document ).ready(function() {
|
|
196 |
<input type="file" name="uploadFile">
|
197 |
</td>
|
198 |
</tr>
|
199 |
-
|
200 |
</table>
|
201 |
<div class="clear"></div>
|
202 |
<input type="hidden" name="upload" value="ok" />
|
22 |
|
23 |
|
24 |
?>
|
25 |
+
<script type="text/javascript">
|
26 |
+
jQuery( function() {
|
27 |
+
function convertArrayOfObjectsToCSV(args) {
|
28 |
+
var result, ctr, keys, columnDelimiter, lineDelimiter, data;
|
29 |
+
data = args.datas || null;
|
30 |
+
if (data == null || !data.length) {
|
31 |
+
return null;
|
32 |
+
}
|
33 |
+
columnDelimiter = args.columnDelimiter || ',';
|
34 |
+
lineDelimiter = args.lineDelimiter || '\n';
|
35 |
+
keys = Object.keys(data[0]);
|
36 |
+
result = '';
|
37 |
+
result += keys.join(columnDelimiter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
result += lineDelimiter;
|
39 |
+
data.forEach(function(item) {
|
40 |
+
ctr = 0;
|
41 |
+
keys.forEach(function(key) {
|
42 |
+
if (ctr > 0) result += columnDelimiter;
|
43 |
+
|
44 |
+
result += item[key];
|
45 |
+
ctr++;
|
46 |
+
});
|
47 |
+
result += lineDelimiter;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
});
|
49 |
+
return result;
|
50 |
}
|
51 |
+
jQuery('.product-export').on( 'click', function(e){
|
52 |
+
e.preventDefault();
|
53 |
+
jQuery( '.export-output' ).empty();
|
54 |
+
jQuery( '#csv' ).append( 'Generating csv file' );
|
55 |
+
jQuery( '#csv' ).css( 'display','block' );
|
56 |
+
var offset = '0';
|
57 |
+
wsm_export_products( offset );
|
58 |
+
function wsm_export_products( offset ) {
|
59 |
+
var data = {
|
60 |
+
'action' : 'wsm_get_products_or_export',
|
61 |
+
'offset' : offset
|
62 |
+
};
|
63 |
+
jQuery.post(ajaxurl, data, function( response ) {
|
64 |
+
var result = jQuery.parseJSON( response );
|
65 |
+
if( result.status != 'finish' ){
|
66 |
+
var jsonObject = JSON.stringify(result.data);
|
67 |
+
jsonObject = jsonObject.slice( 1 );
|
68 |
+
jsonObject = jsonObject.slice(0, -1);
|
69 |
+
jQuery( '.export-output' ).append( jsonObject + ',' );
|
70 |
+
wsm_export_products( result.offset );
|
71 |
+
} else {
|
72 |
+
var string = jQuery( '.export-output' ).text();
|
73 |
+
string = string.slice(0, -1);
|
74 |
+
string = '{' + string + '}';
|
75 |
+
jQuery( '#csv' ).empty();
|
76 |
+
jQuery( '#csv' ).append( 'All done!' );
|
77 |
+
var data = {
|
78 |
+
'action' : 'wsm_get_csv_file',
|
79 |
+
'data' : string
|
80 |
+
};
|
81 |
+
jQuery.post(ajaxurl, data, function( response ) {
|
82 |
+
var data, filename, link;
|
83 |
+
var csv = convertArrayOfObjectsToCSV({
|
84 |
+
datas: JSON.parse( response )
|
85 |
+
});
|
86 |
+
if (csv == null) return;
|
87 |
+
filename = 'stock-manager-export.csv';
|
88 |
+
if (!csv.match(/^data:text\/csv/i)) {
|
89 |
+
csv = 'data:text/csv;charset=utf-8,' + csv;
|
90 |
+
}
|
91 |
+
data = encodeURI(csv);
|
92 |
+
link = document.createElement('a');
|
93 |
+
link.setAttribute('href', data);
|
94 |
+
link.setAttribute('download', filename);
|
95 |
+
link.click();
|
96 |
+
});
|
97 |
+
}
|
98 |
+
});
|
99 |
+
}
|
100 |
+
});
|
101 |
});
|
|
|
102 |
</script>
|
103 |
<div class="wrap">
|
104 |
|
105 |
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
|
|
|
|
106 |
|
|
|
107 |
<div class="t-col-6">
|
108 |
<div class="toret-box box-info">
|
109 |
<div class="box-header">
|
113 |
<h4><?php _e('You can upload csv file, with your stock data. ','woocommerce-stock-manager'); ?></h4>
|
114 |
<p><?php _e('CSV file must be in this format, or you can export file with exist data and edit them. ','woocommerce-stock-manager'); ?></p>
|
115 |
<p><?php _e('If you have a lot of products and export/import not working, increase memory limit.. ','woocommerce-stock-manager'); ?></p>
|
116 |
+
<h3><?php _e('File format','woocommerce-stock-manager'); ?></h3>
|
117 |
<table class="table-bordered">
|
118 |
<tr>
|
119 |
<td><?php _e('ID','woocommerce-stock-manager'); ?></td>
|
124 |
<td><?php _e('Backorders','woocommerce-stock-manager'); ?></td>
|
125 |
<td><?php _e('Stock','woocommerce-stock-manager'); ?></td>
|
126 |
<td><?php _e('Product type','woocommerce-stock-manager'); ?></td>
|
127 |
+
<td><?php _e('Parent ID','woocommerce-stock-manager'); ?></td>
|
128 |
</tr>
|
129 |
<tr>
|
130 |
<td><?php _e('123','woocommerce-stock-manager'); ?></td>
|
157 |
<input type="file" name="uploadFile">
|
158 |
</td>
|
159 |
</tr>
|
|
|
160 |
</table>
|
161 |
<div class="clear"></div>
|
162 |
<input type="hidden" name="upload" value="ok" />
|
languages/woocommerce-stock-manager.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Stock Manager plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Stock Manager 2.5.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-stock-manager\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.1.0\n"
|
15 |
"X-Domain: woocommerce-stock-manager\n"
|
@@ -34,14 +34,49 @@ msgstr ""
|
|
34 |
msgid "https://www.storeapps.org/"
|
35 |
msgstr ""
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
#: admin/includes/config.php:6
|
38 |
#: admin/includes/config.php:16
|
39 |
#: admin/includes/config.php:21
|
40 |
#: admin/includes/config.php:26
|
41 |
#: admin/includes/config.php:31
|
42 |
#: admin/includes/wcm-class-table.php:245
|
43 |
-
#: admin/views/import-export.php:
|
44 |
-
#: admin/views/import-export.php:
|
45 |
#: admin/views/log.php:29
|
46 |
#: admin/assets/src/components/ProductFilter.js:64
|
47 |
#: admin/assets/src/components/Products.js:99
|
@@ -51,8 +86,8 @@ msgstr ""
|
|
51 |
|
52 |
#: admin/includes/config.php:11
|
53 |
#: admin/includes/wcm-class-table.php:255
|
54 |
-
#: admin/views/import-export.php:
|
55 |
-
#: admin/views/import-export.php:
|
56 |
#: admin/views/log.php:30
|
57 |
#: admin/assets/src/components/Products.js:93
|
58 |
msgid "ID"
|
@@ -92,13 +127,14 @@ msgid "Name"
|
|
92 |
msgstr ""
|
93 |
|
94 |
#: admin/includes/wcm-class-table.php:275
|
95 |
-
#: admin/views/import-export.php:
|
96 |
#: admin/views/log.php:32
|
97 |
#: admin/assets/src/components/Products.js:97
|
98 |
msgid "Product type"
|
99 |
msgstr ""
|
100 |
|
101 |
#: admin/includes/wcm-class-table.php:285
|
|
|
102 |
#: admin/views/log.php:33
|
103 |
msgid "Parent ID"
|
104 |
msgstr ""
|
@@ -124,20 +160,20 @@ msgid "Weight"
|
|
124 |
msgstr ""
|
125 |
|
126 |
#: admin/includes/wcm-class-table.php:325
|
127 |
-
#: admin/views/import-export.php:161
|
128 |
-
#: admin/views/import-export.php:184
|
129 |
#: admin/views/components/filter.php:40
|
130 |
#: admin/views/components/filter.php:112
|
|
|
|
|
131 |
#: admin/assets/src/components/Products.js:139
|
132 |
#: admin/assets/src/components/ScreenOptions.js:68
|
133 |
msgid "Manage stock"
|
134 |
msgstr ""
|
135 |
|
136 |
#: admin/includes/wcm-class-table.php:335
|
137 |
-
#: admin/views/import-export.php:162
|
138 |
-
#: admin/views/import-export.php:185
|
139 |
#: admin/views/components/filter.php:46
|
140 |
#: admin/views/components/filter.php:114
|
|
|
|
|
141 |
#: admin/assets/src/components/ProductFilter.js:112
|
142 |
#: admin/assets/src/components/Products.js:142
|
143 |
#: admin/assets/src/components/ScreenOptions.js:73
|
@@ -145,20 +181,20 @@ msgid "Stock status"
|
|
145 |
msgstr ""
|
146 |
|
147 |
#: admin/includes/wcm-class-table.php:345
|
148 |
-
#: admin/views/import-export.php:163
|
149 |
-
#: admin/views/import-export.php:186
|
150 |
#: admin/views/components/filter.php:116
|
|
|
|
|
151 |
#: admin/assets/src/components/Products.js:145
|
152 |
#: admin/assets/src/components/ScreenOptions.js:78
|
153 |
msgid "Backorders"
|
154 |
msgstr ""
|
155 |
|
156 |
#: admin/includes/wcm-class-table.php:355
|
157 |
-
#: admin/views/
|
158 |
-
#: admin/views/import-export.php:
|
|
|
159 |
#: admin/views/log-history.php:38
|
160 |
#: admin/views/log.php:34
|
161 |
-
#: admin/views/components/filter.php:118
|
162 |
#: admin/assets/src/components/Products.js:148
|
163 |
#: admin/assets/src/components/ScreenOptions.js:83
|
164 |
msgid "Stock"
|
@@ -184,23 +220,6 @@ msgstr ""
|
|
184 |
msgid "Same as parent"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: admin/includes/wcm-class-table.php:541
|
188 |
-
#: admin/class-stock-manager-admin.php:152
|
189 |
-
msgid "No shipping class"
|
190 |
-
msgstr ""
|
191 |
-
|
192 |
-
#: admin/includes/wcm-class-table.php:633
|
193 |
-
#: admin/includes/wcm-class-table.php:666
|
194 |
-
#: admin/class-stock-manager-admin.php:165
|
195 |
-
msgid "Yes"
|
196 |
-
msgstr ""
|
197 |
-
|
198 |
-
#: admin/includes/wcm-class-table.php:634
|
199 |
-
#: admin/includes/wcm-class-table.php:664
|
200 |
-
#: admin/class-stock-manager-admin.php:163
|
201 |
-
msgid "No"
|
202 |
-
msgstr ""
|
203 |
-
|
204 |
#: admin/includes/wcm-class-table.php:648
|
205 |
#: admin/views/components/filter.php:47
|
206 |
msgid "In stock"
|
@@ -215,120 +234,189 @@ msgstr ""
|
|
215 |
msgid "On backorder"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: admin/
|
219 |
-
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: admin/views/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
msgid "Import"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: admin/views/import-export.php:
|
228 |
msgid "You can upload csv file, with your stock data. "
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: admin/views/import-export.php:
|
232 |
msgid "CSV file must be in this format, or you can export file with exist data and edit them. "
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: admin/views/import-export.php:
|
236 |
msgid "If you have a lot of products and export/import not working, increase memory limit.. "
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: admin/views/import-export.php:
|
240 |
-
msgid "File format
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: admin/views/import-export.php:
|
244 |
#: admin/assets/src/components/Products.js:115
|
245 |
#: admin/assets/src/components/ScreenOptions.js:48
|
246 |
msgid "Product name"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: admin/views/import-export.php:
|
250 |
-
msgid "Parent SKU"
|
251 |
-
msgstr ""
|
252 |
-
|
253 |
-
#: admin/views/import-export.php:169
|
254 |
msgid "123"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: admin/views/import-export.php:
|
258 |
msgid "abc111"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: admin/views/import-export.php:
|
262 |
msgid "T-shirt"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: admin/views/import-export.php:
|
266 |
-
#: admin/views/import-export.php:
|
267 |
msgid "yes"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: admin/views/import-export.php:
|
271 |
msgid "instock"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: admin/views/import-export.php:
|
275 |
msgid "10"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: admin/views/import-export.php:
|
279 |
msgid "simple"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: admin/views/import-export.php:
|
283 |
msgid "product id, required. Neccessary for import and export."
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: admin/views/import-export.php:
|
287 |
msgid "product unique identificator."
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: admin/views/import-export.php:
|
291 |
-
#: admin/views/import-export.php:
|
292 |
msgid "values: \"yes\", \"notify\", \"no\". If is empty \"no\" will be save."
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: admin/views/import-export.php:
|
296 |
msgid "values: \"instock\", \"outofstock\". If is empty \"outofstock\" will be save."
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: admin/views/import-export.php:
|
300 |
msgid "quantity value. If is empty, 0 will be save."
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: admin/views/import-export.php:
|
304 |
msgid "Upload csv file"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: admin/views/import-export.php:
|
308 |
msgid "Upload"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: admin/views/import-export.php:
|
312 |
msgid "The file "
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: admin/views/import-export.php:
|
316 |
msgid "Product with ID: "
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: admin/views/import-export.php:
|
320 |
msgid "Sorry, there was an error uploading your file."
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: admin/views/import-export.php:
|
324 |
msgid "Export"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: admin/views/import-export.php:
|
328 |
msgid "You can download csv file, with your stock data. "
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: admin/views/import-export.php:
|
332 |
msgid "Create export file"
|
333 |
msgstr ""
|
334 |
|
@@ -370,97 +458,6 @@ msgstr ""
|
|
370 |
msgid "Qty input step"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: admin/views/components/filter.php:3
|
374 |
-
msgid "Filter"
|
375 |
-
msgstr ""
|
376 |
-
|
377 |
-
#: admin/views/components/filter.php:4
|
378 |
-
#: admin/views/components/filter.php:63
|
379 |
-
msgid "Search by sku"
|
380 |
-
msgstr ""
|
381 |
-
|
382 |
-
#: admin/views/components/filter.php:5
|
383 |
-
#: admin/views/components/filter.php:73
|
384 |
-
msgid "Search by product name"
|
385 |
-
msgstr ""
|
386 |
-
|
387 |
-
#: admin/views/components/filter.php:6
|
388 |
-
msgid "Display setting"
|
389 |
-
msgstr ""
|
390 |
-
|
391 |
-
#: admin/views/components/filter.php:15
|
392 |
-
msgid "Order by"
|
393 |
-
msgstr ""
|
394 |
-
|
395 |
-
#: admin/views/components/filter.php:16
|
396 |
-
msgid "Product name ASC"
|
397 |
-
msgstr ""
|
398 |
-
|
399 |
-
#: admin/views/components/filter.php:17
|
400 |
-
msgid "Product name DESC"
|
401 |
-
msgstr ""
|
402 |
-
|
403 |
-
#: admin/views/components/filter.php:18
|
404 |
-
msgid "SKU ASC"
|
405 |
-
msgstr ""
|
406 |
-
|
407 |
-
#: admin/views/components/filter.php:19
|
408 |
-
msgid "SKU DESC"
|
409 |
-
msgstr ""
|
410 |
-
|
411 |
-
#: admin/views/components/filter.php:23
|
412 |
-
msgid "Simple products"
|
413 |
-
msgstr ""
|
414 |
-
|
415 |
-
#: admin/views/components/filter.php:24
|
416 |
-
msgid "Products with variation"
|
417 |
-
msgstr ""
|
418 |
-
|
419 |
-
#: admin/views/components/filter.php:28
|
420 |
-
msgid "All categories"
|
421 |
-
msgstr ""
|
422 |
-
|
423 |
-
#: admin/views/components/filter.php:41
|
424 |
-
msgid "No manage stock"
|
425 |
-
msgstr ""
|
426 |
-
|
427 |
-
#: admin/views/components/filter.php:42
|
428 |
-
msgid "Yes manage stock"
|
429 |
-
msgstr ""
|
430 |
-
|
431 |
-
#: admin/views/components/filter.php:52
|
432 |
-
msgid "Show"
|
433 |
-
msgstr ""
|
434 |
-
|
435 |
-
#: admin/views/components/filter.php:54
|
436 |
-
msgid "Clear filter"
|
437 |
-
msgstr ""
|
438 |
-
|
439 |
-
#: admin/views/components/filter.php:101
|
440 |
-
msgid "Hide or display cells"
|
441 |
-
msgstr ""
|
442 |
-
|
443 |
-
#: admin/views/components/filter.php:108
|
444 |
-
msgid "Sales price"
|
445 |
-
msgstr ""
|
446 |
-
|
447 |
-
#: admin/views/components/filter.php:142
|
448 |
-
msgid "Save setting"
|
449 |
-
msgstr ""
|
450 |
-
|
451 |
-
#: admin/class-stock-manager-admin.php:158
|
452 |
-
msgid "Taxable"
|
453 |
-
msgstr ""
|
454 |
-
|
455 |
-
#: admin/class-stock-manager-admin.php:159
|
456 |
-
msgid "Shipping only"
|
457 |
-
msgstr ""
|
458 |
-
|
459 |
-
#: admin/class-stock-manager-admin.php:160
|
460 |
-
msgctxt "Tax status"
|
461 |
-
msgid "None"
|
462 |
-
msgstr ""
|
463 |
-
|
464 |
#: woocommerce-stock-manager.php:59
|
465 |
msgid "Alert!"
|
466 |
msgstr ""
|
2 |
# This file is distributed under the same license as the WooCommerce Stock Manager plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Stock Manager 2.5.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-stock-manager\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-03-19T11:57:18+05:30\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.1.0\n"
|
15 |
"X-Domain: woocommerce-stock-manager\n"
|
34 |
msgid "https://www.storeapps.org/"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: admin/class-stock-manager-admin.php:152
|
38 |
+
#: admin/includes/wcm-class-table.php:541
|
39 |
+
msgid "No shipping class"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: admin/class-stock-manager-admin.php:158
|
43 |
+
msgid "Taxable"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: admin/class-stock-manager-admin.php:159
|
47 |
+
msgid "Shipping only"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: admin/class-stock-manager-admin.php:160
|
51 |
+
msgctxt "Tax status"
|
52 |
+
msgid "None"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: admin/class-stock-manager-admin.php:163
|
56 |
+
#: admin/includes/wcm-class-table.php:634
|
57 |
+
#: admin/includes/wcm-class-table.php:664
|
58 |
+
msgid "No"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: admin/class-stock-manager-admin.php:164
|
62 |
+
#: admin/includes/wcm-class-table.php:665
|
63 |
+
msgid "Notify"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: admin/class-stock-manager-admin.php:165
|
67 |
+
#: admin/includes/wcm-class-table.php:633
|
68 |
+
#: admin/includes/wcm-class-table.php:666
|
69 |
+
msgid "Yes"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
#: admin/includes/config.php:6
|
73 |
#: admin/includes/config.php:16
|
74 |
#: admin/includes/config.php:21
|
75 |
#: admin/includes/config.php:26
|
76 |
#: admin/includes/config.php:31
|
77 |
#: admin/includes/wcm-class-table.php:245
|
78 |
+
#: admin/views/import-export.php:120
|
79 |
+
#: admin/views/import-export.php:144
|
80 |
#: admin/views/log.php:29
|
81 |
#: admin/assets/src/components/ProductFilter.js:64
|
82 |
#: admin/assets/src/components/Products.js:99
|
86 |
|
87 |
#: admin/includes/config.php:11
|
88 |
#: admin/includes/wcm-class-table.php:255
|
89 |
+
#: admin/views/import-export.php:119
|
90 |
+
#: admin/views/import-export.php:143
|
91 |
#: admin/views/log.php:30
|
92 |
#: admin/assets/src/components/Products.js:93
|
93 |
msgid "ID"
|
127 |
msgstr ""
|
128 |
|
129 |
#: admin/includes/wcm-class-table.php:275
|
130 |
+
#: admin/views/import-export.php:126
|
131 |
#: admin/views/log.php:32
|
132 |
#: admin/assets/src/components/Products.js:97
|
133 |
msgid "Product type"
|
134 |
msgstr ""
|
135 |
|
136 |
#: admin/includes/wcm-class-table.php:285
|
137 |
+
#: admin/views/import-export.php:127
|
138 |
#: admin/views/log.php:33
|
139 |
msgid "Parent ID"
|
140 |
msgstr ""
|
160 |
msgstr ""
|
161 |
|
162 |
#: admin/includes/wcm-class-table.php:325
|
|
|
|
|
163 |
#: admin/views/components/filter.php:40
|
164 |
#: admin/views/components/filter.php:112
|
165 |
+
#: admin/views/import-export.php:122
|
166 |
+
#: admin/views/import-export.php:145
|
167 |
#: admin/assets/src/components/Products.js:139
|
168 |
#: admin/assets/src/components/ScreenOptions.js:68
|
169 |
msgid "Manage stock"
|
170 |
msgstr ""
|
171 |
|
172 |
#: admin/includes/wcm-class-table.php:335
|
|
|
|
|
173 |
#: admin/views/components/filter.php:46
|
174 |
#: admin/views/components/filter.php:114
|
175 |
+
#: admin/views/import-export.php:123
|
176 |
+
#: admin/views/import-export.php:146
|
177 |
#: admin/assets/src/components/ProductFilter.js:112
|
178 |
#: admin/assets/src/components/Products.js:142
|
179 |
#: admin/assets/src/components/ScreenOptions.js:73
|
181 |
msgstr ""
|
182 |
|
183 |
#: admin/includes/wcm-class-table.php:345
|
|
|
|
|
184 |
#: admin/views/components/filter.php:116
|
185 |
+
#: admin/views/import-export.php:124
|
186 |
+
#: admin/views/import-export.php:147
|
187 |
#: admin/assets/src/components/Products.js:145
|
188 |
#: admin/assets/src/components/ScreenOptions.js:78
|
189 |
msgid "Backorders"
|
190 |
msgstr ""
|
191 |
|
192 |
#: admin/includes/wcm-class-table.php:355
|
193 |
+
#: admin/views/components/filter.php:118
|
194 |
+
#: admin/views/import-export.php:125
|
195 |
+
#: admin/views/import-export.php:148
|
196 |
#: admin/views/log-history.php:38
|
197 |
#: admin/views/log.php:34
|
|
|
198 |
#: admin/assets/src/components/Products.js:148
|
199 |
#: admin/assets/src/components/ScreenOptions.js:83
|
200 |
msgid "Stock"
|
220 |
msgid "Same as parent"
|
221 |
msgstr ""
|
222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
#: admin/includes/wcm-class-table.php:648
|
224 |
#: admin/views/components/filter.php:47
|
225 |
msgid "In stock"
|
234 |
msgid "On backorder"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: admin/views/components/filter.php:3
|
238 |
+
msgid "Filter"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: admin/views/components/filter.php:4
|
242 |
+
#: admin/views/components/filter.php:63
|
243 |
+
msgid "Search by sku"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: admin/views/components/filter.php:5
|
247 |
+
#: admin/views/components/filter.php:73
|
248 |
+
msgid "Search by product name"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: admin/views/components/filter.php:6
|
252 |
+
msgid "Display setting"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: admin/views/components/filter.php:15
|
256 |
+
msgid "Order by"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: admin/views/components/filter.php:16
|
260 |
+
msgid "Product name ASC"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: admin/views/components/filter.php:17
|
264 |
+
msgid "Product name DESC"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: admin/views/components/filter.php:18
|
268 |
+
msgid "SKU ASC"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: admin/views/components/filter.php:19
|
272 |
+
msgid "SKU DESC"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: admin/views/components/filter.php:23
|
276 |
+
msgid "Simple products"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: admin/views/components/filter.php:24
|
280 |
+
msgid "Products with variation"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: admin/views/components/filter.php:28
|
284 |
+
msgid "All categories"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: admin/views/components/filter.php:41
|
288 |
+
msgid "No manage stock"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: admin/views/components/filter.php:42
|
292 |
+
msgid "Yes manage stock"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: admin/views/components/filter.php:52
|
296 |
+
msgid "Show"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: admin/views/components/filter.php:54
|
300 |
+
msgid "Clear filter"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: admin/views/components/filter.php:101
|
304 |
+
msgid "Hide or display cells"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: admin/views/components/filter.php:108
|
308 |
+
msgid "Sales price"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: admin/views/components/filter.php:142
|
312 |
+
msgid "Save setting"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: admin/views/import-export.php:110
|
316 |
msgid "Import"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: admin/views/import-export.php:113
|
320 |
msgid "You can upload csv file, with your stock data. "
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: admin/views/import-export.php:114
|
324 |
msgid "CSV file must be in this format, or you can export file with exist data and edit them. "
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: admin/views/import-export.php:115
|
328 |
msgid "If you have a lot of products and export/import not working, increase memory limit.. "
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: admin/views/import-export.php:116
|
332 |
+
msgid "File format"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: admin/views/import-export.php:121
|
336 |
#: admin/assets/src/components/Products.js:115
|
337 |
#: admin/assets/src/components/ScreenOptions.js:48
|
338 |
msgid "Product name"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: admin/views/import-export.php:130
|
|
|
|
|
|
|
|
|
342 |
msgid "123"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: admin/views/import-export.php:131
|
346 |
msgid "abc111"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: admin/views/import-export.php:132
|
350 |
msgid "T-shirt"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: admin/views/import-export.php:133
|
354 |
+
#: admin/views/import-export.php:135
|
355 |
msgid "yes"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: admin/views/import-export.php:134
|
359 |
msgid "instock"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: admin/views/import-export.php:136
|
363 |
msgid "10"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: admin/views/import-export.php:137
|
367 |
msgid "simple"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: admin/views/import-export.php:143
|
371 |
msgid "product id, required. Neccessary for import and export."
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: admin/views/import-export.php:144
|
375 |
msgid "product unique identificator."
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: admin/views/import-export.php:145
|
379 |
+
#: admin/views/import-export.php:147
|
380 |
msgid "values: \"yes\", \"notify\", \"no\". If is empty \"no\" will be save."
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: admin/views/import-export.php:146
|
384 |
msgid "values: \"instock\", \"outofstock\". If is empty \"outofstock\" will be save."
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: admin/views/import-export.php:148
|
388 |
msgid "quantity value. If is empty, 0 will be save."
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: admin/views/import-export.php:155
|
392 |
msgid "Upload csv file"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: admin/views/import-export.php:163
|
396 |
msgid "Upload"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: admin/views/import-export.php:174
|
400 |
msgid "The file "
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: admin/views/import-export.php:203
|
404 |
msgid "Product with ID: "
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: admin/views/import-export.php:214
|
408 |
msgid "Sorry, there was an error uploading your file."
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: admin/views/import-export.php:228
|
412 |
msgid "Export"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: admin/views/import-export.php:231
|
416 |
msgid "You can download csv file, with your stock data. "
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: admin/views/import-export.php:232
|
420 |
msgid "Create export file"
|
421 |
msgstr ""
|
422 |
|
458 |
msgid "Qty input step"
|
459 |
msgstr ""
|
460 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
#: woocommerce-stock-manager.php:59
|
462 |
msgid "Alert!"
|
463 |
msgstr ""
|
public/class-stock-manager.php
CHANGED
@@ -17,7 +17,7 @@ class Stock_Manager {
|
|
17 |
*
|
18 |
* @var string
|
19 |
*/
|
20 |
-
const VERSION = '2.5.
|
21 |
|
22 |
/**
|
23 |
* Plugin slug
|
17 |
*
|
18 |
* @var string
|
19 |
*/
|
20 |
+
const VERSION = '2.5.5';
|
21 |
|
22 |
/**
|
23 |
* Plugin slug
|
readme.txt
CHANGED
@@ -5,9 +5,9 @@ Author URI: https://www.storeapps.org/
|
|
5 |
Plugin URI: https://www.storeapps.org/woocommerce-plugins/?utm_source=wprepo&utm_medium=web&utm_campaign=wsm_readme
|
6 |
Tags: stock manager, woocommerce, stock management, inventory, products
|
7 |
Requires at least: 5.0.0
|
8 |
-
Tested up to: 5.
|
9 |
Requires PHP: 5.6
|
10 |
-
Stable tag: 2.5.
|
11 |
License: GPLv3
|
12 |
|
13 |
== Description ==
|
@@ -38,8 +38,8 @@ Additionally, you can:
|
|
38 |
* sort products by name or SKU
|
39 |
* search products by name or SKU
|
40 |
* show/hide columns for better usability
|
41 |
-
* variants for variable product
|
42 |
-
* each product or variation
|
43 |
|
44 |
#### **Manage custom fields**
|
45 |
|
@@ -55,14 +55,15 @@ With WooCommerce Stock Manager plugin, it is possible export all stock data of y
|
|
55 |
(This feature needs refactoring, so use this only on your own risk).
|
56 |
|
57 |
Export file structure:
|
58 |
-
|
59 |
SKU - product unique identificator, required.
|
|
|
60 |
Manage stock - values: "yes", "notify", "no". If is empty "no" will be save.
|
61 |
Stock status - values: "instock", "outofstock". If is empty "outofstock" will be save.
|
62 |
Backorders - values: "yes", "notify", "no". If is empty "no" will be save.
|
63 |
Stock - quantity value.
|
64 |
-
|
65 |
-
Parent
|
66 |
|
67 |
GDPR ready - plugin don't collect personal data.
|
68 |
|
@@ -147,6 +148,14 @@ Be sure, that you have active stock manage.
|
|
147 |
|
148 |
== Changelog ==
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
= 2.5.4 (29.01.2021) =
|
151 |
* New: WooCommerce 4.8.0, 4.9.2 compatible
|
152 |
* New: WordPress 5.6.0 compatible
|
@@ -217,5 +226,8 @@ For the changelog of earlier versions, please refer to the separate [changelog.t
|
|
217 |
|
218 |
== Upgrade Notice ==
|
219 |
|
|
|
|
|
|
|
220 |
= 2.5.4 =
|
221 |
WooCommerce 4.8.0, 4.9.2 compatible, WordPress 5.6.0 compatible, Updating stock for External/Affiliate product killing the Stock Manager page, Incorrect text domain at few places, POT file. Recommended upgrade.
|
5 |
Plugin URI: https://www.storeapps.org/woocommerce-plugins/?utm_source=wprepo&utm_medium=web&utm_campaign=wsm_readme
|
6 |
Tags: stock manager, woocommerce, stock management, inventory, products
|
7 |
Requires at least: 5.0.0
|
8 |
+
Tested up to: 5.7.0
|
9 |
Requires PHP: 5.6
|
10 |
+
Stable tag: 2.5.5
|
11 |
License: GPLv3
|
12 |
|
13 |
== Description ==
|
38 |
* sort products by name or SKU
|
39 |
* search products by name or SKU
|
40 |
* show/hide columns for better usability
|
41 |
+
* edit the variants for variable product after clicking on "Show variables" button
|
42 |
+
* save each product or variation separately, or save all displayed data
|
43 |
|
44 |
#### **Manage custom fields**
|
45 |
|
55 |
(This feature needs refactoring, so use this only on your own risk).
|
56 |
|
57 |
Export file structure:
|
58 |
+
Id - product ID.
|
59 |
SKU - product unique identificator, required.
|
60 |
+
Product name - Name/title of the product
|
61 |
Manage stock - values: "yes", "notify", "no". If is empty "no" will be save.
|
62 |
Stock status - values: "instock", "outofstock". If is empty "outofstock" will be save.
|
63 |
Backorders - values: "yes", "notify", "no". If is empty "no" will be save.
|
64 |
Stock - quantity value.
|
65 |
+
Type - type of product.
|
66 |
+
Parent ID - if product is variant, parent product ID is displayed for better filtering csv file.
|
67 |
|
68 |
GDPR ready - plugin don't collect personal data.
|
69 |
|
148 |
|
149 |
== Changelog ==
|
150 |
|
151 |
+
= 2.5.5 (19.03.2021) =
|
152 |
+
* New: WooCommerce 5.0.0, 5.1.0 compatible
|
153 |
+
* New: WordPress 5.7.0 compatible
|
154 |
+
* Fix: PHP Fatal error: Call to a member function set_sku() on bool when importing products via CSV
|
155 |
+
* Fix: jQuery 'ready' event is deprecated
|
156 |
+
* Update: Column names on Import/Export page
|
157 |
+
* Update: POT file
|
158 |
+
|
159 |
= 2.5.4 (29.01.2021) =
|
160 |
* New: WooCommerce 4.8.0, 4.9.2 compatible
|
161 |
* New: WordPress 5.6.0 compatible
|
226 |
|
227 |
== Upgrade Notice ==
|
228 |
|
229 |
+
= 2.5.5 =
|
230 |
+
WooCommerce 5.0.0, 5.1.0 compatible, WordPress 5.7.0 compatible, PHP Fatal error: Call to a member function set_sku() on bool when importing products via CSV, jQuery 'ready' event is deprecated, Column names on Import/Export page, POT file. Recommended upgrade.
|
231 |
+
|
232 |
= 2.5.4 =
|
233 |
WooCommerce 4.8.0, 4.9.2 compatible, WordPress 5.6.0 compatible, Updating stock for External/Affiliate product killing the Stock Manager page, Incorrect text domain at few places, POT file. Recommended upgrade.
|
woocommerce-stock-manager.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
* Plugin Name: WooCommerce Stock Manager
|
4 |
* Plugin URI: https://www.storeapps.org/woocommerce-plugins/
|
5 |
* Description: Manage product's stock and price in your WooCommerce store.
|
6 |
-
* Version: 2.5.
|
7 |
* Author: StoreApps
|
8 |
* Author URI: https://www.storeapps.org/
|
9 |
* Requires at least: 5.0.0
|
10 |
-
* Tested up to: 5.
|
11 |
* Requires PHP: 5.6+
|
12 |
* WC requires at least: 3.5.0
|
13 |
-
* WC tested up to:
|
14 |
* Text Domain: woocommerce-stock-manager
|
15 |
* Domain Path: /languages/
|
16 |
* Copyright (c) 2020-2021 StoreApps. All rights reserved.
|
@@ -25,7 +25,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
25 |
|
26 |
define( 'STOCKDIR', plugin_dir_path( __FILE__ ) );
|
27 |
define( 'STOCKURL', plugin_dir_url( __FILE__ ) );
|
28 |
-
define( 'STOCKVERSION', '2.5.
|
29 |
if( !defined( 'WSM_PLUGIN_FILE' ) ) {
|
30 |
define( 'WSM_PLUGIN_FILE', __FILE__ );
|
31 |
}
|
3 |
* Plugin Name: WooCommerce Stock Manager
|
4 |
* Plugin URI: https://www.storeapps.org/woocommerce-plugins/
|
5 |
* Description: Manage product's stock and price in your WooCommerce store.
|
6 |
+
* Version: 2.5.5
|
7 |
* Author: StoreApps
|
8 |
* Author URI: https://www.storeapps.org/
|
9 |
* Requires at least: 5.0.0
|
10 |
+
* Tested up to: 5.7.0
|
11 |
* Requires PHP: 5.6+
|
12 |
* WC requires at least: 3.5.0
|
13 |
+
* WC tested up to: 5.1.0
|
14 |
* Text Domain: woocommerce-stock-manager
|
15 |
* Domain Path: /languages/
|
16 |
* Copyright (c) 2020-2021 StoreApps. All rights reserved.
|
25 |
|
26 |
define( 'STOCKDIR', plugin_dir_path( __FILE__ ) );
|
27 |
define( 'STOCKURL', plugin_dir_url( __FILE__ ) );
|
28 |
+
define( 'STOCKVERSION', '2.5.5' );
|
29 |
if( !defined( 'WSM_PLUGIN_FILE' ) ) {
|
30 |
define( 'WSM_PLUGIN_FILE', __FILE__ );
|
31 |
}
|