ver. 0.294: Remove all 12 legacy autoload/shop/ classes (~2363 lines)
Complete Domain-Driven Architecture migration: - Phase 1-4: Transport, ProductSet, Coupon, Shop, Search, Basket, ProductCustomField, Category, ProductAttribute, Promotion - Phase 5: Order (~562 lines) + Product (~952 lines) - ~20 Product methods migrated to ProductRepository - Apilo sync migrated to OrderAdminService - Production hotfixes: stale Redis cache (prices 0.00), unqualified Product:: refs in LayoutEngine, object->array template conversion - AttributeRepository::getAttributeValueById() Redis cache added Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
12
cron.php
12
cron.php
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
use shop\Order;
|
||||
|
||||
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
|
||||
|
||||
function __autoload_my_classes( $classname )
|
||||
@@ -60,7 +58,9 @@ $apilo_settings = $integrationsRepository -> getSettings( 'apilo' );
|
||||
if ( (int)($apilo_settings['enabled'] ?? 0) === 1 ) {
|
||||
$integrationsRepository -> apiloKeepalive( 300 );
|
||||
$apilo_settings = $integrationsRepository -> getSettings( 'apilo' );
|
||||
Order::process_apilo_sync_queue( 10 );
|
||||
$orderRepo = new \Domain\Order\OrderRepository( $mdb );
|
||||
$orderAdminService = new \Domain\Order\OrderAdminService( $orderRepo );
|
||||
$orderAdminService->processApiloSyncQueue( 10 );
|
||||
}
|
||||
|
||||
function parsePaczkomatAddress($input)
|
||||
@@ -521,12 +521,10 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
|
||||
{
|
||||
$shop_status_id = ( new \Domain\ShopStatus\ShopStatusRepository( $mdb ) )->getByIntegrationStatusId( 'apilo', (int)$responseData['status'] );
|
||||
|
||||
$order_tmp = new Order( $order['id'] );
|
||||
|
||||
if ( $shop_status_id )
|
||||
$order_tmp -> update_status( $shop_status_id, false );
|
||||
$orderAdminService->changeStatus( (int)$order['id'], $shop_status_id, false );
|
||||
|
||||
$order_tmp -> update_aplio_order_status_date( date( 'Y-m-d H:i:s' ) );
|
||||
$orderRepo->updateApiloStatusDate( (int)$order['id'], date( 'Y-m-d H:i:s' ) );
|
||||
echo '<p>Zaktualizowałem status zamówienia <b>' . $order['number'] . '</b></p>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user