Why do I have to click a second button to view products under a manufacturer?

Started by bfahy, April 18, 2012, 23:56:38 PM

Previous topic - Next topic

bfahy

I am developing in VM Version 2.0.6 and my client is complaining that visitors have to click a useless button in order to view the product line of a manufacturer.

For instance, when you visit our clients site we have all the manufacturers listed in the left hand column (in addition to product categories). When you click the manufacturer name, a page comes up with the manufacturer name, then a button that says "View all "X" products". There are no products being shown on the page. In previous versions of virtuemart, when you clicked a manufacturer, it would go to a page with all products from that manufacturer listed.  It appears that in this version of VM, they are forcing website users to make an extra click to see the products listed under a manufacturer.

What is the point of this and can I turn it off? Thanks in advance!

wembley2000

Hi

I totally agree; on my site I have a column of manufacturers we promote, which I hope users would click to quickly navigate to their products.  However, they have to click the useless link.

Is there a way of removing this and instead, when the user clicks the logo of a given manufactuer, it automatically displays their products and removes the second click?

Kind regards and lets hope this happens.

plastique

+1 from me. Useless.

Made me to create categories again for every manufacter so i can list them and avoid the double click.
So, now i have to choose manufacter twice.

I think its usefull only in the product detail page (popup) where user can see manufacter details, website, email etc.
Joomla 2.5.4
Virtuemart 2.0.6

bfahy

Still looking for an answer to this. I also would like to add that in addition to the "second click" to view products by a manufacturer, if there are products in a manufacturer, sometimes VM 2 will add all the store categories above the list of products when searching this way. Any way to turn that off too??

slammy

Quote from: plastique on April 21, 2012, 19:57:54 PM

Made me to create categories again for every manufacter so i can list them and avoid the double click.
So, now i have to choose manufacter twice.


If you do it the way you described: build up categories for each manufacturer and place the products in it - this leads to products which are related to more than one category.  You will find out that this causes the prev and next links above the productdetailpage to be unconsitent - if you use them - therefore read this threat: http://forum.virtuemart.net/index.php?topic=101208.msg339885#msg339885

regards slam

paul

Just in case anyone still needs to know, here is a decent solution.

First to get the links in the manufacturers module to go directly to the products:

In the following file - /modules/mod_virtuemart_manufacturer/tmpl/default.php

Locate the TWO instances of the following
index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=

and replace them with
index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=

Then to get rid of the categories and only show the products:

In the following file - /components/com_virtuemart/views/category/tmpl/default.php

Locate this block of code
<div class="category-view">

