P
P
Partizan Agent2016-05-11 23:47:54
opencart
Partizan Agent, 2016-05-11 23:47:54

How to create a variable in Opencart2?

In controller/error/not_found.php I
added a new variable to display other text in the template, there is no way to display the desired text!

$data['button_shopping'] = $this->language->get('button_shopping');

renamed in the template
<?php echo $button_shopping; ?>
What could be the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Arushanov, 2016-05-12
@daruwanov

Perhaps $this->language->get('button_shopping')empty?
Well, or turn on the display of errors ... In the open map there was even a section of the admin panel where you can see the logs, maybe there will be a record if something went wrong ..

I
imdeveloper, 2016-05-12
@link_web

Options:
1) -You do not have this variable in the language file
2) -You have a cache. Clear cache and test

D
Dmitry Evgrafovich, 2016-05-13
@Tantacula

Have you looked at the cache? vqmod including? maybe something is cached from the server side as well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question