Add view classes for articles, banners, languages, menu, newsletter, containers, shop categories, clients, payment methods, products, and search

- Created Articles.php for rendering article views including full articles, miniature lists, and news sections.
- Added Banners.php for handling banner displays.
- Introduced Languages.php for rendering language options.
- Implemented Menu.php for dynamic menu rendering.
- Developed Newsletter.php for newsletter view rendering.
- Created Scontainers.php for rendering specific containers.
- Added ShopCategory.php for category descriptions and product listings.
- Introduced ShopClient.php for managing client-related views such as address editing and order history.
- Implemented ShopPaymentMethod.php for displaying payment methods in the basket.
- Created ShopProduct.php for generating product URLs.
- Added ShopSearch.php for rendering a simple search form.
- Added .htaccess file to enhance security by restricting access to sensitive files and directories.
This commit is contained in:
2026-02-21 23:00:15 +01:00
parent b51244c1d6
commit 3ecbe628dc
435 changed files with 44107 additions and 31270 deletions

View File

@@ -2,15 +2,15 @@
$pm_found = false;
if ( is_array( $this -> payment_methods ) ): foreach ( $this -> payment_methods as $payment_method ):
if ( $payment_method['id'] == \S::get_session( 'basket-payment-method-id' ) )
if ( $payment_method['id'] == \Shared\Helpers\Helpers::get_session( 'basket-payment-method-id' ) )
$pm_found = true;
endforeach; endif;
$basket = \S::get_session( 'basket' );
$coupon = \S::get_session( 'coupon' );
$transport_cost = \front\factory\ShopTransport::transport_cost( \S::get_session( 'basket-transport-method-id' ) );
$basket = \Shared\Helpers\Helpers::get_session( 'basket' );
$coupon = \Shared\Helpers\Helpers::get_session( 'coupon' );
$transport_cost = ( new \Domain\Transport\TransportRepository( $GLOBALS['mdb'] ) )->transportCostCached( (int)\Shared\Helpers\Helpers::get_session( 'basket-transport-method-id' ) ) ?? 0.0;
$basket_summary = \front\factory\ShopBasket::summary_price( $basket, $coupon ) + $transport_cost;
$basket_summary = \Domain\Basket\BasketCalculator::summaryPrice( $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 ):?>
@@ -19,16 +19,16 @@
<input type="radio" class="icheck" name="payment_method" value="<?= $payment_method['id'];?>"
<?
if (
$payment_method['id'] == \S::get_session( 'basket-payment-method-id' )
$payment_method['id'] == \Shared\Helpers\Helpers::get_session( 'basket-payment-method-id' )
or
count( $this -> payment_methods ) === 1
or
!\S::get_session( 'basket-payment-method-id' ) and $payment_method == end( $this -> payment_methods )
!\Shared\Helpers\Helpers::get_session( 'basket-payment-method-id' ) and $payment_method == end( $this -> payment_methods )
or
\S::get_session( 'basket-payment-method-id' ) and !$pm_found and $payment_method == end( $this -> payment_methods )
\Shared\Helpers\Helpers::get_session( 'basket-payment-method-id' ) and !$pm_found and $payment_method == end( $this -> payment_methods )
):
\S::set_session( 'basket-payment-method-id', $payment_method['id'] );
\Shared\Helpers\Helpers::set_session( 'basket-payment-method-id', $payment_method['id'] );
echo 'checked="checked"';
endif;
@@ -41,4 +41,4 @@
</div>
</div>
<? endif;?>
<? endforeach; endif;?>
<? endforeach; endif;?>