Product Name Cleanup β€” Phase 2 Split

Product Name Cleanup β€” Functional Description

Reads every pd_name_cleanup_staging row still marked pending_analysis and decides a bucket from the staged name. The read joins oc_product and oc_manufacturer for the live model, MPN, and manufacturer. Names with fewer than three commas go to Bucket B (ai_ready) with the proposal fields cleared. Names with three or more commas are split on the first comma. The text before that comma becomes the proposed title after model and MPN removal. When that title is 70 characters or fewer, the remaining comma-separated pieces become a FEATURES list and the row is saved as Bucket A (auto_processed). When the title is still longer than 70 characters, or nothing is left after model and MPN removal, the row goes to Bucket B. This phase does not change oc_product or oc_product_description.

  • A browser visit only checks that the staging table exists and shows current counts. Splitting starts from the button below, from the CLI, or from POST action=split.
  • CLI: php maintenance/productNameCleanup_phase2_split.php from the fsadmin directory. JSON clients send format=json or the XMLHttpRequest header. Those callers skip navigation.
  • Fewer than 3 commas: bucket_b, ai_ready, proposed name and spec snippet cleared, proposed character count 0.
  • Three or more commas: the first segment is the title candidate. Model and MPN tokens of at least 2 characters are removed case-insensitively as whole tokens. A hyphen, dot, or slash stays attached, so a shorter code is not cut out of a longer model. Leading and trailing dashes, slashes, and spaces are removed.
  • Candidate longer than 70 characters, or empty after cleanup: Bucket B, with the same cleared proposal fields.
  • Candidate of 70 characters or fewer: each later comma piece is trimmed, the manufacturer name and manufacturer words of at least 4 characters are removed, model and MPN are removed, and empty pieces are dropped. The rest is stored as an HTML FEATURES list.
  • A missing product or manufacturer does not drop the staging row. Missing model, MPN, and brand are treated as empty.
  • Writes commit in transactions of 2,500 rows. A failed batch rolls back that batch only. Rows already committed in earlier batches stay updated. A dropped browser connection retries the same run up to 3 times; rows already moved off pending_analysis are not written again.
Pending Analysis

0

status = pending_analysis

Auto Processed

11,592

status = auto_processed

AI Ready

4,100

status = ai_ready

Execution stats
Metric Value
Database opencart_fsreal_oc3
Rows processed 0
Bucket A auto_processed 0
Bucket A with no remaining features 0
Bucket B ai_ready 0
Bucket B fewer than 3 commas 0
Bucket B title still over 70 0
Bucket B title empty after model/MPN removal 0
Rows skipped 0
Batches committed 0
Execution time 0.034 seconds
Memory usage 2.00 MB