ver. 0.291: ShopProducer frontend migration to Domain + Controllers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user