Need a little PHP help. In \html\com_virtuemart\category\default.php I have the following..
<div class="width55 floatcenter">
<h2>
<!-- <?php echo JHTML::link($product->link, $product->product_name); ?>-->
<?php echo $product->product_name; ?>
</h2>
I think that piece of code is what generates the product name as a header in the virtuemart category view. What I would like to do is also make that header link to the actual product page. Thought this was the solution... http://docs.joomla.org/JHtml::link/1.6 but couldn't work out how to use '$url'
Any help is greatly appreciated!
Corey
Joomla 2.5/Virtuemart 2.0.6
In \html\com_virtuemart\category\default.php the following from...
<div class="width55 floatcenter">
<h2>
<!-- <?php echo JHTML::link($product->link, $product->product_name); ?>-->
<?php echo $product->product_name; ?>
</h2>
to..
<?php echo JHTML::link(JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id), $product->product_name, array('title' => $product->product_name)); ?>
I think by default that is a feature of virtuemart
try un-commenting the code - use the one below
<div class="width55 floatcenter">
<h2>
<?php echo JHTML::link($product->link, $product->product_name); ?>
<?php echo $product->product_name; ?>
</h2>
or try this one if the one above will generate two headings
<div class="width55 floatcenter">
<h2>
<?php echo JHTML::link($product->link, $product->product_name); ?>
</h2>
i have this one I changed the heading<h6><?php echo JHTML::link($product->link, $product->product_name); ?></h6>
Thanks for the quick reply. I did the following and it works for sure.
In \html\com_virtuemart\category\default.php the following from...
<div class="width55 floatcenter">
<h2>
<!-- <?php echo JHTML::link($product->link, $product->product_name); ?>-->
<?php echo $product->product_name; ?>
</h2>
to..
<?php echo JHTML::link(JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id), $product->product_name, array('title' => $product->product_name)); ?>
perfect glad you figured it out