A
A
Artyom Pinul2016-08-11 23:22:01
PHP
Artyom Pinul, 2016-08-11 23:22:01

How to solve opencart error?

Good afternoon.
After placing an order on the site, the following error pops up

Notice: Undefined variable: text_message in /home/admin/web/имя сайта.ру/public_html/catalog/view/theme/coloring/template/common/success.tpl on line 18

Here is the content of the entire success.tpl file
<?php echo $header; ?>
<div class="container">
  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
  <div class="row"><?php echo $column_left; ?>
    <?php if ($column_left && $column_right) { ?>
    <?php $class = 'col-sm-6'; ?>
    <?php } elseif ($column_left || $column_right) { ?>
    <?php $class = 'col-sm-9'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-12'; ?>
    <?php } ?>
    <div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>
      <h1><?php echo $heading_title; ?></h1>
      <?php echo $text_message; ?>
      <div class="buttons">
        <div class="pull-right"><a href="<?php echo $continue; ?>" class="btn btn-primary"><?php echo $button_continue; ?></a></div>
      </div>
      <?php echo $content_bottom; ?></div>
    <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Sisyukin, 2016-08-12
@Caarl

So the answer is in the question itself ... do a check on the text of the message and then display it. Or find out why there is no this variable...

E
Eugene, 2016-08-12
@n1ger

Go to controller succes.php and languages ​​succes.php
And search there
In the language you should have a translation of this variable
$_['text_mesage'] = 'Your text here';
And in the controller, you must take it from the language and assign it to this variable.
Something like this
$this->data['text_message'] = $this->language->get('text_message');
Most likely, this variable is not declared and assigned in your controller, but you stubbed it in the file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question