TEST MODE
Show details for 2 _ Additional Data Columns

2 _ Additional Data Columns

This Product

NOTE: An issue has been found with this function. This product will explain how this feature works, however at the time of writing (11/10/23) it will not function correctly. This will be fixed soon.

This product explores the ability to place additional data columns within the CSV (and to modify their names if necessary). Additional data includes:

  • Quantity
  • Setup cost
  • SKU
  • Price

Pricing script configuration

{
    "filePath": "Additional Data Columns.csv",
    "quantityColumnName": "Quantity",
    "priceColumnName": "Cost",
    "skuColumnName": "ItemSKU",
    "setupCostColumnName": "SetupCost",
    "debugMode": true
}

Pricing Script CSV

A B Cost Quantity SetupCost ItemSKU
1 1 2 1 5 ITEM001
2 1 3 1 5 ITEM002
3 1 4 1 5 ITEM003
1 2 3 1 5 ITEM004
2 2 4 1 5 ITEM005
3 2 5 1 5 ITEM006
1 3 4 1 5 ITEM007
2 3 5 1 5 ITEM008
3 3 6 1 5 ITEM009
A *
B *
£10,000.00
Config qty column name Quantity
Config qty useTierPrice false
Attributes length 2
Attribute name: A with value: 1
Attribute name: B with value: 1
Cached attributes length: 2
filename = Additional Data Columns.csv
columns initialized: A,B,Cost,Quantity,SetupCost,ItemSKU
get csv price
Checking row matching for columnName = A row value= 1
columnName = A attrValue= 1 temp= 1
Checking row matching for columnName = B row value= 1
columnName = B attrValue= 1 temp= 1
Checking row matching for columnName = Cost row value= 2
Checking row matching for columnName = Quantity row value= 1
Quantity matches = true. Row Quantity: 1. Product Quantity: 1
Checking row matching for columnName = SetupCost row value= 5
Checking row matching for columnName = ItemSKU row value= ITEM001
Sku matches = false. Row SKU: ITEM001. Product SKU:null
row dont match additional logic
Row: (1,1,2,1,5,ITEM001) with index: 1 is matching: false
Checking row matching for columnName = A row value= 2
columnName = A attrValue= 1 temp= 2
row dont match temp=2 attrvalue=1
Row: (2,1,3,1,5,ITEM002) with index: 2 is matching: false
Checking row matching for columnName = A row value= 3
columnName = A attrValue= 1 temp= 3
row dont match temp=3 attrvalue=1
Row: (3,1,4,1,5,ITEM003) with index: 3 is matching: false
Checking row matching for columnName = A row value= 1
columnName = A attrValue= 1 temp= 1
Checking row matching for columnName = B row value= 2
columnName = B attrValue= 1 temp= 2
row dont match temp=2 attrvalue=1
Row: (1,2,3,1,5,ITEM004) with index: 4 is matching: false
Checking row matching for columnName = A row value= 2
columnName = A attrValue= 1 temp= 2
row dont match temp=2 attrvalue=1
Row: (2,2,4,1,5,ITEM005) with index: 5 is matching: false
Checking row matching for columnName = A row value= 3
columnName = A attrValue= 1 temp= 3
row dont match temp=3 attrvalue=1
Row: (3,2,5,1,5,ITEM006) with index: 6 is matching: false
Checking row matching for columnName = A row value= 1
columnName = A attrValue= 1 temp= 1
Checking row matching for columnName = B row value= 3
columnName = B attrValue= 1 temp= 3
row dont match temp=3 attrvalue=1
Row: (1,3,4,1,5,ITEM007) with index: 7 is matching: false
Checking row matching for columnName = A row value= 2
columnName = A attrValue= 1 temp= 2
row dont match temp=2 attrvalue=1
Row: (2,3,5,1,5,ITEM008) with index: 8 is matching: false
Checking row matching for columnName = A row value= 3
columnName = A attrValue= 1 temp= 3
row dont match temp=3 attrvalue=1
Row: (3,3,6,1,5,ITEM009) with index: 9 is matching: false
No matching price, return default price
return default price
unit price = 10000