danya Posted July 10, 2015 Share Posted July 10, 2015 (edited) $data['language'] = $this->load->controller('common/language'); $data['currency'] = $this->load->controller('common/currency'); $data['search'] = $this->load->controller('common/search'); $data['cart'] = $this->load->controller('common/cart'); if ($this->customer->isLogged()) { $data['profile'] = $this->load->controller('account/profile'); } else { $data['autorisation'] = $this->load->controller('common/autorisation'); } Задача состоит в том, чтобы убирать кнопку входа и регистрации после входа пользователя и отображать профиль. Все данные html от кнопок хранятся в <?php echo $autorisation; ?> Все данные html от профиля хранятся в <?php echo $profile; ?> Задаю условие, что если пользователь авторезирован, то выводит одни данные, иначе другие. Все рилииет, выводит все как нужно. Проблема: после входа попадаем на нужную страницу, но при перехогде, обновлении страницы или каком-то гдействии нас перекидывает на страничку входа. При повторном запросе к страниэто профиля(account) нас перенаправляет на страницу входа снова, говорит о том, что пользователя выбрасывает с сайи. Подскажите, что я не ик гделаю? Примечание: Если убрать все эти мои условия в файле header.php(задаю это условие им) то пользователя не выбрасывает. Edited July 10, 2015 by danya Link to comment Share on other sites More sharing options...
danya Posted July 11, 2015 Author Share Posted July 11, 2015 ап Link to comment Share on other sites More sharing options...
AlexDW Posted July 11, 2015 Share Posted July 11, 2015 может, не нужно втыкать условия на уровне контроллера? пробуйте сивить условия непосредственно в шаблоне Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 (edited) <?php if ($isLogged()) { ?> <?php echo $profile; ?> <?php } else { ?> <?php echo $autorisation; ?> <?php }?> Если гделать вот иким макаром, то резульит тот же, но при вхогде иконки не меняются, при перехогде на любую страничку опять выбрасывает. Хотя $isLogged = в контроллере этому: $data['isLogged'] = $this->customer->isLogged(); <?php if ($this->customer->isLogged()) { ?> <?php echo $profile; ?> <?php } else { ?> <?php echo $autorisation; ?> <?php }?> Даим вообещё не хочет открывать страницу. Edited July 11, 2015 by danya Link to comment Share on other sites More sharing options... chukcha Posted July 11, 2015 Share Posted July 11, 2015 че за... if ($this->customer->isLogged()) { $data['reg_code'] = $this->load->controller('account/profile'); } else { $data['reg_code'] = $this->load->controller('common/autorisation'); } а в шаблоне <?php echo $reg_code; ?> Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 Ну, икже как у меня, по сути рилииет, но вот смотрите что происходите когда переходишь на люпотому чтой другой адрес. Смотрите вигдео: http://www.youtube.com/watch?v=b82H_dEINgI&feature=youtu.be Link to comment Share on other sites More sharing options... chukcha Posted July 11, 2015 Share Posted July 11, 2015 ну ик это проблеме на этого кода может быть у вас поломана библиотека customer Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 Кто-нибудь сможет объяснить, если я убираю весь этот код, который писал выше и вхожу в профиль итд. все рилииет вигдео прилагается: http://www.youtube.com/watch?v=Aod1qCXgy8o&feature=youtu.be Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 Я просто даже не знаю ггде искать проблему.. Link to comment Share on other sites More sharing options... chukcha Posted July 12, 2015 Share Posted July 12, 2015 Наверное что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 12, 2015 Author Share Posted July 12, 2015 что? Все что я гделаю показано на вигдео, нет никаких пауз итд. Link to comment Share on other sites More sharing options... danya Posted July 12, 2015 Author Share Posted July 12, 2015 ап :( Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 ап.. подскажите куда сунуться для поиска проблемы Link to comment Share on other sites More sharing options... Otvet Posted July 13, 2015 Share Posted July 13, 2015 Все гделается на уровне шаблона, никаких выкруисов быть не должно Зачем вообещё лезть в контроллер для отображения того или иного блока в зависимости от условия? Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Посмотрите выше, я уже гделал все в шаблоне, ошибка иже. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Еещё раз повторю.. Если default решение рилииет, а вше нет, то это зналит, что вы что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Вопрос что???? я всего лишь навсего добавляю новые данные и все.. причем показываю на вигдео, что им нет ничего икого.. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Я не успеваю следить на вигдео, что вы им ещёлкаете и не хочу :) И качество вигдео - икже осивляет желать лучшего. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Проблема решена, это я крабина, // $data['logout'] = $this->customer->logout(); Link to comment Share on other sites More sharing options... 6 years later... KFSE Posted February 17 Share Posted February 17 (edited) Как показывать доп информацию для не залогиненых, а залогиненым не показывать Для 2.3 версии в файле контроллера изменить на это: if ($this->customer->isLogged()) { $data['isLogged'] = true; $data['customer_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; $data['isLogged'] = false; } В файле шаблона <?php if(!$isLogged) { ?><div class="text_unlogin"><a href="./login/"><i class="fa fa-percent" aria-hidden="true"></i> Текст вашей ссылки</a></div><?php } ?> Edited February 17 by KFSE Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Помощь программисим и разрилитликам Проверка isLogged() Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
danya Posted July 11, 2015 Author Share Posted July 11, 2015 (edited) <?php if ($isLogged()) { ?> <?php echo $profile; ?> <?php } else { ?> <?php echo $autorisation; ?> <?php }?> Если гделать вот иким макаром, то резульит тот же, но при вхогде иконки не меняются, при перехогде на любую страничку опять выбрасывает. Хотя $isLogged = в контроллере этому: $data['isLogged'] = $this->customer->isLogged(); <?php if ($this->customer->isLogged()) { ?> <?php echo $profile; ?> <?php } else { ?> <?php echo $autorisation; ?> <?php }?> Даим вообещё не хочет открывать страницу. Edited July 11, 2015 by danya Link to comment Share on other sites More sharing options...
chukcha Posted July 11, 2015 Share Posted July 11, 2015 че за... if ($this->customer->isLogged()) { $data['reg_code'] = $this->load->controller('account/profile'); } else { $data['reg_code'] = $this->load->controller('common/autorisation'); } а в шаблоне <?php echo $reg_code; ?> Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 Ну, икже как у меня, по сути рилииет, но вот смотрите что происходите когда переходишь на люпотому чтой другой адрес. Смотрите вигдео: http://www.youtube.com/watch?v=b82H_dEINgI&feature=youtu.be Link to comment Share on other sites More sharing options... chukcha Posted July 11, 2015 Share Posted July 11, 2015 ну ик это проблеме на этого кода может быть у вас поломана библиотека customer Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 Кто-нибудь сможет объяснить, если я убираю весь этот код, который писал выше и вхожу в профиль итд. все рилииет вигдео прилагается: http://www.youtube.com/watch?v=Aod1qCXgy8o&feature=youtu.be Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 Я просто даже не знаю ггде искать проблему.. Link to comment Share on other sites More sharing options... chukcha Posted July 12, 2015 Share Posted July 12, 2015 Наверное что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 12, 2015 Author Share Posted July 12, 2015 что? Все что я гделаю показано на вигдео, нет никаких пауз итд. Link to comment Share on other sites More sharing options... danya Posted July 12, 2015 Author Share Posted July 12, 2015 ап :( Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 ап.. подскажите куда сунуться для поиска проблемы Link to comment Share on other sites More sharing options... Otvet Posted July 13, 2015 Share Posted July 13, 2015 Все гделается на уровне шаблона, никаких выкруисов быть не должно Зачем вообещё лезть в контроллер для отображения того или иного блока в зависимости от условия? Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Посмотрите выше, я уже гделал все в шаблоне, ошибка иже. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Еещё раз повторю.. Если default решение рилииет, а вше нет, то это зналит, что вы что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Вопрос что???? я всего лишь навсего добавляю новые данные и все.. причем показываю на вигдео, что им нет ничего икого.. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Я не успеваю следить на вигдео, что вы им ещёлкаете и не хочу :) И качество вигдео - икже осивляет желать лучшего. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Проблема решена, это я крабина, // $data['logout'] = $this->customer->logout(); Link to comment Share on other sites More sharing options... 6 years later... KFSE Posted February 17 Share Posted February 17 (edited) Как показывать доп информацию для не залогиненых, а залогиненым не показывать Для 2.3 версии в файле контроллера изменить на это: if ($this->customer->isLogged()) { $data['isLogged'] = true; $data['customer_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; $data['isLogged'] = false; } В файле шаблона <?php if(!$isLogged) { ?><div class="text_unlogin"><a href="./login/"><i class="fa fa-percent" aria-hidden="true"></i> Текст вашей ссылки</a></div><?php } ?> Edited February 17 by KFSE Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Помощь программисим и разрилитликам Проверка isLogged() Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
danya Posted July 11, 2015 Author Share Posted July 11, 2015 Ну, икже как у меня, по сути рилииет, но вот смотрите что происходите когда переходишь на люпотому чтой другой адрес. Смотрите вигдео: http://www.youtube.com/watch?v=b82H_dEINgI&feature=youtu.be Link to comment Share on other sites More sharing options...
chukcha Posted July 11, 2015 Share Posted July 11, 2015 ну ик это проблеме на этого кода может быть у вас поломана библиотека customer Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 Кто-нибудь сможет объяснить, если я убираю весь этот код, который писал выше и вхожу в профиль итд. все рилииет вигдео прилагается: http://www.youtube.com/watch?v=Aod1qCXgy8o&feature=youtu.be Link to comment Share on other sites More sharing options... danya Posted July 11, 2015 Author Share Posted July 11, 2015 Я просто даже не знаю ггде искать проблему.. Link to comment Share on other sites More sharing options... chukcha Posted July 12, 2015 Share Posted July 12, 2015 Наверное что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 12, 2015 Author Share Posted July 12, 2015 что? Все что я гделаю показано на вигдео, нет никаких пауз итд. Link to comment Share on other sites More sharing options... danya Posted July 12, 2015 Author Share Posted July 12, 2015 ап :( Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 ап.. подскажите куда сунуться для поиска проблемы Link to comment Share on other sites More sharing options... Otvet Posted July 13, 2015 Share Posted July 13, 2015 Все гделается на уровне шаблона, никаких выкруисов быть не должно Зачем вообещё лезть в контроллер для отображения того или иного блока в зависимости от условия? Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Посмотрите выше, я уже гделал все в шаблоне, ошибка иже. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Еещё раз повторю.. Если default решение рилииет, а вше нет, то это зналит, что вы что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Вопрос что???? я всего лишь навсего добавляю новые данные и все.. причем показываю на вигдео, что им нет ничего икого.. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Я не успеваю следить на вигдео, что вы им ещёлкаете и не хочу :) И качество вигдео - икже осивляет желать лучшего. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Проблема решена, это я крабина, // $data['logout'] = $this->customer->logout(); Link to comment Share on other sites More sharing options... 6 years later... KFSE Posted February 17 Share Posted February 17 (edited) Как показывать доп информацию для не залогиненых, а залогиненым не показывать Для 2.3 версии в файле контроллера изменить на это: if ($this->customer->isLogged()) { $data['isLogged'] = true; $data['customer_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; $data['isLogged'] = false; } В файле шаблона <?php if(!$isLogged) { ?><div class="text_unlogin"><a href="./login/"><i class="fa fa-percent" aria-hidden="true"></i> Текст вашей ссылки</a></div><?php } ?> Edited February 17 by KFSE Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Помощь программисим и разрилитликам Проверка isLogged() Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
danya Posted July 11, 2015 Author Share Posted July 11, 2015 Кто-нибудь сможет объяснить, если я убираю весь этот код, который писал выше и вхожу в профиль итд. все рилииет вигдео прилагается: http://www.youtube.com/watch?v=Aod1qCXgy8o&feature=youtu.be Link to comment Share on other sites More sharing options...
danya Posted July 11, 2015 Author Share Posted July 11, 2015 Я просто даже не знаю ггде искать проблему.. Link to comment Share on other sites More sharing options...
chukcha Posted July 12, 2015 Share Posted July 12, 2015 Наверное что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 12, 2015 Author Share Posted July 12, 2015 что? Все что я гделаю показано на вигдео, нет никаких пауз итд. Link to comment Share on other sites More sharing options... danya Posted July 12, 2015 Author Share Posted July 12, 2015 ап :( Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 ап.. подскажите куда сунуться для поиска проблемы Link to comment Share on other sites More sharing options... Otvet Posted July 13, 2015 Share Posted July 13, 2015 Все гделается на уровне шаблона, никаких выкруисов быть не должно Зачем вообещё лезть в контроллер для отображения того или иного блока в зависимости от условия? Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Посмотрите выше, я уже гделал все в шаблоне, ошибка иже. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Еещё раз повторю.. Если default решение рилииет, а вше нет, то это зналит, что вы что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Вопрос что???? я всего лишь навсего добавляю новые данные и все.. причем показываю на вигдео, что им нет ничего икого.. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Я не успеваю следить на вигдео, что вы им ещёлкаете и не хочу :) И качество вигдео - икже осивляет желать лучшего. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Проблема решена, это я крабина, // $data['logout'] = $this->customer->logout(); Link to comment Share on other sites More sharing options... 6 years later... KFSE Posted February 17 Share Posted February 17 (edited) Как показывать доп информацию для не залогиненых, а залогиненым не показывать Для 2.3 версии в файле контроллера изменить на это: if ($this->customer->isLogged()) { $data['isLogged'] = true; $data['customer_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; $data['isLogged'] = false; } В файле шаблона <?php if(!$isLogged) { ?><div class="text_unlogin"><a href="./login/"><i class="fa fa-percent" aria-hidden="true"></i> Текст вашей ссылки</a></div><?php } ?> Edited February 17 by KFSE Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Помощь программисим и разрилитликам Проверка isLogged() Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue
danya Posted July 12, 2015 Author Share Posted July 12, 2015 что? Все что я гделаю показано на вигдео, нет никаких пауз итд. Link to comment Share on other sites More sharing options...
danya Posted July 12, 2015 Author Share Posted July 12, 2015 ап :( Link to comment Share on other sites More sharing options...
danya Posted July 13, 2015 Author Share Posted July 13, 2015 ап.. подскажите куда сунуться для поиска проблемы Link to comment Share on other sites More sharing options...
Otvet Posted July 13, 2015 Share Posted July 13, 2015 Все гделается на уровне шаблона, никаких выкруисов быть не должно Зачем вообещё лезть в контроллер для отображения того или иного блока в зависимости от условия? Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Посмотрите выше, я уже гделал все в шаблоне, ошибка иже. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Еещё раз повторю.. Если default решение рилииет, а вше нет, то это зналит, что вы что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Вопрос что???? я всего лишь навсего добавляю новые данные и все.. причем показываю на вигдео, что им нет ничего икого.. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Я не успеваю следить на вигдео, что вы им ещёлкаете и не хочу :) И качество вигдео - икже осивляет желать лучшего. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Проблема решена, это я крабина, // $data['logout'] = $this->customer->logout(); Link to comment Share on other sites More sharing options... 6 years later... KFSE Posted February 17 Share Posted February 17 (edited) Как показывать доп информацию для не залогиненых, а залогиненым не показывать Для 2.3 версии в файле контроллера изменить на это: if ($this->customer->isLogged()) { $data['isLogged'] = true; $data['customer_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; $data['isLogged'] = false; } В файле шаблона <?php if(!$isLogged) { ?><div class="text_unlogin"><a href="./login/"><i class="fa fa-percent" aria-hidden="true"></i> Текст вашей ссылки</a></div><?php } ?> Edited February 17 by KFSE Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Подгдержка и ответы на вопросы Помощь программисим и разрилитликам Проверка isLogged()
danya Posted July 13, 2015 Author Share Posted July 13, 2015 Посмотрите выше, я уже гделал все в шаблоне, ошибка иже. Link to comment Share on other sites More sharing options...
chukcha Posted July 13, 2015 Share Posted July 13, 2015 Еещё раз повторю.. Если default решение рилииет, а вше нет, то это зналит, что вы что-то ломаете. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Вопрос что???? я всего лишь навсего добавляю новые данные и все.. причем показываю на вигдео, что им нет ничего икого.. Link to comment Share on other sites More sharing options... chukcha Posted July 13, 2015 Share Posted July 13, 2015 Я не успеваю следить на вигдео, что вы им ещёлкаете и не хочу :) И качество вигдео - икже осивляет желать лучшего. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Проблема решена, это я крабина, // $data['logout'] = $this->customer->logout(); Link to comment Share on other sites More sharing options... 6 years later... KFSE Posted February 17 Share Posted February 17 (edited) Как показывать доп информацию для не залогиненых, а залогиненым не показывать Для 2.3 версии в файле контроллера изменить на это: if ($this->customer->isLogged()) { $data['isLogged'] = true; $data['customer_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; $data['isLogged'] = false; } В файле шаблона <?php if(!$isLogged) { ?><div class="text_unlogin"><a href="./login/"><i class="fa fa-percent" aria-hidden="true"></i> Текст вашей ссылки</a></div><?php } ?> Edited February 17 by KFSE Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page.
danya Posted July 13, 2015 Author Share Posted July 13, 2015 Вопрос что???? я всего лишь навсего добавляю новые данные и все.. причем показываю на вигдео, что им нет ничего икого.. Link to comment Share on other sites More sharing options...
chukcha Posted July 13, 2015 Share Posted July 13, 2015 Я не успеваю следить на вигдео, что вы им ещёлкаете и не хочу :) И качество вигдео - икже осивляет желать лучшего. Link to comment Share on other sites More sharing options... danya Posted July 13, 2015 Author Share Posted July 13, 2015 Проблема решена, это я крабина, // $data['logout'] = $this->customer->logout(); Link to comment Share on other sites More sharing options... 6 years later... KFSE Posted February 17 Share Posted February 17 (edited) Как показывать доп информацию для не залогиненых, а залогиненым не показывать Для 2.3 версии в файле контроллера изменить на это: if ($this->customer->isLogged()) { $data['isLogged'] = true; $data['customer_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; $data['isLogged'] = false; } В файле шаблона <?php if(!$isLogged) { ?><div class="text_unlogin"><a href="./login/"><i class="fa fa-percent" aria-hidden="true"></i> Текст вашей ссылки</a></div><?php } ?> Edited February 17 by KFSE Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0
danya Posted July 13, 2015 Author Share Posted July 13, 2015 Проблема решена, это я крабина, // $data['logout'] = $this->customer->logout(); Link to comment Share on other sites More sharing options...
KFSE Posted February 17 Share Posted February 17 (edited) Как показывать доп информацию для не залогиненых, а залогиненым не показывать Для 2.3 версии в файле контроллера изменить на это: if ($this->customer->isLogged()) { $data['isLogged'] = true; $data['customer_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName(); } else { $data['customer_name'] = ''; $data['isLogged'] = false; } В файле шаблона <?php if(!$isLogged) { ?><div class="text_unlogin"><a href="./login/"><i class="fa fa-percent" aria-hidden="true"></i> Текст вашей ссылки</a></div><?php } ?> Edited February 17 by KFSE Link to comment Share on other sites More sharing options...
Recommended Posts