New "VITEC Import" module under Web: one import page per domain model (v1: Market, Solution, Product - registry-driven, adding a model is one config entry). Workflow: upload a CSV (delimiter and encoding are auto-detected, including German-Excel semicolon/Windows-1252), map CSV columns to DB fields, persist the mapping per model together with the identity field used for matching (new table tx_vitec_import_mapping, no TCA - pure tool configuration), review a unified list of CSV rows matched against the DB records (new / update with differing fields / unchanged / db-only), then apply the checked rows through DataHandler. Each importable row carries an editable JSON payload textarea - what is written is the textarea content, not the raw CSV, so editors can fix values right in the review step. The parsed CSV travels through the form as a hidden JSON field: no session state, no temp files. Importable fields are derived from TCA at runtime (scalar types only; files, categories and other relations are excluded - a flat CSV cannot carry them). Payloads are whitelisted against that field list on apply; new records require a storage pid (prefilled from existing records). BE user permissions apply via DataHandler. The module ships its own CSS (backend-import.css, loaded only by this module) using the frontend button palette from _vitec.scss: orange #f47937 for primary actions, navy #26358c for secondary actions and structure. The stray <h2>Hi</h2> debug leftover in the shared backend layout is removed (also affects the OG Image module). A fourth tab "SEO Research" handles the recurring keyword-research CSV. It is deliberately not an import mask - the file carries research only (no meta title/description yet). Each upload is persisted as a delivery (tx_vitec_seo_research, never deleted) and evaluated: diff against the previous delivery keyed by URL, a structure check of the CSV tree against TYPO3 (pages by slug path; market/solution/product rows against the domain tables, matched by slug then normalized title), and the three work lists from the SEO flags (quick wins by GSC impressions, shared terms grouped by keyword, already ranking). CsvReader now deduplicates repeated header names, which that CSV has. New CLI command vitec:create-markets: creates the market records the structure check reports as missing, sourced from the stored delivery and matched through the same SeoResearchService - what the module lists is what the command creates. Each market gets a sys_category of the same title, found anywhere under the auto-detected market category root or created; sub-market categories are created under the parent market's category, so the category tree carries the hierarchy the flat market model cannot. Idempotent, dry-run first. New CLI commands vitec:create-markets and vitec:market-dummy-image. create-markets creates the market records the structure check reports as missing (root detection three-staged: option, auto-detect, find or create a "Markets" category). market-dummy-image assigns a shared placeholder (white logo on brand navy, fileadmin/placeholders/) to every market without an image - one sys_file for all, replacing the file restyles every placeholder at once. Both idempotent. Deliberately out of v1: import log with three-way compare (protection against overwriting manual edits), images/relations, multiple saved mappings per model.
318 lines
12 KiB
SQL
Executable File
318 lines
12 KiB
SQL
Executable File
CREATE TABLE tx_vitec_domain_model_product (
|
|
uid int(11) NOT NULL auto_increment,
|
|
pid int(11) DEFAULT '0' NOT NULL,
|
|
tstamp int(11) DEFAULT '0' NOT NULL,
|
|
crdate int(11) DEFAULT '0' NOT NULL,
|
|
cruser_id int(11) DEFAULT '0' NOT NULL,
|
|
deleted tinyint(4) DEFAULT '0' NOT NULL,
|
|
hidden tinyint(4) DEFAULT '0' NOT NULL,
|
|
starttime int(11) DEFAULT '0' NOT NULL,
|
|
endtime int(11) DEFAULT '0' NOT NULL,
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
slug varchar(255) DEFAULT '' NOT NULL,
|
|
PRIMARY KEY (uid),
|
|
urltitle varchar(255) DEFAULT '' NOT NULL,
|
|
seotitle varchar(255) DEFAULT '' NOT NULL,
|
|
seometa text,
|
|
keywords text,
|
|
productimage int(11) DEFAULT '0' NOT NULL,
|
|
structureddata text,
|
|
teaser varchar(255) DEFAULT '' NOT NULL,
|
|
subtitle varchar(255) DEFAULT '' NOT NULL,
|
|
applications text,
|
|
highlights text,
|
|
description text,
|
|
image INTEGER,
|
|
relatedimage INTEGER,
|
|
ogimage INTEGER,
|
|
legacy tinyint(4) DEFAULT '0' NOT NULL,
|
|
supportproduct tinyint(4) DEFAULT '0' NOT NULL,
|
|
subproduct tinyint(4) DEFAULT '0' NOT NULL,
|
|
cta varchar(255) DEFAULT '' NOT NULL,
|
|
sorting1 smallint(5) NOT NULL,
|
|
sorting2 smallint(5) NOT NULL,
|
|
sorting3 smallint(5) NOT NULL,
|
|
sorting4 smallint(5) NOT NULL,
|
|
sorting5 smallint(5) NOT NULL,
|
|
links text,
|
|
hideonapp smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
hideonwebsite smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
hideondatasheets smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
hideonproducts smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
shortcut tinyint(4) DEFAULT '0' NOT NULL,
|
|
shortcutpid smallint(5) NOT NULL,
|
|
video varchar(255) DEFAULT '' NOT NULL,
|
|
key1 varchar(255) DEFAULT '' NOT NULL,
|
|
key2 varchar(255) DEFAULT '' NOT NULL,
|
|
key3 varchar(255) DEFAULT '' NOT NULL,
|
|
apptext1 varchar(255) DEFAULT '' NOT NULL,
|
|
apptext2 varchar(255) DEFAULT '' NOT NULL,
|
|
apptext3 varchar(255) DEFAULT '' NOT NULL,
|
|
productlayout int(11) DEFAULT '0' NOT NULL,
|
|
contentelement varchar(255) DEFAULT '' NOT NULL,
|
|
contentelementcta varchar(255) DEFAULT '' NOT NULL,
|
|
videofile int(11) unsigned DEFAULT '0' NOT NULL,
|
|
showdatapath smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
KEY parent (pid)
|
|
);
|
|
CREATE TABLE tx_vitec_domain_model_download (
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
slug varchar(255) DEFAULT '' NOT NULL,
|
|
teaser varchar(255) NOT NULL DEFAULT '',
|
|
keywords varchar(255) NOT NULL DEFAULT '',
|
|
description text,
|
|
file int(11) unsigned NOT NULL DEFAULT '0',
|
|
sort1 varchar(255) NOT NULL DEFAULT '',
|
|
sort2 varchar(255) NOT NULL DEFAULT '',
|
|
sort3 varchar(255) NOT NULL DEFAULT '',
|
|
private_download smallint(1) unsigned NOT NULL DEFAULT '0',
|
|
hideonapp smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
hideonwebsite smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
hideondatasheets smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
hideonproducts smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
icon varchar(255) NOT NULL DEFAULT '',
|
|
filepath varchar(255) NOT NULL DEFAULT '',
|
|
fileprefix varchar(255) NOT NULL DEFAULT '',
|
|
useolddl smallint(1) unsigned NOT NULL DEFAULT '0'
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_product_download_mm (
|
|
uid_local int(11) DEFAULT '0' NOT NULL,
|
|
uid_foreign int(11) DEFAULT '0' NOT NULL,
|
|
sorting int(11) DEFAULT '0' NOT NULL,
|
|
sorting_foreign int(11) DEFAULT '0' NOT NULL,
|
|
KEY uid_local (uid_local),
|
|
KEY uid_foreign (uid_foreign)
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_product_related_mm (
|
|
uid_local INT(11) NOT NULL,
|
|
uid_foreign INT(11) NOT NULL,
|
|
sorting INT(11) DEFAULT '0' NOT NULL,
|
|
PRIMARY KEY (uid_local, uid_foreign)
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_domain_model_usecase (
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
slug varchar(255) DEFAULT '' NOT NULL,
|
|
subtitle varchar(255) DEFAULT '' NOT NULL,
|
|
|
|
card_image int(11) unsigned DEFAULT '0' NOT NULL,
|
|
customer_logo int(11) unsigned DEFAULT '0' NOT NULL,
|
|
teaser text,
|
|
markets int(11) unsigned DEFAULT '0' NOT NULL,
|
|
|
|
hero_bgimage int(11) unsigned DEFAULT '0' NOT NULL,
|
|
hero_small_image int(11) unsigned DEFAULT '0' NOT NULL,
|
|
hero_video int(11) unsigned DEFAULT '0' NOT NULL,
|
|
hero_overlay_color varchar(20) DEFAULT '' NOT NULL,
|
|
hero_overlay_opacity decimal(3,2) DEFAULT '0.00' NOT NULL,
|
|
|
|
content_elements int(11) unsigned DEFAULT '0' NOT NULL,
|
|
|
|
solutions int(11) unsigned DEFAULT '0' NOT NULL,
|
|
products int(11) unsigned DEFAULT '0' NOT NULL,
|
|
categories int(11) unsigned DEFAULT '0' NOT NULL,
|
|
|
|
seo_title varchar(255) DEFAULT '' NOT NULL,
|
|
seo_description text,
|
|
no_index smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
no_follow smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
canonical_link varchar(1024) DEFAULT '' NOT NULL,
|
|
og_title varchar(255) DEFAULT '' NOT NULL,
|
|
og_description text,
|
|
og_image int(11) unsigned DEFAULT '0' NOT NULL,
|
|
twitter_title varchar(255) DEFAULT '' NOT NULL,
|
|
twitter_description text,
|
|
twitter_image int(11) unsigned DEFAULT '0' NOT NULL,
|
|
|
|
layout_variant varchar(30) DEFAULT 'standard' NOT NULL,
|
|
background_variant varchar(20) DEFAULT 'none' NOT NULL,
|
|
accent_color varchar(20) DEFAULT '' NOT NULL,
|
|
hideonapp smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
hideonwebsite smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
featured smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
show_related smallint(5) unsigned DEFAULT '1' NOT NULL,
|
|
hero_layout varchar(20) DEFAULT 'fullscreen' NOT NULL,
|
|
text_theme varchar(20) DEFAULT 'light' NOT NULL,
|
|
|
|
description text,
|
|
singlepid varchar(255) DEFAULT '' NOT NULL
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_domain_model_solution (
|
|
uid int(11) NOT NULL auto_increment,
|
|
pid int(11) DEFAULT '0' NOT NULL,
|
|
tstamp int(11) DEFAULT '0' NOT NULL,
|
|
crdate int(11) DEFAULT '0' NOT NULL,
|
|
cruser_id int(11) DEFAULT '0' NOT NULL,
|
|
deleted tinyint(4) DEFAULT '0' NOT NULL,
|
|
hidden tinyint(4) DEFAULT '0' NOT NULL,
|
|
starttime int(11) DEFAULT '0' NOT NULL,
|
|
endtime int(11) DEFAULT '0' NOT NULL,
|
|
sys_language_uid int(11) DEFAULT '0' NOT NULL,
|
|
l10n_parent int(11) DEFAULT '0' NOT NULL,
|
|
l10n_diffsource mediumblob,
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
slug varchar(255) DEFAULT '' NOT NULL,
|
|
subtitle varchar(255) DEFAULT '' NOT NULL,
|
|
teaser varchar(255) DEFAULT '' NOT NULL,
|
|
description text,
|
|
image int(11) DEFAULT '0' NOT NULL,
|
|
PRIMARY KEY (uid),
|
|
KEY parent (pid),
|
|
KEY language (l10n_parent, sys_language_uid)
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_domain_model_market (
|
|
uid int(11) NOT NULL auto_increment,
|
|
pid int(11) DEFAULT '0' NOT NULL,
|
|
tstamp int(11) DEFAULT '0' NOT NULL,
|
|
crdate int(11) DEFAULT '0' NOT NULL,
|
|
cruser_id int(11) DEFAULT '0' NOT NULL,
|
|
deleted tinyint(4) DEFAULT '0' NOT NULL,
|
|
hidden tinyint(4) DEFAULT '0' NOT NULL,
|
|
starttime int(11) DEFAULT '0' NOT NULL,
|
|
endtime int(11) DEFAULT '0' NOT NULL,
|
|
sys_language_uid int(11) DEFAULT '0' NOT NULL,
|
|
l10n_parent int(11) DEFAULT '0' NOT NULL,
|
|
l10n_diffsource mediumblob,
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
slug varchar(255) DEFAULT '' NOT NULL,
|
|
detail_page int(11) DEFAULT '0' NOT NULL,
|
|
subtitle varchar(255) DEFAULT '' NOT NULL,
|
|
teaser varchar(255) DEFAULT '' NOT NULL,
|
|
description text,
|
|
image int(11) DEFAULT '0' NOT NULL,
|
|
PRIMARY KEY (uid),
|
|
KEY parent (pid),
|
|
KEY language (l10n_parent, sys_language_uid)
|
|
);
|
|
|
|
ALTER TABLE sys_category
|
|
ADD class VARCHAR(255) DEFAULT '' NOT NULL,
|
|
ADD filetype VARCHAR(255) DEFAULT '' NOT NULL,
|
|
ADD type VARCHAR(255) DEFAULT '' NOT NULL;
|
|
|
|
|
|
CREATE TABLE tt_content (
|
|
tx_vitec_bg_variant VARCHAR(20) DEFAULT 'none' NOT NULL,
|
|
tx_vitec_gap VARCHAR(5) DEFAULT '3' NOT NULL,
|
|
tx_vitec_col1_align VARCHAR(20) DEFAULT 'stretch' NOT NULL,
|
|
tx_vitec_col1_justify VARCHAR(20) DEFAULT 'flex-start' NOT NULL,
|
|
tx_vitec_col2_align VARCHAR(20) DEFAULT 'stretch' NOT NULL,
|
|
tx_vitec_col2_justify VARCHAR(20) DEFAULT 'flex-start' NOT NULL,
|
|
tx_vitec_col3_align VARCHAR(20) DEFAULT 'stretch' NOT NULL,
|
|
tx_vitec_col3_justify VARCHAR(20) DEFAULT 'flex-start' NOT NULL,
|
|
tx_vitec_col4_align VARCHAR(20) DEFAULT 'stretch' NOT NULL,
|
|
tx_vitec_col4_justify VARCHAR(20) DEFAULT 'flex-start' NOT NULL,
|
|
tx_vitec_usecase_content int(11) unsigned DEFAULT '0' NOT NULL
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_domain_model_event (
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
slug varchar(255) DEFAULT '' NOT NULL,
|
|
teaser varchar(255) DEFAULT '' NOT NULL,
|
|
description text,
|
|
eventstart int(11) DEFAULT '0' NOT NULL,
|
|
eventend int(11) DEFAULT '0' NOT NULL,
|
|
venue varchar(255) DEFAULT '' NOT NULL,
|
|
booth varchar(255) DEFAULT '' NOT NULL,
|
|
city varchar(255) DEFAULT '' NOT NULL,
|
|
country varchar(255) DEFAULT '' NOT NULL,
|
|
attendancemode varchar(20) DEFAULT 'offline' NOT NULL,
|
|
eventstatus varchar(20) DEFAULT 'scheduled' NOT NULL,
|
|
eventurl varchar(1024) DEFAULT '' NOT NULL,
|
|
meetinglink varchar(1024) DEFAULT '' NOT NULL,
|
|
image int(11) unsigned DEFAULT '0' NOT NULL,
|
|
hideonwebsite smallint(5) unsigned DEFAULT '0' NOT NULL,
|
|
hideonapp smallint(5) unsigned DEFAULT '0' NOT NULL
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_usecase_solution_mm (
|
|
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
|
|
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
|
|
sorting int(11) unsigned DEFAULT '0' NOT NULL,
|
|
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
|
|
KEY uid_local (uid_local),
|
|
KEY uid_foreign (uid_foreign)
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_usecase_product_mm (
|
|
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
|
|
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
|
|
sorting int(11) unsigned DEFAULT '0' NOT NULL,
|
|
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
|
|
KEY uid_local (uid_local),
|
|
KEY uid_foreign (uid_foreign)
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_usecase_market_mm (
|
|
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
|
|
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
|
|
sorting int(11) unsigned DEFAULT '0' NOT NULL,
|
|
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
|
|
KEY uid_local (uid_local),
|
|
KEY uid_foreign (uid_foreign)
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_domain_model_location (
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
slug varchar(255) DEFAULT '' NOT NULL,
|
|
country_code varchar(5) DEFAULT '' NOT NULL,
|
|
latitude decimal(11,7) DEFAULT '0.0000000' NOT NULL,
|
|
longitude decimal(11,7) DEFAULT '0.0000000' NOT NULL,
|
|
address_company varchar(255) DEFAULT '' NOT NULL,
|
|
street varchar(255) DEFAULT '' NOT NULL,
|
|
address_additional varchar(255) DEFAULT '' NOT NULL,
|
|
postal_code varchar(20) DEFAULT '' NOT NULL,
|
|
city varchar(255) DEFAULT '' NOT NULL,
|
|
region varchar(255) DEFAULT '' NOT NULL,
|
|
country varchar(255) DEFAULT '' NOT NULL,
|
|
phone varchar(100) DEFAULT '' NOT NULL,
|
|
fax varchar(100) DEFAULT '' NOT NULL,
|
|
email varchar(255) DEFAULT '' NOT NULL,
|
|
contact_link varchar(1024) DEFAULT '' NOT NULL,
|
|
legal_links text,
|
|
marker_label varchar(255) DEFAULT '' NOT NULL,
|
|
marker_color varchar(20) DEFAULT '#ff6633' NOT NULL,
|
|
marker_size decimal(3,2) DEFAULT '0.50' NOT NULL
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_domain_model_customer (
|
|
title varchar(255) DEFAULT '' NOT NULL,
|
|
logo int(11) unsigned DEFAULT '0' NOT NULL,
|
|
emphasize_logo smallint(5) unsigned DEFAULT '0' NOT NULL
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_form_submission (
|
|
form_key varchar(30) DEFAULT '' NOT NULL,
|
|
payload text,
|
|
delivery_method varchar(20) DEFAULT '' NOT NULL,
|
|
delivery_status varchar(20) DEFAULT '' NOT NULL,
|
|
delivery_error text
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_import_mapping (
|
|
uid int(11) NOT NULL auto_increment,
|
|
pid int(11) DEFAULT '0' NOT NULL,
|
|
tstamp int(11) DEFAULT '0' NOT NULL,
|
|
crdate int(11) DEFAULT '0' NOT NULL,
|
|
model varchar(64) DEFAULT '' NOT NULL,
|
|
identity_field varchar(64) DEFAULT 'slug' NOT NULL,
|
|
mapping text,
|
|
PRIMARY KEY (uid),
|
|
KEY model (model)
|
|
);
|
|
|
|
CREATE TABLE tx_vitec_seo_research (
|
|
uid int(11) NOT NULL auto_increment,
|
|
pid int(11) DEFAULT '0' NOT NULL,
|
|
crdate int(11) DEFAULT '0' NOT NULL,
|
|
be_user int(11) DEFAULT '0' NOT NULL,
|
|
filename varchar(255) DEFAULT '' NOT NULL,
|
|
row_count int(11) DEFAULT '0' NOT NULL,
|
|
payload mediumtext,
|
|
PRIMARY KEY (uid)
|
|
);
|