Author Topic: Filter product category by manufacturer  (Read 157546 times)

studio16

  • Beginner
  • *
  • Posts: 43
    • Studio 16 Online Marketing
Re: Filter product category by manufacturer
« Reply #45 on: March 18, 2008, 21:21:58 pm »
Hey this is really a great feature, the only thing is how to get it to work with a result browse page after product search. When you search then you get all the manufacturers.

Is there any solutions for this problem?

thanks in advance
Studio 16 Websolutions
Online marketing & Webdesign
www.studio16.info
- SEO marketing / search engine optimization
- SEA marketing / Google Adwords
- Email marketing

dimpapadop

  • Beginner
  • *
  • Posts: 3
Re: Filter product category by manufacturer
« Reply #46 on: March 24, 2008, 13:27:42 pm »
Attaching the package updated for VM 1.0.13; in this version, only the file shop.browse.php need to be changed!

hi there guys! great great work!!!

Can you do a version for joomla 1.0.15 too?

please do

dimpapadop

  • Beginner
  • *
  • Posts: 3
Re: Filter product category by manufacturer
« Reply #47 on: March 24, 2008, 21:58:22 pm »
Hey guys, tried the 1.013a version hack here and works in joomla 1.0.15 too.
Thank you very much!!!

Pisu

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 451
  • ..still looking for..
    • Blog di Stefano Bagnatica
Re: Filter product category by manufacturer
« Reply #48 on: March 30, 2008, 20:08:38 pm »
Here you can find the latest package (ok for VM 1.0.14 / 1.0.15):
http://www.vmitalia.net/index.php?option=com_docman&task=doc_download&gid=54&Itemid=58
Pisu - Team VMItalia (Supporto Italiano VirtueMart)
www.stefanobagnatica.it | www.vmitalia.net

studio16

  • Beginner
  • *
  • Posts: 43
    • Studio 16 Online Marketing
Re: Filter product category by manufacturer
« Reply #49 on: April 03, 2008, 16:20:01 pm »
Here you can find the latest package (ok for VM 1.0.14 / 1.0.15):
http://www.vmitalia.net/index.php?option=com_docman&task=doc_download&gid=54&Itemid=58

is it possible to chain the manufacturer to a product instead of a category so after a search you can filter the results by manufacturer as well?
Studio 16 Websolutions
Online marketing & Webdesign
www.studio16.info
- SEO marketing / search engine optimization
- SEA marketing / Google Adwords
- Email marketing

Alex

  • Beginner
  • *
  • Posts: 1
Re: Filter product category by manufacturer
« Reply #50 on: April 16, 2008, 21:15:57 pm »
Thank you for this hack!! :)
How similar filter could be done, but the filter that would contain categories - so as in the list of products of the certain manufacturer the category of definite product of that manufacturer could be also filtered?

celine1988

  • Beginner
  • *
  • Posts: 2
    • My portfolio site
Re: Filter product category by manufacturer
« Reply #51 on: May 15, 2008, 10:54:31 am »
i get the following error:

Notice: Undefined variable: product_cell in /var/www/vhost/direxiondm.nl/home/html/joomla2/administrator/components/com_virtuemart/html/shop.browse.php on line 498

can i use this code anyway in virtuemart 1.1?

studio16

  • Beginner
  • *
  • Posts: 43
    • Studio 16 Online Marketing
Re: Filter product category by manufacturer
« Reply #52 on: May 21, 2008, 15:50:47 pm »
Hey this is really a great feature, the only thing is how to get it to work with a result browse page after product search. When you search then you get all the manufacturers.
Is there any solutions for this problem?
thanks in advance
is it possible to chain the product_id to the mf_name/manufacturer_id instead of the category_id so that it works on a search result page?
something like:
$query  = "SELECT distinct a.manufacturer_id,a.mf_name FROM #__{vm}_manufacturer AS a ";
if (!empty( $product_id ) ) {
    $query .= ", #__{vm}_product_mf_xref AS c, "
    . " #__{vm}_product AS b, "
    . " WHERE c.product_id='$product_id'"
    . " AND c.product_id = b.product_id AND b.product_publish='Y' "
    . " AND b.product_id = c.product_id AND c.manufacturer_id = a.manufacturer_id ";
}
$query .= "ORDER BY mf_name ASC";
$db = new ps_DB;
$db->query( $query );
$res = $db->record;
?>
        <select class="inputbox" name="manufacturer_id" onchange="order.submit()">
            <option value=""><?php echo '-- ' . _CMN_SELECT . ' ' . $VM_LANG->_PHPSHOP_MANUFACTURER_MOD . ' --'?></option>
        <?php 
