ver. 0.292: ShopProduct + ShopPaymentMethod + ShopPromotion + ShopStatuses + ShopTransport frontend migration to Domain
Full migration of front\factory\ — entire directory removed (all 20 classes migrated). ProductRepository +20 frontend methods, PromotionRepository +5 applyType methods, TransportRepository +4 cached methods, PaymentMethodRepository +cached frontend methods. Fix: broken transports_list() in ajax.php replaced with forPaymentMethod(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -132,7 +132,7 @@ class OrderAdminService
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
|
||||
'id' => (int)$order['apilo_order_id'],
|
||||
'status' => (int)\front\factory\ShopStatuses::get_apilo_status_id($newStatus),
|
||||
'status' => (int)( new \Domain\ShopStatus\ShopStatusRepository($this->db) )->getApiloStatusId( (int)$newStatus ),
|
||||
]));
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||
'Authorization: Bearer ' . $accessToken,
|
||||
|
||||
@@ -558,8 +558,8 @@ class OrderRepository
|
||||
return false;
|
||||
}
|
||||
|
||||
$transport = \front\factory\ShopTransport::transport($transport_id);
|
||||
$payment_method = \front\factory\ShopPaymentMethod::payment_method($payment_id);
|
||||
$transport = ( new \Domain\Transport\TransportRepository( $this->db ) )->findActiveByIdCached( $transport_id );
|
||||
$payment_method = ( new \Domain\PaymentMethod\PaymentMethodRepository( $this->db ) )->findActiveById( (int)$payment_id );
|
||||
$basket_summary = \Domain\Basket\BasketCalculator::summaryPrice($basket, $coupon);
|
||||
$order_number = $this->generateOrderNumber();
|
||||
$order_date = date('Y-m-d H:i:s');
|
||||
|
||||
Reference in New Issue
Block a user