0 Пользователей и 1 Гость просматривают эту тему.
  • 14 Ответов
  • 942 Просмотров
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Вывод меню
« : 30.03.2016, 17:09:48 »
Столкнулся с такой проблемой здесь есть справа меню, но стоит зайти в карточку товара оно убирается, я так понял что есть условие в файле php - вот
Код
<?php

// no direct access
$option = JRequest::getVar('option', null);
$view = JRequest::getVar('view', null);
$task = JRequest::getVar('task', null);
$layout = JRequest::getVar('layout', null);
$controller = JRequest::getVar('controller', null);
//var_dump($controller);

defined( '_JEXEC' ) or die( 'Restricted access' );
if ($position['group'] == '') { // Position none group
echo $yt->renPositionsContentNoGroup($position);

} elseif ( ($position['group'] != 'left') && ($position['group'] != 'main') && ($position['group'] != 'right') ) { // Position has group's user created
if (!isset($countGSpe)) {
$countGSpe = 0;
}
$countGSpe ++;

if($countGSpe == 1) {
echo '<div id="' . $position['group'] . ' "  ' . ($style != '' ? 'style="'.$style.'"' : '').'>';
echo $yt->renPositionsGroup($position);  
$width = $height = $style = "";
if($tagBD['count-'.$position['group']] == 1) {
$countGSpe = null;
echo '</div>';
}
} elseif ( $countGSpe == $tagBD['count-'.$position['group']] && $tagBD['count-'.$position['group']] > 1 ) {
echo $yt->renPositionsGroup($position);  
$countGSpe = null;
echo '</div>';
} else {
echo $yt->renPositionsGroup($position);  

}
} elseif ( ($position['group'] == 'left')
  ||($position['group'] == 'main')
  ||($position['group'] == 'right') ) { // Position has group's framework fixed - left, main, right
 
if($position['group'] == 'left') {
$countL ++;

if($countL == 1) {

$more_attr = '';
$more_attr .= (isset($yt_render->arr_GI['left']['data-wide']))?' data-wide="'.$yt_render->arr_GI['left']['data-wide'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['left']['data-normal']))?' data-normal="'.$yt_render->arr_GI['left']['data-normal'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['left']['data-tablet']))?' data-tablet="'.$yt_render->arr_GI['left']['data-tablet'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['left']['data-stablet']))?' data-stablet="'.$yt_render->arr_GI['left']['data-stablet'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['left']['data-mobile']))?' data-mobile="'.$yt_render->arr_GI['left']['data-mobile'].'"':'';    

if( ($this->countModules('left') ) && !($option=='com_jshopping'  && $controller=='product') )   {  
echo '<aside id="content_left" class="'.$yt_render->arr_GI['left']['class'].'"'.$more_attr.'>';
echo $yt->renPositionsGroup($position, 'block-content');
if($tagBD['count-group-left'] == 1) {
echo '</aside>';
}
}

} elseif ($tagBD['count-group-left'] == $countL && $tagBD['count-group-left'] > 1) {
echo $yt->renPositionsGroup($position, 'block-content');
echo '</div></div>';
} else {
echo $yt->renPositionsGroup($position, 'block-content');
}
} elseif ($position['group'] == 'main') {
$countM++;
if ($countM == 1) {
$more_attr = '';
$more_attr .= (isset($yt_render->arr_GI['main']['data-wide']))?' data-wide="'.$yt_render->arr_GI['main']['data-wide'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['main']['data-normal']))?' data-normal="'.$yt_render->arr_GI['main']['data-normal'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['main']['data-tablet']))?' data-tablet="'.$yt_render->arr_GI['main']['data-tablet'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['main']['data-stablet']))?' data-stablet="'.$yt_render->arr_GI['main']['data-stablet'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['main']['data-mobile']))?' data-mobile="'.$yt_render->arr_GI['main']['data-mobile'].'"':'';      
if(  !($option=='com_jshopping'  && $controller=='product') )   {  
echo '<div id="content_main" class="'.$yt_render->arr_GI['main']['class'].'"'.$more_attr.'>' ;
echo $yt->renPositionsGroup($position, 'main');
if($tagBD['count-group-main'] == 1 ) {
echo ' </div>';
echo '</div>';
}
}else{
echo '<div id="content_main" class="col-sm-12">' ;
echo $yt->renPositionsGroup($position, 'main');
if($tagBD['count-group-main'] == 1 ) {
echo ' </div>';
echo '</div>';
}
}
} elseif ( ($tagBD['count-group-main'] == $countM) && ($tagBD['count-group-main'] > 1) ){
echo $yt->renPositionsGroup($position, 'main');
echo '</div>';
} else {
echo $yt->renPositionsGroup($position, 'main');
}
} elseif ($position['group'] == 'right') {
$countR ++;
if($countR == 1) {      
$more_attr = '';
$more_attr .= (isset($yt_render->arr_GI['right']['data-wide']))?' data-wide="'.$yt_render->arr_GI['right']['data-wide'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['right']['data-normal']))?' data-normal="'.$yt_render->arr_GI['right']['data-normal'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['right']['data-tablet']))?' data-tablet="'.$yt_render->arr_GI['right']['data-tablet'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['right']['data-stablet']))?' data-stablet="'.$yt_render->arr_GI['right']['data-stablet'].'"':'';
$more_attr .= (isset($yt_render->arr_GI['right']['data-mobile']))?' data-mobile="'.$yt_render->arr_GI['right']['data-mobile'].'"':'';      

