How do i display the model in the http://***.com/cart/index.php?route=product/category&path=6
page? I see how to display it when in the product page itself but not how to display it underneath the thumbnails when in grid view.
Thanks
Hey,
In catalog / view / theme / <your theme> / product / category.tpl
Put The Values:
Anywhere After:
Example:
Find:
Add After:
Regards,
Joel.
In catalog / view / theme / <your theme> / product / category.tpl
Put The Values:
Code: Select all
<?php echo $product['model']; ?>
<?php echo $product['upc']; ?>
Code: Select all
<?php foreach ($products as $product) { ?>
Find:
Code: Select all
<?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 } ?>
Code: Select all
<div class="name"><?php echo $product['model']; ?></div>
<div class="name"><?php echo $product['upc']; ?></div>
Joel.
code above not work in my case. Only some products have upc.OpenCart Addons wrote:Hey,
Example:
Find:Add After:Code: Select all
<?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 } ?>
Regards,Code: Select all
<div class="name"><?php echo $product['model']; ?></div> <div class="name"><?php echo $product['upc']; ?></div>
Joel.
I tried this also not work
Code: Select all
<?php if ($product['upc']) { ?>
<div class="name"><?php echo $product['upc']; ?></div>
<?php } ?>
In both cases it gives an error undecleard upc in category.tpl
Simon, thank you for that. What do I add to declare those variables?
Thanks
Thanks
uksitebuilder wrote:you also need to declare the variables in catalog/controller/product/category.php
Who is online
Users browsing this forum: Google [Bot], stefansmith129 and 208 guests