Post by byredyre » Sat Oct 06, 2012 5:42 am

On product pages, is it possible to remove the "Tags:" from displaying at the bottom? This also goes for the "Product Code:” and “Availability:” on product pages.

I have OpenCart v1.5.4.1, with default theme.


New member

Posts

Joined
Sun Sep 30, 2012 6:04 pm

Post by dirtboy » Sat Oct 06, 2012 8:55 am

find this file catalog > view > theme > YOUR THEME > template > product > product.tpl

find and remove (or comment in case you want to use them later) this code

Code: Select all

<?php if ($tags) { ?>
  <div class="tags"><b><?php echo $text_tags; ?></b>
    <?php for ($i = 0; $i < count($tags); $i++) { ?>
    <?php if ($i < (count($tags) - 1)) { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
    <?php } else { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
    <?php } ?>
    <?php } ?>
  </div>
  <?php } ?> 
here is a mod that should remove product code and availability
http://www.opencart.com/index.php?route ... %20setting

or you can remove them manually from the product file listed above

find this code for availability

Code: Select all

<span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div>
and this code for product code

Code: Select all

<span><?php echo $text_model; ?></span> <?php echo $model; ?><br />

“Anyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learning stays young. The greatest thing in life is to keep your mind young.”
- Henry Ford


User avatar
Active Member

Posts

Joined
Wed Mar 07, 2012 3:04 pm

Post by byredyre » Tue Oct 09, 2012 6:39 am

Thanks, that was an easy fix.

I have OpenCart v1.5.4.1, with default theme.


New member

Posts

Joined
Sun Sep 30, 2012 6:04 pm

Post by rotaryracer » Sun Jun 23, 2013 9:04 pm

After some searching and code editing, I'm still unable to hide tags. Probably a stupid noob mistake, but would appreciate any advice you can give! Here's the code I'm trying to comment out in the product.tpl file under the aforementioned folder structure:

Code: Select all

 <?php } ?>
  <?php if ($tags) { ?>
  <div class="tags"><b><?php echo $text_tags; ?></b>
    <?php for ($i = 0; $i < count($tags); $i++) { ?>
    <?php if ($i < (count($tags) - 1)) { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
    <?php } else { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
    <?php } ?>
    <?php } ?>
  </div>
  <?php } ?>
  <?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
$('.colorbox').colorbox({
	overlayClose: true,
	opacity: 0.5
});
I have tried using #, //, and /* */ to comment out the code as I really hate deleting stuff, but whatever I put in to comment - # or // - it just appears along with the tags. For example, one tag might be 8491 and I'll end up with ###8491. I also cleared the cache under the system menu and VQMod Manager but no luck. I'd like to use the product tags to make searching for manufacturer part numbers easy (and it does work great), but am trying to keep that line hidden.

BTW, I'm on v1.5.4.

Thanks!

Jason

New member

Posts

Joined
Tue Oct 16, 2012 7:45 pm

Post by dirtboy » Mon Jun 24, 2013 12:00 am

try using <!-- and --> to comment it.

like this

Code: Select all

<!--<?php if ($tags) { ?>
  <div class="tags"><b><?php echo $text_tags; ?></b>
    <?php for ($i = 0; $i < count($tags); $i++) { ?>
    <?php if ($i < (count($tags) - 1)) { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
    <?php } else { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
    <?php } ?>-->

“Anyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learning stays young. The greatest thing in life is to keep your mind young.”
- Henry Ford


User avatar
Active Member

Posts

Joined
Wed Mar 07, 2012 3:04 pm

Post by rotaryracer » Mon Jun 24, 2013 2:19 am

SUCCESS - thank you very much! Now I can get my product search working correctly and not have a bunch of manufacturer part numbers showing up in product tags...this is perfect.

Thanks!

Jason

New member

Posts

Joined
Tue Oct 16, 2012 7:45 pm
Who is online

Users browsing this forum: No registered users and 12 guests