News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Jump manufacturer detail page and go directly to products

Started by Alvit, November 28, 2012, 18:31:02 PM

Previous topic - Next topic

Alvit

Hello everyone.
Joomla 2.5.7 and Virtuemart 2.0.12f
In my website I have a menu link that shows a page with all the manufacturers.
When I click on a manufacturer, it opens a page with manufacturer's site, email and link to see all the products.
I ask if it's possible to bypass this detail page, and see directly the manufacturer's products page.
Thanks,
Daniele.

balai


dualsim

Yes, that is possible.

Open components\com_virtuemart\views\manufacturer\tmpl\default.php in your favorite editor.
You will find following codes between lines 70 to 75:
<div class="spacer">
<h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerURL?>"><?php echo $manufacturer->mf_name?></a>
</h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerURL?>"><?php echo $manufacturerImage;?></a>
</div>

Replace the same by:
<div class="spacer">
<h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerIncludedProductsURL?>"><?php echo $manufacturer->mf_name?></a>
</h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerIncludedProductsURL?>"><?php echo $manufacturerImage;?></a>
</div>
That;s it. You are done.

Alvit

Quote from: balai on November 28, 2012, 20:09:42 PM
Hi

Use the free version of that extension
http://breakdesigns.net/extensions/custom-filters

Thanks for the advice, I already knew this module but never tried it. Seems interesting..

Quote from: dualsim on November 28, 2012, 22:09:45 PM
Yes, that is possible.

Open components\com_virtuemart\views\manufacturer\tmpl\default.php in your favorite editor.
You will find following codes between lines 70 to 75:
<div class="spacer">
<h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerURL?>"><?php echo $manufacturer->mf_name?></a>
</h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerURL?>"><?php echo $manufacturerImage;?></a>
</div>

Replace the same by:
<div class="spacer">
<h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerIncludedProductsURL?>"><?php echo $manufacturer->mf_name?></a>
</h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerIncludedProductsURL?>"><?php echo $manufacturerImage;?></a>
</div>
That;s it. You are done.

And it worksss!
Now two little more questions: is it possible, in the show all manufacturer page, to remove the manufacturer name text and leave only the image logo?
And if I create a menu item with the link to a single manufacturer page, how do I do to make the procedure asked before?
Thanks a lot for ur precious help.
Daniele.


sandstorm

Ive done this now and if anyone is interested here the code that I placed in the category Template

Just after this code in your category template after the title (or wherever you want the manufacturer description)

Add this;

<?php
$jinput 
JFactory::getApplication()->input;
 
$trigger="virtuemart_manufacturer_id";
 
$mid $jinput->get->get($trigger);
 if (!empty(
$mid))
{
echo 
'<div class="manufacturer-description>';
   echo 
'<p>'.$this->products[0]->mf_desc.'</p>';
echo 
'</div>';
}

?>


Does this look OK?
Anybody come up with a simpler solution?

Thanks

AC
J3.6.4 / PHP7.0.12
VM3.0.16

yosandra

Hello! How can I display the manufacturer products without link in the manufacturer details page?
http://tiendanueva.negre.es/tienda-online/marcas/and-tradition.html
there's only a link that brings to the manufacturer products but I want to display below directly.

I think I need to change:

<a title="<?php echo $manufacturer->mf_name; ?>" href="<?php echo $manufacturerURL; ?>"><?php echo $manufacturerImage;?></a>
            
               <a title="<?php echo $manufacturer->mf_name; ?>" href="<?php echo $manufacturerURL; ?>"><?php echo $manufacturer->mf_name; ?></a>

with the code that displays the manufacturers products, but HOW?

Kind regards,

Bit Stupid

Legend dualsim Thanks for this much need help.  PS I am now onto latest 2.0.24 and this is still working thank god.

Balai, I too was aware of Custom filters, but because I had already hacked to show add to cart function on the category view page this was not working anymore for me (but I did prefer its design!

chinsen

Quote from: dualsim on November 28, 2012, 22:09:45 PM
Yes, that is possible.

Open components\com_virtuemart\views\manufacturer\tmpl\default.php in your favorite editor.
You will find following codes between lines 70 to 75:
<div class="spacer">
<h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerURL?>"><?php echo $manufacturer->mf_name?></a>
</h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerURL?>"><?php echo $manufacturerImage;?></a>
</div>

Replace the same by:
<div class="spacer">
<h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerIncludedProductsURL?>"><?php echo $manufacturer->mf_name?></a>
</h2>
<a title="<?php echo $manufacturer->mf_name?>" href="<?php echo $manufacturerIncludedProductsURL?>"><?php echo $manufacturerImage;?></a>
</div>
That;s it. You are done.

Thanks so much for this, it works like a dream. I know this is from ages back, but it still works.

Is there a way to do the same for Menu links? i.e VirtueMart Manufacturer Details Layout menu items still go to the manufacturer details page. Is it possible to skip the details page with these links too?

Thanks a ton Dualsim!

sunilk

Hi Team


It is displaying a button to show the products.
I want to display all the product directly in this page.

I tried to change the code as per the forum but it is not working.

Please send me the procedure . How can i display products in the manufacturer page.

Thanks