<?php // Start the Output
if(!empty($this->category->children)){
foreach ( $this->category->children as $category ) {

// Show the horizontal seperator
if ($iCol == && $iCategory $categories_per_row) { ?>

<div class="horizontal-separator"></div>
<?php }

// this is an indicator wether a row needs to be opened or not
if ($iCol == 1) { ?>

<div class="row">
<?php }

// Show the vertical seperator
if ($iCategory == $categories_per_row or $iCategory $categories_per_row == 0) {
$show_vertical_separator ' ';
} else {
$show_vertical_separator $verticalseparator;
}

// Category Link
$caturl JRoute::'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' $category->virtuemart_category_id );

// Show Category ?>

<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>
<br />
<?php // if ($category->ids) {
echo $category->images[0]->displayMediaThumb("",false);
//} ?>

</a>
</h2>
</div>
</div>
<?php
$iCategory ++;

// Do we need to close the current row now?
if ($iCol == $categories_per_row) { ?>

<div class="clear"></div>
</div>
<?php
$iCol 1;
} else {
$iCol ++;
}
}
}
// Do we need a final closing row tag?
if ($iCol != 1) { ?>

<div class="clear"></div>
</div>
<?php ?>
</div>


and either delete it or (preferred) comment it out.

That should do the trick.

It worked fine for me.

dracoteam

Hi think the same, that second click to see the products has no sense. Manufacturers and their products should appear in the same page

tonis

Quote from: paul on May 20, 2012, 14:22:04 PM
Just in case anyone still needs to know, here is a decent solution.

First to get the links in the manufacturers module to go directly to the products:

In the following file - /modules/mod_virtuemart_manufacturer/tmpl/default.php

Locate the TWO instances of the following
index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=

and replace them with
index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=

Then to get rid of the categories and only show the products:

In the following file - /components/com_virtuemart/views/category/tmpl/default.php

Locate this block of code
<div class="category-view">

<?php // Start the Output
if(!empty($this->category->children)){
foreach ( $this->category->children as $category ) {

// Show the horizontal seperator
if ($iCol == && $iCategory $categories_per_row) { ?>

<div class="horizontal-separator"></div>
<?php }

// this is an indicator wether a row needs to be opened or not
if ($iCol == 1) { ?>

<div class="row">
<?php }

// Show the vertical seperator
if ($iCategory == $categories_per_row or $iCategory $categories_per_row == 0) {
$show_vertical_separator ' ';
} else {
$show_vertical_separator $verticalseparator;
}

// Category Link
$caturl JRoute::'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' $category->virtuemart_category_id );

// Show Category ?>

<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>
<br />
<?php // if ($category->ids) {
echo $category->images[0]->displayMediaThumb("",false);
//} ?>

</a>
</h2>
</div>
</div>
<?php
$iCategory ++;

// Do we need to close the current row now?
if ($iCol == $categories_per_row) { ?>

<div class="clear"></div>
</div>
<?php
$iCol 1;
} else {
$iCol ++;
}
}
}
// Do we need a final closing row tag?
if ($iCol != 1) { ?>

<div class="clear"></div>
</div>
<?php ?>
</div>


and either delete it or (preferred) comment it out.

That should do the trick.

It worked fine for me.


very simple and working solution, thanks for this... ;)

zainabubu

Sadly, it did not work for me. Still getting a popup asking me to View all "x" Products.  :(

balai

You can use the free custom filters extension.
It has that and also a counter of the products that each manufacturer has
http://breakdesigns.net/extensions/custom-filters

gpessoa

I already did this solution as described on Reply #5 and the link disappeared and it works, but not perfect...

If I do not use SEF/SEO it works perfectly!

But, if I Use SEF/SEO friendly URLs it has a problem that is:
If you start by selecting one category and then decided to change selecting a manufacturer, it only shows the product of the previous selected category filtered by this manufacturer you selected. I believe this is wrong!

If you go to home page and then you select one manufacturer, it shows all products from that manufacturer. I believe this is correct!

VM 2.018a
J2.58
J 4.4.4; VM 4.2.6; PHP 8.3.6

MoneyMagnets

Thanks tonis - the first part of your solution worked for me but for some reason the removal of categories didn't work.

Thanks balai for mentioning the free custom filters extension since that does everything! There are no categories to worry about and the manufacturers show properly.

One less thing to worry about :-)

MoneyMagnets

By the way free custom filters has a minor bug in that it doesn't find the results of the manufacturer if it has a '  in the name. Simply remove the ' from the manufacturer name and then the search results will work.

In the end I didn't use the free custom filter module but used changes as described above in /modules/mod_virtuemart_manufacturer/tmpl/default.php and the usual manufacturers module but in Configuration -> Templates tab I unchecked 'Show category children' and the categories no longer appeared at the top of my search results using the usual VM2 manufacturers module.     

balai

Hi

Its not bug of Custom Filters nor it is related with the manufacturer names.
It has to do with the aliases/slugs as stored in the VM tables

An alias should contain certain characters (a-z,A-Z,0-9,-,_). Any character beyond those will cause problems not only in custom filters but in any component that uses sef urls

MoneyMagnets

Quote from: balai on January 28, 2013, 16:59:35 PM
Hi

Its not bug of Custom Filters nor it is related with the manufacturer names.
It has to do with the aliases/slugs as stored in the VM tables

An alias should contain certain characters (a-z,A-Z,0-9,-,_). Any character beyond those will cause problems not only in custom filters but in any component that uses sef urls

Yes I received a reply from Custom Filters telling me that, but the weird thing is that the error only occurs when the ' is in the name even when the alias hasn't changed (unless it changes automatically). The alias didn't contain the ' as far as I could see.

Anyway at least I've got a solution for my client.