ver. 0.289: ShopCategory + ShopClient frontend migration to Domain + Views + Controllers
ShopCategory: 9 frontend methods in CategoryRepository, front\Views\ShopCategory (3 methods), deleted factory + view, updated 6 callers, +17 tests. ShopClient: 13 frontend methods in ClientRepository, front\Views\ShopClient (8 methods), front\Controllers\ShopClientController (15 methods + buildEmailBody helper), deleted factory + view + controls, updated 7 callers, +36 tests. Security fix: removed hardcoded password bypass 'Legia1916'. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ if ( is_array( $this -> pages ) ) {
|
||||
if ( $page['page_type'] == 3 ) {
|
||||
$page['language']['link'] ? $url = $page['language']['link'] : $url = '#';
|
||||
} else if ( $page['page_type'] == 5 ) {
|
||||
$page['category_id'] ? $url = \front\factory\ShopCategory::category_url( $page['category_id'] ) : $url = '#';
|
||||
$page['category_id'] ? $url = ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->categoryUrl( (int)$page['category_id'], $GLOBALS['lang_id'] ) : $url = '#';
|
||||
} else {
|
||||
$page['language']['seo_link'] ? $url = '/' . $page['language']['seo_link'] : $url = '/s-' . $page['id'] . '-' . \Shared\Helpers\Helpers::seo( $page['language']['title'] );
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<? if ( !$this -> client ):?>
|
||||
<div class="left">
|
||||
<?=
|
||||
\front\view\ShopClient::login_form( [
|
||||
\front\Views\ShopClient::loginForm( [
|
||||
'long' => true
|
||||
] );
|
||||
?>
|
||||
|
||||
@@ -28,7 +28,7 @@ if ( is_array( $this -> categories ) ):
|
||||
<? if ( is_array( $category['categories'] ) and $category['id'] != $this -> current_category and $this -> level != 0 ):?>
|
||||
<i class="fa fa-chevron-down toggle" category="<?= $category['id'];?>"></i>
|
||||
<? endif;?>
|
||||
<? if ( is_array( $category['categories'] ) ) echo \front\view\ShopCategory::categories( $category['categories'], $this -> current_category, $this -> level + 1 );?>
|
||||
<? if ( is_array( $category['categories'] ) ) echo \front\Views\ShopCategory::categories( $category['categories'], $this -> current_category, $this -> level + 1 );?>
|
||||
</li>
|
||||
<? endif;?>
|
||||
<? endforeach;?>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="client-panel address-edit box">
|
||||
<?= \front\view\ShopClient::client_menu( [
|
||||
<?= \front\Views\ShopClient::clientMenu( [
|
||||
'active_page' => 'addresses'
|
||||
] );?>
|
||||
<div class="box-title">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="client-panel client-addresses box">
|
||||
<?= \front\view\ShopClient::client_menu( [
|
||||
<?= \front\Views\ShopClient::clientMenu( [
|
||||
'active_page' => 'addresses'
|
||||
] );?>
|
||||
<div class="box-title">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<? global $lang;?>
|
||||
<div class="client-panel client-orders-history box">
|
||||
<?= \front\view\ShopClient::client_menu( [
|
||||
<?= \front\Views\ShopClient::clientMenu( [
|
||||
'active_page' => 'orders'
|
||||
] );?>
|
||||
<div class="box-title">
|
||||
|
||||
Reference in New Issue
Block a user