VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Xris75 on August 05, 2013, 14:04:14 PM

Title: Manufacturer link going directly to Manufacturer products
Post by: Xris75 on August 05, 2013, 14:04:14 PM
Hi there,

I am running  Joomla 2.5.11 and VM 2.0.20

As I haven't find a working solution to this problem with these specs, here is my small contribution to all the help I received.

Please consider I am not a professionnal and this should be validated by senior developper.
But I works pretty fine and looks coherent to me.



This is what I did :

1. Create an override of the virtuemart component in your template
yoursite\templates\yourtemplate\html\com_virtuemart\productdetails

2. In product details replace the existing code in
yoursite\templates\yourtemplate\html\com_virtuemart\productdetails\default_manufacturer.php file




<div class="manufacturer">
....
</div>




with this one



<div class="manufacturer">
    <?php
    $link 
JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' $this->category->virtuemart_category_id.'category&virtuemart_manufacturer_id=' $this->product->virtuemart_manufacturer_id );
    
$text $this->product->mf_name;

    
/* Avoid JavaScript on PDF Output */
    
if (strtolower(JRequest::getWord('output')) == "pdf") {
   echo 
JHTML::_('link'$link$text);
    } else {
   
?>

        <span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL'?></span><a href="<?php echo $link ?>"><?php echo $text ?></a>
    <?PHP } ?>
</div>



Hope this will help and give feedback if it works for you :-)

Best,

Christophe
Title: Re: Manufacturer link going directly to Manufacturer products
Post by: zainabubu on November 21, 2013, 02:42:05 AM
I tried this, it only brought up a pop up of the manufacturer's details page....did it work for you?
Title: Re: Manufacturer link going directly to Manufacturer products
Post by: Maxim Pishnyak on November 22, 2013, 22:17:31 PM
Any success with forum search on this? Some attempts maybe?
Be more precious about your version also - http://forum.virtuemart.net/index.php?topic=79799