Add Categories Dropdown To Search Box

hello,

anyone have a clue how to start or have an idea how to make this.

such idea was in the old version 2x version of cs cart....

regards

džemal

Try to create the following file:

/design/themes/YOUR_THEME/templates/addons/my_changes/hooks/search/additional_fields.pre.tpl

with this content:

{* dont delete this div. its really needed! *} {assign var="all_categories" value=0|fn_get_plain_categories_tree:false} - {__("all_categories")} - {foreach from=$all_categories item="cat"} {$cat.category|escape|truncate:50:"...":true|indent:$cat.level:"¦    ":"¦-- " nofilter} {/foreach}

Note:

- the My changes module should be activated

- cache should be cleared

- additional CSS changes may be required

Try to create the following file:

/design/themes/YOUR_THEME/templates/addons/my_changes/hooks/search/additional_fields.pre.tpl

with this content:

{* dont delete this div. its really needed! *} {assign var="all_categories" value=0|fn_get_plain_categories_tree:false} - {__("all_categories")} - {foreach from=$all_categories item="cat"} {$cat.category|escape|truncate:50:"...":true|indent:$cat.level:"¦    ":"¦-- " nofilter} {/foreach}

Note:

- the My changes module should be activated

- cache should be cleared

- additional CSS changes may be required

thank you for quick response.

have tried as instructed above and it's not showing on 4.3.5.

maybee some css is needed to get it positioned properly

Stucked.hope someone has used similar solution

thank you for quick response.

have tried as instructed above and it's not showing on 4.3.5.

maybee some css is needed to get it positioned properly

Works for me:

http://prntscr.com/9y3j5b

Hm… i was using chrome will check other browsers or try to m8ve it somewhere visible

yes. you're right. i had a mistype error. got it showing.

thank you

playing currently with css

https://drive.google.com/file/d/0B4wkwfPFu50ZUFd5NWQwTW55cVk/view?usp=drivesdk

I have replaced the ty-float-left with

Thank you for sharing this information

If I want to place the 'Brands' in that dropdown? Exist the odd to do that? :)

We failed to find such a module in the marketplace. Additional code modifications are requried

playing currently with css

https://drive.google.com/file/d/0B4wkwfPFu50ZUFd5NWQwTW55cVk/view?usp=drivesdk

I have replaced the ty-float-left with

i am trying to get the category drop down in line as the search bar (as in your pic) but i am not able to. can you please guide how you achieved this.

Hi,

This works for me,

However the the results page doesn't update accordingly,

Any ideas? 4.1.5

Stephen

Hi,

This works for me,

However the the results page doesn't update accordingly,

Any ideas? 4.1.5

Stephen

Please share or PM me URL of your website

Just to add, we figured the issue we were having, it was the "Live Search" addon from Cart Power - it doesnt take the parameter of catagory when the pages are cached, disabling this addon fixes this, have informed the developer of my findings...

Try to create the following file:

/design/themes/YOUR_THEME/templates/addons/my_changes/hooks/search/additional_fields.pre.tpl

with this content:

{* dont delete this div. its really needed! *} {assign var="all_categories" value=0|fn_get_plain_categories_tree:false} - {__("all_categories")} - {foreach from=$all_categories item="cat"} {$cat.category|escape|truncate:50:"...":true|indent:$cat.level:"¦    ":"¦-- " nofilter} {/foreach}

Note:

- the My changes module should be activated

- cache should be cleared

- additional CSS changes may be required

Hello,

It also worked for me

but i want only first level categories to show

don't know how ... :(

i have tried to play with the code but it was not worth

Please suggest me with the solution

Thanks in advance

Please try

{* dont delete this div. its really needed! *} {assign var="all_categories" value=0|fn_get_plain_categories_tree:false} - {__("all_categories")} - {foreach from=$all_categories item="cat"} {if $cat.level == 1} {$cat.category|escape|truncate:50:"...":true|indent:$cat.level:"¦    ":"¦-- " nofilter} {/if} {/foreach}

hi i'm show category and sub-ctaegory and sub sub-category to

  • not show to

    for example :

    
    
    • All category
    • cat 1
    • cat 2
      • sub 1
      • sub 2
    • cat 3
      • sub 1
        • sub sub 1
        • sub sub 2
      • sub 2

    please help me

deleted

Hi, is this still working on the last update?