Z
Z
ZeroMorale2018-04-19 17:35:42
opencart
ZeroMorale, 2018-04-19 17:35:42

How to find the value of a global variable in php?

There is a headerv1.tpl template in which the component is connected with the global variable <?php echo $telephone; ?> where $telephone is the phone number in the header of the page that I need to change. The question is where to look for the text value of the global. A search for the project through the total commander did not give any results.
CMS OpenCart

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yan-s, 2018-04-19
@Yan-s

The value is most likely stored in the database.
Try searching by variable name, you can find the place where it gets the value.

I
iljaGolubev, 2018-04-19
@iljaGolubev

where to look for the text value of the global

I think it's in the base .
Or in the admin .
or here

Z
zoozag, 2018-04-23
@zoozag

Look for not $telephone, but $data['telephone']
All template variables are set in the controller.
Judging by the name of the template, you have a template that modifies:
catalog/controller/common/header.php
If you just want to see what data is being pulled there, you can look at
system/storage/modification/catalog/controller/common/header.php
If you need to fix this variable, see your template modifier.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question