feat: Add XML file management functionality

- Created XmlFiles control class for handling XML file views and regeneration.
- Implemented method to retrieve clients with XML feeds in the factory class.
- Added database migration to include google_merchant_account_id in clients table.
- Created migrations for products_keyword_planner_terms and products_merchant_sync_log tables.
- Added campaign_keywords table migration for managing campaign keyword data.
- Developed main view template for displaying XML files and their statuses.
- Introduced a debug script for analyzing product URLs and their statuses.
This commit is contained in:
2026-02-18 21:23:53 +01:00
parent 3dc06d505a
commit efbdcce08a
36 changed files with 8778 additions and 2615 deletions

View File

@@ -63,6 +63,7 @@ CREATE TABLE IF NOT EXISTS `clients` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '0',
`google_ads_customer_id` varchar(20) DEFAULT NULL,
`google_merchant_account_id` varchar(32) DEFAULT NULL,
`google_ads_start_date` date DEFAULT NULL,
`deleted` int(11) DEFAULT 0,
`bestseller_min_roas` int(11) DEFAULT NULL,
@@ -330,6 +331,31 @@ CREATE TABLE IF NOT EXISTS `campaign_search_terms` (
KEY `idx_campaign_search_terms_ad_group_id` (`ad_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `campaign_keywords` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`campaign_id` int(11) NOT NULL,
`ad_group_id` int(11) NOT NULL,
`keyword_text` varchar(255) NOT NULL,
`match_type` varchar(40) DEFAULT NULL,
`impressions_30` int(11) NOT NULL DEFAULT 0,
`clicks_30` int(11) NOT NULL DEFAULT 0,
`cost_30` decimal(20,6) NOT NULL DEFAULT 0.000000,
`conversions_30` decimal(20,6) NOT NULL DEFAULT 0.000000,
`conversion_value_30` decimal(20,6) NOT NULL DEFAULT 0.000000,
`roas_30` decimal(20,6) NOT NULL DEFAULT 0.000000,
`impressions_all_time` int(11) NOT NULL DEFAULT 0,
`clicks_all_time` int(11) NOT NULL DEFAULT 0,
`cost_all_time` decimal(20,6) NOT NULL DEFAULT 0.000000,
`conversions_all_time` decimal(20,6) NOT NULL DEFAULT 0.000000,
`conversion_value_all_time` decimal(20,6) NOT NULL DEFAULT 0.000000,
`roas_all_time` decimal(20,6) NOT NULL DEFAULT 0.000000,
`date_sync` date DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_campaign_keywords` (`campaign_id`,`ad_group_id`,`keyword_text`(191),`match_type`),
KEY `idx_campaign_keywords_campaign_id` (`campaign_id`),
KEY `idx_campaign_keywords_ad_group_id` (`ad_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `campaign_negative_keywords` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`campaign_id` int(11) NOT NULL,