@haus-tech/product-export-plugin 2.2.3 → 2.2.5

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.
@@ -173,9 +173,10 @@ let ProductExportService = class ProductExportService {
173
173
  record[`optionValues:${lang}`] = variantValues[lang];
174
174
  record[`variantFacets:${lang}`] = variantFacets[lang];
175
175
  }
176
+ const productVariantPrices = variant.productVariantPrices.filter((price) => price.channelId === ctx.channelId);
176
177
  record.assets = records.length === 0 ? productAssets : '';
177
178
  record.sku = variant.sku;
178
- record.price = variant.productVariantPrices[0]?.price / 100; // Assuming the price is stored in cents
179
+ record.price = productVariantPrices[0]?.price / 100; // Assuming the price is stored in cents
179
180
  record.taxCategory = 'standard'; // Replace with actual tax category if available
180
181
  record.stockOnHand = stockOnHand;
181
182
  record.trackInventory = variant.trackInventory.toLowerCase();
@@ -283,13 +284,13 @@ let ProductExportService = class ProductExportService {
283
284
  if (field.type === 'relation') {
284
285
  const entity = field.entity.name;
285
286
  customFields.add({
286
- name: `variant:${field.name}`,
287
+ name: `product:${field.name}`,
287
288
  type: entity.toLowerCase(),
288
289
  });
289
290
  return;
290
291
  }
291
292
  customFields.add({
292
- name: `variant:${field.name}`,
293
+ name: `product:${field.name}`,
293
294
  type: field.type,
294
295
  });
295
296
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haus-tech/product-export-plugin",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "A Vendure plugin for importing products from a CSV file",
5
5
  "author": "Haus Tech",
6
6
  "repository": {