working version checkin

*  add config class
*  add vlookup
*  add menu
*  add photo folder creation
*  add prep for product templates
This commit is contained in:
Ben Miller
2024-11-04 20:44:19 -07:00
parent b6b75e426c
commit 20a5e738f7
7 changed files with 142 additions and 0 deletions

44
src/productTemplate.ts Normal file
View File

@ -0,0 +1,44 @@
function productTemplate(row: number) {
let updateColumns = [
"function",
"type",
"category",
"product_type",
"tags",
"price",
"shipping",
"weight (grams)",
]
let productInventorySheet =
SpreadsheetApp.getActiveSpreadsheet().getSheetByName("product_inventory")
let titleValue = getCellValueByColumnName(productInventorySheet, "title", row)
for (let i = 0; i < updateColumns.length; i++) {
let currentValue = getCellValueByColumnName(
productInventorySheet,
updateColumns[i],
row
)
if (currentValue != "") {
console.log(
"current value for '" + updateColumns[i] + "' is '" + currentValue + "'"
)
continue
}
let templateValue = vlookupByColumns(
"product_types",
"title",
titleValue,
updateColumns[i]
)
if (templateValue != "") {
console.log(
"template value for '" +
updateColumns[i] +
"' is '" +
templateValue +
"'"
)
}
}
}