Migrate product models and enhance promo redemption functionality (#3587)

* Migrate product models; add `promo_redemption`

* Add DomainPricing & ProductOrder repositories

* Use Promo entity typehints and update tests

* Use DI logger, validate order config, update tests

* Replace `error_log` with logger; use stubs in tests

* Use attachOrderConfig and tighten service checks

* Clarify domain defaults and remove deprecated doc tag

* Add missing indexes to `promo_redemption` table

* Enrich promo API arrays and add redemption filters

* Various UI/JS fixes and template cleanups

* Log invoice issues as warnings; expose form_id

* Normalize spelling in UpdatePatcher comment

* Remove checkLimits production method and clean up stale test mocks

* Use getConfig() and add promo permission

* Use container logger directly, remove helpers

* Use defaults for optional Twig settings

* Import macro_functions into admin template

* Compensate promo redemptions on checkout failure

* 🐛 Fix product category and add-on availability handling
This commit is contained in:
Adam Daley authored and GitHub committed 2026-06-18 17:56:14 +01:00
1 parent 0d6c34137c
commit febec281a6
85 files changed
+10319 -6431

No files matched your search

+31
View File
@@ -857,6 +857,37 @@ CREATE TABLE `promo` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `promo_redemption`
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `promo_redemption` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`promo_id` bigint(20) DEFAULT NULL,
`client_id` bigint(20) DEFAULT NULL,
`client_order_id` bigint(20) DEFAULT NULL,
`invoice_id` bigint(20) DEFAULT NULL,
`phase` varchar(30) NOT NULL DEFAULT 'checkout',
`status` varchar(30) NOT NULL DEFAULT 'reserved',
`discount_amount` decimal(18,2) DEFAULT NULL,
`currency` varchar(20) DEFAULT NULL,
`committed_at` datetime DEFAULT NULL,
`released_at` datetime DEFAULT NULL,
`release_reason` varchar(100) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `promo_id_idx` (`promo_id`),
KEY `client_id_idx` (`client_id`),
KEY `client_order_id_idx` (`client_order_id`),
KEY `invoice_id_idx` (`invoice_id`),
KEY `phase_idx` (`phase`),
KEY `status_idx` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `service_custom`
--