multicloud_rule_manager 1.1.84 → 1.1.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/retrieveproduct.js +25 -9
- package/package.json +1 -1
|
@@ -101,12 +101,14 @@ export default {
|
|
|
101
101
|
"products_structure"
|
|
102
102
|
);
|
|
103
103
|
|
|
104
|
-
const
|
|
104
|
+
const productStructureRoot = structure.find(
|
|
105
105
|
(p) => p.product_id === rootGuid
|
|
106
106
|
);
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
const productStructureRootId = productStructureRoot.guid;
|
|
109
|
+
|
|
110
|
+
console.log('rootGuid: ' + rootGuid);
|
|
111
|
+
console.log('productStructureRootId: ' + productStructureRootId);
|
|
110
112
|
console.log(`🌳 Totale elementi structure: ${structure.length}`);
|
|
111
113
|
|
|
112
114
|
// =========================
|
|
@@ -205,17 +207,31 @@ export default {
|
|
|
205
207
|
|
|
206
208
|
if (children.length === 0) {
|
|
207
209
|
rows1.push({
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
210
|
+
"Product Name": product.name,
|
|
211
|
+
"Product Eligible": productStructureRoot.eligible,
|
|
212
|
+
"Category Name": cat.name,
|
|
213
|
+
"Category Visible": cat.visible,
|
|
214
|
+
"Category Visible Cart": cat.visible_cart,
|
|
215
|
+
"Child Product Name": "",
|
|
211
216
|
});
|
|
212
217
|
}
|
|
213
218
|
|
|
214
219
|
for (const child of children) {
|
|
215
220
|
rows1.push({
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
221
|
+
"Product Name": product.name,
|
|
222
|
+
"Product Eligible": productStructureRoot.eligible,
|
|
223
|
+
"Category Name": cat.name,
|
|
224
|
+
"Category Visible": cat.visible,
|
|
225
|
+
"Category Visible Cart": cat.visible_cart,
|
|
226
|
+
"Category Min Qty": cat.min_qty,
|
|
227
|
+
"Category Dft Qty": cat.default_qty,
|
|
228
|
+
"Category Max Qty": cat.max_qty,
|
|
229
|
+
"Child Product Name": child.name,
|
|
230
|
+
"Category Visible": child.visible,
|
|
231
|
+
"Category Visible Cart": child.visible_cart,
|
|
232
|
+
"Category Min Qty": child.min_qty,
|
|
233
|
+
"Category Dft Qty": child.default_qty,
|
|
234
|
+
"Category Max Qty": child.max_qty
|
|
219
235
|
});
|
|
220
236
|
|
|
221
237
|
if (!child.product_id) continue;
|