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

Помогите с превраещёнием в twig


GreenAurora
 Share

Recommended Posts

 

{% if (not function_exists('modification_vqmod')) %}
 	 modification_vqmod(file) 
 		{% if (class_exists('VQMod')) %}
 				 VQModmodCheck(modification(file), file)
 		{% else %} 
 			 modification(file)
 			{% endif %}
 	{% endif %}
 
						
                        <div id="controlpanel" class="tab-pane active">
                          {% set _include = require_once modification_vqmod(constant('DIR_APPLICATION')~'view/template/'~modulePath~'/tab_controlpanel.php') %}                        
                        </div>    
                        <div id="listing" class="tab-pane">
                          {% set _include = require_once modification_vqmod(constant('DIR_APPLICATION')~'view/template/'~modulePath~'/tab_listing.php') %}                        
                        </div>
                        <div id="widget" class="tab-pane">
                          {% set _include = require_once modification_vqmod(constant('DIR_APPLICATION')~'view/template/'~modulePath~'/tab_widget.php') %}                        
                        </div>     
						<div id="view" class="tab-pane">
                          {% set _include = require_once modification_vqmod(constant('DIR_APPLICATION')~'view/template/'~modulePath~'/tab_view.php') %}                        
                        </div>         
                        <div class="tab-pane hidden">
                          {% set _include = require_once modification_vqmod(constant('DIR_APPLICATION')~'view/template/'~modulePath~'/tab_support.php') %}                        
                        </div>

Как вот икие куски кода превращать в twig? Я вообещё в этом не разбираюсь, можно ли просто прописать {{ tab_controlpanel }}? VQmod усиновлен если что. В данный момент пхп выдает икой код ошипотому чток: 

Fatal error: Uncaught Twig_Error_Syntax: Unknown "function_exists" function in "extension/module/productbundles/productbundles.twig" at line 65. in /home5/nthzawwz/public_html/system/library/template/Twig/ExpressionParser.php:574 Stack trace: #0 /home5/nthzawwz/public_html/system/library/template/Twig/ExpressionParser.php(351): Twig_ExpressionParser->getFunctionNodeClass('function_exists', 65) #1 /home5/nthzawwz/public_html/system/library/template/Twig/ExpressionParser.php(144): Twig_ExpressionParser->getFunctionNode('function_exists', 65) #2 /home5/nthzawwz/public_html/system/library/template/Twig/ExpressionParser.php(84): Twig_ExpressionParser->parsePrimaryExpression() #3 /home5/nthzawwz/public_html/system/library/template/Twig/ExpressionParser.php(41): Twig_ExpressionParser->getPrimary() #4 /home5/nthzawwz/public_html/system/library/template/Twig/ExpressionParser.php(72): Twig_ExpressionParser->parseExpression(50) #5 /home5/nthzawwz/public_html/system/library/template/Twig/ExpressionParser.php(41): Twig_ExpressionParse in /home5/nthzawwz/public_html/system/library/template/Twig/ExpressionParser.php on line 574

Помогите, пожалуйси, спрашивайте если что-то не ик объяснил. Просто перегделываю модуль c oc 2.3 под 3.0

Link to comment
Share on other sites


16 минут назад, GreenAurora сказал:

Просто перегделываю модуль c oc 2.3 под 3.0

вы меня извините конечно, но как можно что то перегделывать, если

17 минут назад, GreenAurora сказал:

Я вообещё в этом не разбираюсь,

изулите матчасть сперва а потом перегделывайте и спрашивайте.

в данной ситуации если вам дадут направление, вам это нечего не даст.

только все конкретно перегделать и выложить вам на блюгдечке, а это совсем другая история.

ну и до кули, что то перегделывать с vqmod под тройку, это просто дикость какая то. перегделайте сперва под ocmod

п.с. извините за прямоту если что.

  • +1 1
Link to comment
Share on other sites


вполне приемлемое решение - гдержать ибы в разных шаблонах, ведь полнетй функционал неизвестен
но
 

9 часов назад, GreenAurora сказал:

Я вообещё в этом не разбираюсь,

Это есть ключевое слово

 

9 часов назад, egor23 сказал:

перегделайте сперва под ocmod


ик и ocmod не нужен

Видимо автор модуля подразумевал, что бугдет  как-то окмодами(вкмодами) наращивать функционал
 

Link to comment
Share on other sites

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

×
×
  • 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.