Manufacturers Drop Down Menu (Almost Got It?)

[quote name=‘jobosales’]Change the part in red to “- Select price -”:

```php


[COLOR="Red"]- Select Manufacturer -[/COLOR]
{foreach from=$items item="filter" name="filters"}
{foreach from=$filter.ranges name="ranges" item="range"} ```

Bob[/QUOTE]

If i want to show different product filters on sidebox like "Shop By Price" and Shop By Manufactures" , than ?

Excellent work!



This works a treat.

The only issue I have is that sometimes when I add a new manufacturer to the list I get an eror



Fatal error: Cannot use string offset as an array in /home/asia/public_html/shop/var/compiled/admin/%%E4^E42^E4252AD1%%mainbox.tpl.php on line 56



But not everytime, any ideas why.



Edit:

Looks like I am stuck at 13 items, above error now persists



Edit:

Even worse only five items show up in the dropdown box

Any news with the errors??? Because i would like to build the manufacturer list with a dropdown too!

[quote name=‘Triplex’]Any news with the errors??? Because i would like to build the manufacturer list with a dropdown too![/QUOTE]



The coding given earlier in this thread works. I have used it and now have a menufacturers drop down list.

FANTASTIC!!!



:stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue:

Thanks i would like to test it.

[quote name=‘brandonvd’]Once again Sno is a genius. This works great. Thank you very much Sno, I really appreciate it.



Brandon[/QUOTE]



I am testing CS-CART for my store, currently on 60 day trial.



I very much want this design feature, so I have tried implementing with zero success…however after viewing your site, thought you should know that the drop down box is not working…I use FF 2.00.20 and IE 7, and when I select a mfg from your list, nothing happens. Thought you’d like to know!

Plumbingdeals



Thank you for pointing out my problem. I don’t know what happened, but somehow my file got changed. I copied the code over per Snorocket’s instructions and now everything works fine.



Thanks again,



Brandon

hate to say this…but know I don’t see your drop down menu at all?

I know, I am working on changing it. The problem I had is that I want to use the filters to help narrow down my products. With Sno’s mod it kept the enitre list of manufacturers in the drop down and didn’t allow the list to be narrowed down based upon the products.



The funny thing is, even though I changed the file back to the original code, the filters still aren’t working right and all I get are the full list of manufacturers instead of just the ones that match the products. I obviously have something more to do and haven’t figured this out yet.



I might switch the code back to the way Sno made if for now and just test this on my local machine. I probably should have done this from the get go, but I thought this would be easy and I wouldn’t have any problems.



Brandon

What is the proper edit of the block to make it a drop-down? Can’t figure that part out now.

Roban,



I am trying to create this for my site, and have checked you site…are you aware that it is not working in FF2.00.2? Seems to work in IE7 though.



Also, how is your block set up, I am having no luck with this.



Thank you

Walter

No, I wasn’t aware that it wasn’t working in FF2. I know it works in FF3.5. Unfortunately for me, I wouldn’t have any clue on how to make this work for a browser that it isn’t working in.



I still am not sure exactly everything about the manufacturers. For some reason no matter how I set up the filters I still can’t get them to work with the manufacturers. Oh well I’ll keep trying.



This is how I have my manufacturers block set up:







I hope this helps,



Brandon

Thanks for this Sno!!



The drop down works as a manual filter (Manufacturer) but here is the problem : if you set another Dynamic filter (to include all the fiters, price, etc…), the Manufacturer filter shows there too.



How can I hide the Manufacturer from showing in the Dynamic filter?



Please see screenshots.



Can somebody help me filter out the Manufacturer’s from the Dynamic Filter?

Image 10.png

Image 14.png

How do you get this to show up after replacing the file?

[quote name=‘gugga7’]Thanks for this Sno!!



The drop down works as a manual filter (Manufacturer) but here is the problem : if you set another Dynamic filter (to include all the fiters, price, etc…), the Manufacturer filter shows there too.



How can I hide the Manufacturer from showing in the Dynamic filter?



Please see screenshots.



Can somebody help me filter out the Manufacturer’s from the Dynamic Filter?[/quote]



Sure no problem, this mod has been updated to 2.1.1 compatibility and works with the new fn_url seo functionality:



OPEN…schemas/block_manager/structure.php





