M
M
Max Zhukov2017-11-10 22:15:11
opencart
Max Zhukov, 2017-11-10 22:15:11

How to add banner module to opencart products?

There is a banner.tpl file with a template:

<div id="banner<?php echo $module; ?>" class="banner">

  <?php foreach ($banners as $banner) { ?>

  <?php if ($banner['link']) { ?>

  <div><a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" title="<?php echo $banner['title']; ?>" /><?php if ($banner['description']) { ?><div class="s-desc"><?php echo $banner['description']; ?></div><?php } ?></a></div>

  <?php } else { ?>

  <div><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" title="<?php echo $banner['title']; ?>" /><?php if ($banner['description']) { ?><div class="s-desc"><?php echo $banner['description']; ?></div><?php } ?></div>

  <?php } ?>

  <?php } ?>

  

</div>

how do i insert it into tpl product? When I insert it, the variables are not found, and in the controller I don’t understand how to connect so that they are.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2017-11-11
@zoozag

Design -> Schemes -> Product (or Product)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question