I'm setting up a webshop in drupal and I bought a template.
The tempate has a compare products function embedded, that works with a button on the product pages, however, I would only like that button to show up at certain types of products, like TVs and phones etc., but not for the rest.
The compare button, however, is hardcoded into the template file and not manageable from views, so I have to add the conditions to it there, in PHP - to only appear on the node pages of products that have a certain taxonomy term attached to them.
<div class="actions">
<?php print flag_create_link('wishlist', $node->nid); ?>
<?php print flag_create_link('compare', $node->nid); ?>
</div><!-- .actions -->
</div>
This is the section in the code of the node--product.tpl.php file that puts out the action buttons. I need the second one, the compare button to only appear for nodes that have a certain taxonomy term.
I don't really know php, except for very very basic syntax, so I would be really grateful, if someone could describe in detail how to implement a solution, perhaps even provide a snippet of code that I can customize and paste there!
Thank you in advance!
Huba