Answer the question
In order to leave comments, you need to log in
Why can't I change the parent block?
Good afternoon.
There is a task, for two blocks to change the parent element to a higher one. Online store on opencart.
I open the category.tpl file, find the part of the code I need:
<div class="product-grid-list">
<ul class="product-list" id="product-list-grid">
<?php foreach ($products as $product) { ?>
<li>
<div class="product-block">
<div class="product-block-inner">
<?php if ($product['thumb']) { ?>
<div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
<?php } ?>
<div class="saleblock">
<?php if (!$product['special']) { ?>
<?php } else { ?>
<span class="saleicon sale">Sale</span>
<?php } ?>
</div>
<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
<div class="description"><?php echo $product['description']; ?></div>
<?php if ($product['price']) { ?>
<div class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<div class='categorysalevis'><span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span></div>
<?php } ?>
<?php if ($product['tax']) { ?>
<br />
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
<?php } ?>
</div>
<?php } ?>
<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/<?php echo $this->config->get('config_template') ?>/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>
<div class="cart">
<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />
</div>
<div class="wishlist" style="display:none;"></div>
<div class="compare" style="display:none;"></div>
</div>
</div>
</li>
<?php } ?>
</ul>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question