ver. 0.291: ShopProducer frontend migration to Domain + Controllers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 20:32:07 +01:00
parent 1ba0c12327
commit 6181ef958d
19 changed files with 267 additions and 119 deletions

View File

@@ -28,6 +28,7 @@ class Site
$pagesRepo = new \Domain\Pages\PagesRepository( $GLOBALS['mdb'] );
$scontainersRepo = new \Domain\Scontainers\ScontainersRepository( $GLOBALS['mdb'] );
$categoryRepo = new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] );
$producerRepo = new \Domain\Producer\ProducerRepository( $GLOBALS['mdb'] );
if ( (int) \Shared\Helpers\Helpers::get( 'layout_id' ) )
$layout = $layoutsRepo->find( (int) \Shared\Helpers\Helpers::get( 'layout_id' ) );
@@ -216,9 +217,9 @@ class Site
//
if ( \Shared\Helpers\Helpers::get( 'producer_id' ) )
{
$producer = new \shop\Producer( \Shared\Helpers\Helpers::get( 'producer_id' ) );
$producer = $producerRepo->findForFrontend( (int)\Shared\Helpers\Helpers::get( 'producer_id' ), $lang_id );
if ( $producer['languages'][$lang_id]['meta_title'] )
if ( $producer && !empty( $producer['languages'][$lang_id]['meta_title'] ) )
$page['language']['meta_title'] = $producer['languages'][$lang_id]['meta_title'];
}