foreach ($res as $manufacturer) {
$selected = '';
if( @$_REQUEST['manufacturer_id'] == $manufacturer->manufacturer_id ) {
$selected = 'selected="selected"';     
}
echo "<option value=\"".$manufacturer->manufacturer_id ."\" $selected>". $manufacturer->mf_name ."</option>\n";
}
        ?>
        </select>


but now i get all the manufacturers
Studio 16 Websolutions
Online marketing & Webdesign
www.studio16.info
- SEO marketing / search engine optimization
- SEA marketing / Google Adwords
- Email marketing

studio16

  • Beginner
  • *
  • Posts: 43
    • Studio 16 Online Marketing
Re: Filter product category by manufacturer
« Reply #53 on: May 30, 2008, 16:44:23 pm »
<?php
$db = new ps_DB;
      $db->query( ($list) );
   
      $res = $db->record;
      
            
      ?>
        <select  class="inputbox" name="category_id" onchange="order.submit()">
            <option value=""><?php echo $VM_LANG->_CATEGORY_FILTER ?></option>
        <?php 
         foreach ($res as $category) {
            
               $selected = '';
               if( @$_REQUEST['category_id'] == $category->category_id ) {
                     $selected = 'selected="selected"';     
               }
               echo "<option value=\"".$category->category_id ."\" $selected>". $category->category_name."</option>\n";
         }
?>
 </select>
this code gives me the category (names) on the particular search result browse page and ii filters correctly.
and i added the category fields in the browse.queries.php

only thing is how to remove duplicates. any suggestions?
Studio 16 Websolutions
Online marketing & Webdesign
www.studio16.info
- SEO marketing / search engine optimization
- SEA marketing / Google Adwords
- Email marketing

provid

  • Beginner
  • *
  • Posts: 1
Re: Filter product category by manufacturer
« Reply #54 on: June 09, 2008, 12:35:29 pm »
Hi everyone. Will this mod work with 1.1.0? or is ther an other hack for 1.1.0?

many thanks

Carlv1428

  • Beginner
  • *
  • Posts: 1
Re: Filter product category by manufacturer
« Reply #55 on: August 01, 2008, 15:45:24 pm »
Hi Everyone,

I was looking for those kind of feature for a long time, ...

I have just one question, since I updated my Virtuemart with the new code i don't see the sub categories anymore....

If you take a look at http://www.locastore.be
If you have a look at a categorie like computer components your dont have the display of the subcategories (shown on the menu but not in the middle page...
Now it says Array and nothing more.

Help please...

Niki Filippini

  • Beginner
  • *
  • Posts: 3
    • BluSistemi Informatica
Re: Filter product category by manufacturer
« Reply #56 on: August 01, 2008, 18:25:38 pm »
Hi here there's a hack for the VM 1.12

It needs some test

Hi all
Niki

[attachment cleanup by admin]

CranialBlaze

  • Jr. Member
  • **
  • Posts: 119
Re: Filter product category by manufacturer
« Reply #57 on: August 05, 2008, 15:10:59 pm »
Hey

I just tested the 1.12 version of the modification on my local site and it works perfectly, i just modified the 'browse_filterbymf.tpl.php' file so that on the browse page it shows Manufacturer as the initial value.

Thank you guys this will help my store out a lot
I don't believe, therefore it does not exist

Joomla 2.5 VM 2.0.2

Viames

  • Beginner
  • *
  • Posts: 4
Re: Filter product category by manufacturer
« Reply #58 on: August 07, 2008, 00:41:10 am »
there's a hack for the VM 1.12
It needs some test

Hi and thanks for the hack!
I'm testing this piece of code on J1.5 with VM 1.12 svn and I've got this notices on category view:

Code: [Select]
Notice: Undefined variable: VM_BROWSE_FILTERBY_MF in /components/com_virtuemart/themes/default/templates/browse/includes/browse_filterbymf.tpl.php on line 7
:   
Notice: Undefined variable: product_type_id in /components/com_virtuemart/themes/default/templates/browse/includes/browse_orderbyform.tpl.php on line 45

P.S. I would be nice to have this useful feature available on standard VirtueMart!


Sulpher

  • Beginner
  • *
  • Posts: 22
    • cre:active design lab
Re: Filter product category by manufacturer
« Reply #59 on: August 30, 2008, 13:39:35 pm »
Pisu, thanks a lot for great solution!
cre:active lab - web-design with Joomla!
joomla tune (language team)