Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Archik

Новичок
  
  • Posts

    3
  • Joined

  • Last visited

Archik's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. В заголовке к теме ошибся - перенос сайи не на поддомен, а, конечно же, в подпапку
  2. Здравствуйте. Был магазин по адресу https://site.ru/, сил по адресу https://site.ru/shop/ . Переместил все файлы движка из корня в папку /shop. Теперь когда я хочу отредактировать товар из админки (например, по адресу вида https://site.ru/shop/admin/index.php?route=catalog/product/edit&product_id=204) выдается следующая ошибка: Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unexpected character "$" in "catalog/product_form.twig" at line 390.' in /home/admin/web/site.ru/public_html/shop/system/library/template/Twig/Lexer.php:284 Stack trace: #0 /home/admin/web/site.ru/public_html/shop/system/library/template/Twig/Lexer.php(205): Twig_Lexer->lexExpression() #1 /home/admin/web/site.ru/public_html/shop/system/library/template/Twig/Lexer.php(111): Twig_Lexer->lexBlock() #2 /home/admin/web/site.ru/public_html/shop/system/library/template/Twig/Environment.php(581): Twig_Lexer->tokenize('{{ header }}{{ ...', 'catalog/product...') #3 /home/admin/web/site.ru/public_html/shop/system/library/template/Twig/Environment.php(671): Twig_Environment->tokenize('{{ header }}{{ ...', 'catalog/product...') #4 /home/admin/web/site.ru/public_html/shop/system/library/template/Twig/Environment.php(396): Twig_Environment->compileSource('{{ header }}{{ ...', 'catalog/product...') #5 /home/admin/web/site.ru in /home/admin/web/site.ru/public_html/shop/system/library/template/Twig/Lexer.php on line 284 Если я удалю символ "$", вылезут еещё и еещё другие ошибки - не понравятся и ";" и многое-многое другое. Повторюсь, сайт всего лишь переехал в подпапку, ничего ручками или из админки не редактировал (кроме нового адреса сайи в конфигах). Почему икое происходит и как попотому чтороть? p.s. прикрепляю файл \storage\modification\admin\view\template\catalog\product_form.twig Версия опенкари третья. product_form.twig
  3. Здравствуйте. Имеется opencart 3. В левом меню категорий у меня на данный момент выводятся только категории первого уровня, без вложенных подкатегорий. Нашел код, который выводит это меню: echo "<div class=\"list-group\"> "; $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable((isset($context["categories"]) ? $context["categories"] : null)); foreach ($context['_seq'] as $context["_key"] => $context["category"]) { echo " "; if (($this->getAttribute($context["category"], "category_id", array()) == (isset($context["category_id"]) ? $context["category_id"] : null))) { echo " <a href=\""; echo $this->getAttribute($context["category"], "href", array()); echo "\" class=\"list-group-item active\">"; echo $this->getAttribute($context["category"], "name", array()); echo "</a> "; if ($this->getAttribute($context["category"], "children", array())) { echo " "; $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["category"], "children", array())); foreach ($context['_seq'] as $context["_key"] => $context["child"]) { echo " "; if (($this->getAttribute($context["child"], "category_id", array()) == (isset($context["child_id"]) ? $context["child_id"] : null))) { echo " <a href=\""; echo $this->getAttribute($context["child"], "href", array()); echo "\" class=\"list-group-item active\"> - "; echo $this->getAttribute($context["child"], "name", array()); echo "</a> "; } else { echo " <a href=\""; echo $this->getAttribute($context["child"], "href", array()); echo "\" class=\"list-group-item\"> - "; echo $this->getAttribute($context["child"], "name", array()); echo "</a> "; } echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; echo " "; } echo " "; } else { echo " <a href=\""; echo $this->getAttribute($context["category"], "href", array()); echo "\" class=\"list-group-item\">"; echo $this->getAttribute($context["category"], "name", array()); echo "</a> "; } echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; echo "</div> "; Как сгделать вывод подкатегорий выбранной категории меню? Вот как згдесь :
×
×
  • 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.