Manufacturers redirecting to category page and not to every manufacturer items

Started by escozul, January 26, 2014, 11:17:33 AM

Previous topic - Next topic

escozul

I have a page right here: www.coffeelife.gr?online=1 (you need to add the ?online=1 to bypass the comming soon screen)

I use a manufacturers module that scrolls the manufacturers and when you click on one it redirects you to its page. However when you are browsing a category and you click on a manufacturer it doesn't show the products of that manufacturer, rather the category filtered by that manufacturer. In the module template here is the link that takes you there: $link = JROUTE::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);

From what I've seen that's the usual link for that type of redirection. However this way more ofthen than not you get a "no product found in this category" when you click on a manufacturer. I need to click and not filter the category by manufacturer. I want to click and show all the products of the manufacturer regardless the category I'm currently viewing. How do I change the link to make it disregard the category and view all products from all categories for that manufacturer? I tried removing the $view=category part but it didn't work.

Thanks for any help

(I was unsure on what forume I should post this topic so if I made a mistake please correct it and move my topic to the proper forum. Thank you)

balai

If you like check the Custom Filters extension
The category and the manufacturer filters are in the FREE version
http://breakdesigns.net/extensions/custom-filters

escozul

Well TBH I managed to get it working excellent!

I am aware of that extension. It's really cool, but mostly comprehensible by people who are "computer fluent" (so to speak). Whereas I need something that is "fool proof"! You click a manufacturer's image and bam! you see their products. No matter where you are in the website. I see that most virtuemart based websites when you click any manufacturers module you go to the manufacturer's description and then their products. I needed something new.

In any case what I did was to change the link in the manufacturer's module template which was $link = JROUTE::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);
and changed it into $link = JROUTE::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=0&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);
as described in http://forum.virtuemart.net/index.php?topic=98224.0
That did it! Now whenever you click on a manufacturer's image on the module it always takes you to the all products page which I made in a hidden menu. I will also fix the template to not display categories and it's complete.
So happy now!  ;D

escozul

I now come faced with another challenge though

In the template to display the manufacturers I removed the code that displays the child categories and all is well.
I also managed to add text that displays the name of the manufacturer. It seems that manufacturer is treated like a category so this $this->category->category_name actually returns the name of the manufacturer.
So first thing that my template displays is this: <h3 class="module-title"><span><span><?php echo $this->category->category_name?>&nbsp;</span></span></h3>
It should display the category title but instead it displays the manufacturer's title since we view all the manufacturer's products.
Why the "nbsp;" well because I want to add the manufacturer's image after the title. I can't seem to be able to do that though. $this->category->file_url_thumb or similar attempts proved futile!

Any idea how to make the manufacturer's image display when viewing all his products?