feat: Add CronJob functionality and integrate with existing services

- Implemented CronJobProcessor for managing scheduled jobs and processing job queues.
- Created CronJobRepository for database interactions related to cron jobs.
- Defined CronJobType for job types, statuses, and backoff calculations.
- Added ApiloLogger for logging actions related to API interactions.
- Enhanced UpdateController to check for updates and display update logs.
- Updated FormAction to include a preview action for forms.
- Modified ApiRouter to handle new dependencies for OrderAdminService and ProductsApiController.
- Extended DictionariesApiController to manage attributes and producers.
- Enhanced ProductsApiController with variant management and image upload functionality.
- Updated ShopBasketController and ShopProductController to sort attributes and handle custom fields.
- Added configuration for cron jobs in config.php.
- Initialized apilo-sync-queue.json for managing sync tasks.
This commit is contained in:
2026-02-27 14:54:05 +01:00
parent 3ecbe628dc
commit 31fd0442b2
33 changed files with 2714 additions and 200 deletions

View File

@@ -94,8 +94,13 @@ class BasketCalculator
if ( isset( $val['parent_id'] ) and (int)$val['parent_id'] and isset( $val['product-id'] ) )
$permutation = $productRepo->getProductPermutationHash( (int)$val['product-id'] );
if ( !$permutation and isset( $val['attributes'] ) and is_array( $val['attributes'] ) and count( $val['attributes'] ) )
$permutation = implode( '|', $val['attributes'] );
if ( !$permutation and isset( $val['attributes'] ) and is_array( $val['attributes'] ) and count( $val['attributes'] ) ) {
$attrs = $val['attributes'];
usort( $attrs, function ( $a, $b ) {
return (int) explode( '-', $a )[0] - (int) explode( '-', $b )[0];
} );
$permutation = implode( '|', $attrs );
}
$quantity_options = $productRepo->getProductPermutationQuantityOptions(
$val['parent_id'] ? $val['parent_id'] : $val['product-id'],