if( !($option=='com_jshopping'  && $controller=='product') )   {  
echo '<aside id="content_right" class="'.$yt_render->arr_GI['right']['class'].'"'.$more_attr.'>';
echo $yt->renPositionsGroup($position, 'block-content');
if($tagBD['count-group-right'] == 1) {
echo '</aside>';
}
}
} elseif ($countR == $tagBD['count-group-right'] && $tagBD['count-group-right'] > 1) {
echo $yt->renPositionsGroup($position, 'block-content');
echo '</div></div>';
} else {
echo $yt->renPositionsGroup($position, 'block-content');
}
}
}
?>

помогите если кто знает как это условие исправить чтобы меню появилось
*

Shustry

  • Moderator
  • 6434
  • 745 / 3
Re: Вывод меню
« Ответ #1 : 30.03.2016, 17:17:58 »
Попробуйте заменить в 53й строке

Код: php
if( ($this->countModules('left') ) && !($option=='com_jshopping'  && $controller=='product') )   { 

на

Код: php
if( $option=='com_jshopping'  && $controller=='product')   { 

Вообще, решается установкой AdvancedModulesManager. Там есть опция наследования отображения модуля от пункта меню.
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #2 : 30.03.2016, 17:22:27 »
Огромное спасибо, помогло :D
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #3 : 30.03.2016, 17:26:20 »
ААА, зато оно пропало здесь теперь http://promimpexpro.ru/katalog.html
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #4 : 30.03.2016, 17:32:09 »
пока верну все обратно, потому что меню слева вообще убирается со всего сайта
*

Shustry

  • Moderator
  • 6434
  • 745 / 3
Re: Вывод меню
« Ответ #5 : 30.03.2016, 17:37:36 »
Попробуйте AdvancedModulesManager.
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #6 : 30.03.2016, 17:40:27 »
Пробую ^-^
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #7 : 30.03.2016, 17:55:50 »
Установил модуль Advanced Module Manager, только ничего не изменилось в админке, как показано на роликах и инструкциях написано, в чем косяк?
*

Shustry

  • Moderator
  • 6434
  • 745 / 3
Re: Вывод меню
« Ответ #8 : 30.03.2016, 17:57:11 »
Заходите в опции модуля (в менеджере модулей) и там будет дополнительная вкладка вывода по-условиям.
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #9 : 31.03.2016, 10:07:54 »
Там есть опция наследования отображения модуля от пункта меню.
Что-то не нашел такой опции
*

Grigory S.

  • Давно я тут
  • 658
  • 70 / 0
  • (с)
Re: Вывод меню
« Ответ #10 : 31.03.2016, 10:23:40 »
Что-то не нашел такой опции

Не задав правильный вопрос, невозможно получить правильный ответ.
Для "спасибок" существует кнопочка "+".
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #11 : 31.03.2016, 10:25:26 »
Каталог построен на JoomShopping, я так понял поддержки нет у него
*

Shustry

  • Moderator
  • 6434
  • 745 / 3
Re: Вывод меню
« Ответ #12 : 31.03.2016, 11:29:04 »
1. Раскоментируйте строчку

Код: php
//var_dump($controller);

Так

Код: php
var_dump($controller);

получите название контроллера на странице каталога. Я с джумшопингом не работаю, как называется хз. Допустим это будет catalog

2. Допишите условие

Код: php
if( $option=='com_jshopping'  && $controller=='product')   {
так

Код: php
if( ($option=='com_jshopping'  && $controller=='product') || ($option=='com_jshopping'  && $controller=='catalog') )  {
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #13 : 31.03.2016, 11:55:45 »
Вывел

string(7) "product" string(7) "product"
string(7) "product" string(7) "product"
*

alex2aa

  • Осваиваюсь на форуме
  • 34
  • 0 / 0
Re: Вывод меню
« Ответ #14 : 31.03.2016, 12:00:29 »
Разобрался. вот так нужно было    
if( ($this->countModules('left') ) && !($option=='com_jshopping'  && $controller=='product' && $controller=='products') )
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Пункт меню Текстовый разделитель ведет на главную страницу

Автор zahar_92

Ответов: 8
Просмотров: 2455
Последний ответ 27.07.2023, 13:37:17
от ei-dos
[РЕШЕНО]Скрыть пункт меню на мобильных устройствах

Автор lexxbry

Ответов: 16
Просмотров: 4690
Последний ответ 23.05.2023, 07:22:49
от geral
Цвет фона меню

Автор IhorPH

Ответов: 7
Просмотров: 1127
Последний ответ 21.03.2023, 11:47:29
от marksetter
OffCanvas меню Helix Ultimate добавить текст к иконке

Автор Andre100

Ответов: 2
Просмотров: 2149
Последний ответ 20.03.2023, 12:42:49
от Andre100
OffCanvas меню

Автор Алексей Лоскутов

Ответов: 5
Просмотров: 2217
Последний ответ 13.02.2023, 20:20:37
от dashkov