A
A
Alexey2018-02-08 09:28:17
opencart
Alexey, 2018-02-08 09:28:17

I get an error on the opencart 2.3 website, how to solve?

I installed the template on the site, two errors pop up, they are connected, as I understand it. Tell me where to dig. "PHP Notice: Undefined index: reviews in ocbestproductslider.tpl on line 43 PHP Notice: Undefined variable: tooltip_wishlist in ocbestproductslider.tpl on line 77"
Code from file 43 line

<div class="ratings"><img src="catalog/view/theme/tt_muto1/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>" 77 строка "<em class="tooltips"><?php echo $tooltip_wishlist; ?></em>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ainur Valiev, 2018-02-08
@Gnanw

Turn off warning notices and don't worry)

O
Oleg, 2018-02-08
@402d

Advisers:
- Doctor, a pimple on my face jumped up.
- remove the mirrors from the house and live in peace!
<?php echo $product['reviews']; ?>
You don't have a field in the products table. To figure out why or change the alt of the picture, for example,
alt="rating <?php echo $product['rating']; ?>"
line 77 here without an environment it's hard to judge why it doesn't exist.
write like this
<?php echo isset($tooltip_wishlist)?$tooltip_wishlist:''; ?>
if defined, output, no - empty space.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question