fix: duplikaty zamowien + status COD (is_cod flag)
- summaryView(): guard — redirect do istniejacego zamowienia gdy ORDER_SUBMIT_LAST_ORDER_ID w sesji - basketSave(): try-catch wokol createFromBasket(), wyjatki logowane, koszyk zachowany - OrderRepository: usunieto hardkodowane payment_id == 3, uzywana flaga is_cod - PaymentMethodRepository: nowe pole is_cod w normalizacji, save() i forTransport() SQL - ShopPaymentMethodController: switch "Platnosc przy odbiorze" w formularzu edycji - migrations/0.338.sql: ALTER TABLE pp_shop_payment_methods ADD COLUMN is_cod Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -814,7 +814,7 @@ class OrderRepository
|
||||
\Shared\Helpers\Helpers::send_email($settings['contact_email'], 'Nowe zamówienie / ' . $settings['firm_name'] . ' / ' . $order['number'] . ' - ' . $order['client_surname'] . ' ' . $order['client_name'], $mail_order);
|
||||
|
||||
// zmiana statusu w realizacji jeżeli płatność przy odbiorze
|
||||
if ($payment_id == 3) {
|
||||
if (!empty($payment_method['is_cod'])) {
|
||||
$this->updateOrderStatus($order_id, 4);
|
||||
$this->insertStatusHistory($order_id, 4, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user