- Migrate class.S → Shared\Helpers\Helpers (140+ files), remove 12 unused methods - Migrate class.Html → Shared\Html\Html - Migrate class.Email → Shared\Email\Email - Migrate class.Image → Shared\Image\ImageManipulator - Delete class.Log (unused), class.Mobile_Detect (outdated UA detection) - Remove grid library loading from admin (index.php, ajax.php) - Replace gridEdit usage in 10 admin templates with grid-edit-replacement.php - Fix grid-edit-replacement.php AJAX to send values as JSON (grid.js compat) - Remove mobile layout conditionals (m_html/m_css/m_js) from Site + LayoutsRepository - Remove \Log::save_log() calls from OrderAdminService, ShopOrder, Order Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
2.1 KiB
PHP
44 lines
2.1 KiB
PHP
<?
|
|
$pm_found = false;
|
|
|
|
if ( is_array( $this -> payment_methods ) ): foreach ( $this -> payment_methods as $payment_method ):
|
|
if ( $payment_method['id'] == \Shared\Helpers\Helpers::get_session( 'basket-payment-method-id' ) )
|
|
$pm_found = true;
|
|
endforeach; endif;
|
|
|
|
$basket = \Shared\Helpers\Helpers::get_session( 'basket' );
|
|
$coupon = \Shared\Helpers\Helpers::get_session( 'coupon' );
|
|
$transport_cost = \front\factory\ShopTransport::transport_cost( \Shared\Helpers\Helpers::get_session( 'basket-transport-method-id' ) );
|
|
|
|
$basket_summary = \front\factory\ShopBasket::summary_price( $basket, $coupon ) + $transport_cost;
|
|
?>
|
|
<? if ( is_array( $this -> payment_methods ) ): foreach ( $this -> payment_methods as $payment_method ):?>
|
|
<? if ( $payment_method['id'] != 6 or $payment_method['id'] == 6 and $basket_summary >= 40 and $basket_summary <= 1000 ):?>
|
|
<div class="options">
|
|
<div class="check">
|
|
<input type="radio" class="icheck" name="payment_method" value="<?= $payment_method['id'];?>"
|
|
<?
|
|
if (
|
|
$payment_method['id'] == \Shared\Helpers\Helpers::get_session( 'basket-payment-method-id' )
|
|
or
|
|
count( $this -> payment_methods ) === 1
|
|
or
|
|
!\Shared\Helpers\Helpers::get_session( 'basket-payment-method-id' ) and $payment_method == end( $this -> payment_methods )
|
|
or
|
|
\Shared\Helpers\Helpers::get_session( 'basket-payment-method-id' ) and !$pm_found and $payment_method == end( $this -> payment_methods )
|
|
):
|
|
|
|
\Shared\Helpers\Helpers::set_session( 'basket-payment-method-id', $payment_method['id'] );
|
|
|
|
echo 'checked="checked"';
|
|
endif;
|
|
?>
|
|
>
|
|
</div>
|
|
<div class="description">
|
|
<div><?= $payment_method['name'];?> <? if ( $payment_method['id'] == 6 ):?><img src="/layout/images/paypo-logo.svg"><? endif;?></div>
|
|
<div class="small"><?= $payment_method['description'];?></div>
|
|
</div>
|
|
</div>
|
|
<? endif;?>
|
|
<? endforeach; endif;?>
|