Example 1

Example 1 #

fn getColor(title) {
  let match = regex(title, " - (.+)$");
  return match[0];
}

sello "brand" = "My brand";
sello "manufacturer" = src("vendor");
sello "price" = src("variant: price");
sello "private name" = src("title");
sello "property ColorText" = src("variant: option Color") || src("variant: option Färg");
sello "property M_197_0_brand_colour" = getColor(src("title"));
sello "property M_197_0_size" = src("variant: option Size") || src("variant: option Storlek");
sello "property M_197_0_standard_colour" = getColor(src("title"));
sello "property SizeName" = src("variant: option Size") || src("variant: option Storlek");
sello "property Tags" = src("tags");
sello "quantity" = src("variant: inventory quantity");
sello "recommended price" = src("variant: compare at price");
sello "sku" = src("variant: sku");
sello "source category" = src("product type");
sello "standard description en" = src("body html");
sello "standard name en" = src("title");

on "create" {
  sello "calculate price" = "1";
  sello "property GTIN" = src("variant: barcode");
  sello "images" = src("images");
  sello "group type" = "model";
}