News:

Support the VirtueMart project and become a member

Main Menu

Manufacturer link going directly to Manufacturer products

Started by Xris75, August 05, 2013, 14:04:14 PM

Previous topic - Next topic

Xris75

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

zainabubu

I tried this, it only brought up a pop up of the manufacturer's details page....did it work for you?

Maxim Pishnyak

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
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart