Hello eveyone,
I tried to parse array, for example print_r or var_dump (category array).
{{ category.name }}
I wnat to see what exist in category.
Unsuccessful - can you please help me and write example how to print array int code?
Tnx
I find - if some one need, below instraction how to do it:
You can activate dump() function for twig environment by following these steps in opencart 3.0 :
Go to system/library/template/Twig/Environment.php
Here in constructor function you can find $options array. Set 'debug' option to 'true'.
Now we need to include debug extension, so
add $this->addExtension(new Twig_Extension_Debug()); below.
That's all we need to do. Now test if its working for you and update here.
You can activate dump() function for twig environment by following these steps in opencart 3.0 :
Go to system/library/template/Twig/Environment.php
Here in constructor function you can find $options array. Set 'debug' option to 'true'.
Now we need to include debug extension, so
add $this->addExtension(new Twig_Extension_Debug()); below.
That's all we need to do. Now test if its working for you and update here.
Who is online
Users browsing this forum: No registered users and 127 guests