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

Only Manufacturer No All Categories

Started by Tamakom, July 20, 2012, 13:59:38 PM

Previous topic - Next topic

Tamakom

Friends of Virtuemart 2.0.8c

I want to help solve a configuration: When choosing a manufacturer, show all categories and below the manufacturer's products. For those who surf the web, this is not convenient, because it annoys and exit the website.

I want to set that selecting the manufacturer showing the manufacturer's products only.

Second: There are manufacturers with 2 or 3 categories and would be excluded.

How to solve these 2 items?

Thank you

[attachment cleanup by admin]

balai

Hi

You can use Custom Filters.
They offer Manufacturers and Categories filters
http://breakdesigns.net/extensions/custom-filters

Tamakom

#2
Quote from: balai on July 20, 2012, 17:08:42 PM
Hi

You can use Custom Filters.
They offer Manufacturers and Categories filters
http://breakdesigns.net/extensions/custom-filters

Dear balai
I appreciate your interest, but that's not what I want. What I want is to do the same stuff cfFilter, but do so from the manufacturer's logo.   Unfortunately cfFilter acts separately from the dropdown menu where are the logos

Is there another option to take me to the manufacturer's products from the logo?
Regards

balai

Hi

Then you have to hack the manufacturers module "mod_virtuemart_manufacturer" to lead to a product  results page.
Custom Filters can be usefull here too.

You can disable the cf module but use the component for the filtering process.
What i mean is to open the file modules\mod_virtuemart_manufacturer\tmpl\default.php and replace the :

$link = JROUTE::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);

with:

$link = JRoute::_('index.php?virtuemart_manufacturer_id[0]=' . $manufacturer->virtuemart_manufacturer_id.'&option=com_customfilters&view=products');

Make sure that the Custom Filters component is installed
I haven't test it , so please let me know if it works

Tamakom

Quote from: balai on July 21, 2012, 10:38:38 AM
Hi

Then you have to hack the manufacturers module "mod_virtuemart_manufacturer" to lead to a product  results page.
Custom Filters can be usefull here too.

You can disable the cf module but use the component for the filtering process.
What i mean is to open the file modules\mod_virtuemart_manufacturer\tmpl\default.php and replace the :

$link = JROUTE::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);

with:

$link = JRoute::_('index.php?virtuemart_manufacturer_id[0]=' . $manufacturer->virtuemart_manufacturer_id.'&option=com_customfilters&view=products');

Make sure that the Custom Filters component is installed
I haven't test it , so please let me know if it works

balai:

Still does not work with the changes

The original default.php...(components\com_virtuemart\views\manufacturer\tmpl\default.php

// Manufacturer Elements
$manufacturerURL = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);
$manufacturerIncludedProductsURL = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb("",false);

// Show Category ?>
<div class="manufacturer floatleft<?php echo $manufacturerCellWidth . $showVerticalSeparator ?>">
<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>
</div>
<?php

With your code:
// Manufacturer Elements
$manufacturerURL = JRoute::_('index.php?virtuemart_manufacturer_id[0]=' . $manufacturer->virtuemart_manufacturer_id.'&option=com_customfilters&view=products');
$manufacturerIncludedProductsURL = JRoute::_('index.php?option=com_virtuemart&view=virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id);
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb("",false);

// Show Category ?>
<div class="manufacturer floatleft<?php echo $manufacturerCellWidth . $showVerticalSeparator ?>">
<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>
</div>
<?php

Also applied to the code on line details.php equal to details.php. Now shows all unfiltered products manufacturer. That is, includes all manufacturers.

I'm hopeful to resolve this soon.

Regards

balai

The changes should be done to the file:
modules\mod_virtuemart_manufacturer\tmpl\default.php
lines 13, 48

I tested it and it works

Tamakom

Quote from: balai on July 23, 2012, 09:46:31 AM
The changes should be done to the file:
modules\mod_virtuemart_manufacturer\tmpl\default.php
lines 13, 48

I tested it and it works

Excellent ... Excellent ... Excellent .... Thank you very much ....!!