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:
2026-02-17 21:55:16 +01:00
parent 827b903e1e
commit 89d9e61bec
48 changed files with 1780 additions and 975 deletions

View File

@@ -1,4 +1,4 @@
<? global $config; $this -> settings['ssl'] ? $base = 'https' : $base = 'http';?>
<? global $config; $this -> settings['ssl'] ? $base = 'https' : $base = 'http'; $paymentRepo = new \Domain\PaymentMethod\PaymentMethodRepository( $GLOBALS['mdb'] );?>
<div class="order-summary">
<div class="box-title">
<?= ucfirst( \Shared\Helpers\Helpers::lang( 'szczegoly-zamowienia' ) );?>: <?= $this -> order['number'];?>
@@ -22,7 +22,7 @@
<? if ( $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ):?>
<div class="payment-info">Co prawda nie wybrałeś żadnej z dostępnych form "szybkich płatności", ale w każdej chwili możesz z nich skorzystać.</div>
<? endif;?>
<? if ( ( $this -> order['payment_method_id'] == 2 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 2 ) ):?>
<? if ( ( $this -> order['payment_method_id'] == 2 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and $paymentRepo->isActive( 2 ) ):?>
<form id="order" action="https://platnosc.hotpay.pl/" method="post">
<input required name="SEKRET" value="<?= $this -> settings['hotpay_api'];?>" type="hidden">
<input required name="KWOTA" value="<?= round( $this -> order['summary'], 2 );?>" type="hidden">
@@ -43,7 +43,7 @@
</div>
</form>
<? endif;?>
<? if ( $this -> order['payment_method_id'] == 6 and \front\factory\ShopPaymentMethod::is_payment_active( 6 ) ):?>
<? if ( $this -> order['payment_method_id'] == 6 and $paymentRepo->isActive( 6 ) ):?>
<?
global $mdb;
$przelewy24_hash = md5( time() );
@@ -75,7 +75,7 @@
<? if ( $this -> order['payment_method_id'] == 6 ):?>
<div class="box-title">lub skorzystaj z płatności online</div>
<? endif;?>
<? if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 4 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 4 ) ):?>
<? if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 4 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and $paymentRepo->isActive( 4 ) ):?>
<?
global $mdb;
$przelewy24_hash = md5( time() );
@@ -104,7 +104,7 @@
</form>
<? endif;?>
<?
if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 5 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and \front\factory\ShopPaymentMethod::is_payment_active( 5 ) ):
if ( ( $this -> order['payment_method_id'] == 6 or $this -> order['payment_method_id'] == 5 or $this -> order['payment_method_id'] == 1 or $this -> order['payment_method_id'] == 3 ) and $paymentRepo->isActive( 5 ) ):
$url = 'https://secure.tpay.com';