FIND ~line 425 :


'blocks/product_filters_extended.tpl' => array (
'conditions' => array (
'fillings' => array ('filters')
)
)




REPLACE WITH:


'blocks/product_filters_extended.tpl' => array (
'conditions' => array (
'fillings' => array ('filters')
),
),
'blocks/product_filters_pulldown.tpl' => array (
'conditions' => array (
'fillings' => array ('filters')
)
)
PASTE BELOW CODE INTO A NEW FILE NAMED: [COLOR=Red]product_filters_pulldown.tpl[/COLOR]



PLACE FILE IN DIR…/skins/basic/customer/blocks/[COLOR=Red]product_filters_pulldown.tpl[/COLOR]


```php

{* $Id: product_filters_dropdown.tpl 6888 2009-02-06 14:39:39Z snorocket $ }

{
* block-description:pulldown **}



{if $items}

{assign var=“fh” value=$smarty.request.features_hash}

{/if}





- Select Manufacturer -
{foreach from=$items item="filter" name="filters"}
{foreach from=$filter.ranges name="ranges" item="range"}
{$range.range_name|fn_text_placeholders}
{/foreach}
{/foreach}


```[B]

CREATE NEW LANGUAGE VARIABLE:[/B]
Variable= pulldown
Value = Pull Down

[B]*NOTE:[/B] You can manually change [B][COLOR=Red]- Select Manufacturer -[/COLOR][/B] in product_filters_pulldown.tpl

sno i uploaded those and did the language add i dont see where to make this visible or change the currnet setting to the pulldown.

I’ve got “Pull Down” under “Standard side box” but not available under the “Product filters” area.



Anyone know why? I’ve gone backwards and forwards through the provided code and can’t seem to figure it out.

Same here, got the word Pull Down under standard Sideboxes (within Block content) but nothing under apearance.



Cheers for the help

Alf

Ok I managed to get it working but in a slightly different way,



I managed to get it to work by adding the code below to my product_filters_extended.tpl



This is a copy of my product_filters_extended.tpl (note the code at the very bottom, this is where the drop down menu bit happens)




```php {* $Id: product_filters.tpl 6888 2009-02-06 14:39:39Z angel $ }

{
* block-description:extended **}



{if $items}



{if $smarty.server.QUERY_STRING}

{assign var=“filter_qstring” value=$config.current_url|fn_query_remove:“result_ids”:“filter_id”:“view_all”:“req_range_id”:“advanced_filter”:“features_hash”:“subcats”:“variant_id”}

{else}

{assign var=“filter_qstring” value=“$index_script?dispatch=products.search”}

{/if}



{assign var=“reset_qstring” value=$filter_qstring}



{if $smarty.request.category_id}

{assign var=“filter_qstring” value=“$filter_qstring&subcats=Y”}

{if $settings.General.show_products_from_subcategories == “Y”}

{assign var=“extra_query” value=“&subcats=Y”}

{assign var=“reset_qstring” value=“$reset_qstring&subcats=Y”}

{/if}

{/if}

{*

{assign var=“fh” value=$smarty.request.features_hash}

{foreach from=$items item=“filter” name=“filters”}


    {foreach from=$filter.ranges name="ranges" item="range"}

  • {strip}
    {if $range.selected == true}
    {$range.range_name|fn_text_placeholders}
    {else}
    {$range.range_name|fn_text_placeholders}
    {/if}
    {/strip}

  • {/foreach}

{/foreach}
*}
{/if}








- Select Manufacturer -
{foreach from=$items item="filter" name="filters"}
{foreach from=$filter.ranges name="ranges" item="range"}
{$range.range_name|fn_text_placeholders}
{/foreach}
{/foreach}

```

I had another issue in that I had no SEO URLS, turns out that the offending line was:

```php {$range.range_name|fn_text_placeholders} ```

I just replaced it with this line


```php {$range.range_name|fn_text_placeholders}
```

My block is set up like this using the extended option and not the new Pull Down option (that did not work):

Block content: Product filters
Filling: Filters

Specific settings
Show: Manufacturers
Group: Right Column
Appearance type: Extended
Wrapper: .your wrapper


Thanks to Snow for all the information, although I didn't get it working using the exact method described in this thread, using a few different posts from him and playing about with the code I managed to get it to work.