Forums / Templates, Stylesheets, Page Layout / Advanced Search Question (limit to category box)

Advanced Search Question (limit to category box)

Views: 5,563

Results 1 to 20 of 62
10 Dec 2011, 6:25 PM
#1
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Advanced Search Question (limit to category box)

Hello,

I have a slight error in my store somewhere that i can't figure out - when you go to advanced search the Limit to Category box has one of the categories in it - i would like it to default to All Categories.

Where do i change that?

link to the site is wwwDOTlimelightproductsDOTnet/index.php?main_page=advanced_search

11 Dec 2011, 12:18 AM
#2
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

It is an inherited behavior of the template you are using and not the normal behavior of zen cart.

Delete the tpl_advanced_search_default.php from your template/templates and let the one out of template_default take over and the issue should take care of itself.


Play with it long enough and you will break it.
11 Dec 2011, 1:52 AM
#3
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

OK that doesn't make any difference - i'm pretty sure it must be something to do with HideCategories that i installed it started happening after that!!

But i have no idea where to start looking!!:frusty:

Any help appreciated!

11 Dec 2011, 2:52 AM
#4
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

I just downloaded that add on and in your instructions it says

Folders can either be hidden from the main menu (sidebox and main page) or you can go a step further and hide them from All Products, New Products, Featured Products, Advanced Search, and Best Sellers as well.

Can you log into admin and unhide it from advanced search?

The default is down to the last category instead of the top which is all.


Play with it long enough and you will break it.
11 Dec 2011, 1:09 PM
#5
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

usernamenone:

I just downloaded that add on and in your instructions it says

Folders can either be hidden from the main menu (sidebox and main page) or you can go a step further and hide them from All Products, New Products, Featured Products, Advanced Search, and Best Sellers as well.

Can you log into admin and unhide it from advanced search?

The default is down to the last category instead of the top which is all.

Doesn't make any difference:no:

Does anyone know what i need to search for to edit the default value for that drop down box?? It must be an easy fix because this is ZenCart but where abouts do i find it??

11 Dec 2011, 2:40 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Advanced Search Question (limit to category box)

What happens if you turn off the SEO/rewrites?

What happens if you switch to the Classic Template?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Dec 2011, 5:17 PM
#7
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

Ajeh:

What happens if you turn off the SEO/rewrites?

What happens if you switch to the Classic Template?

SEO - makes no difference

Classic template fixes the problem! so it is something to do with my template but not the tpl_advanced_search_default.php as i replaced the one in my template with the default and it made no difference!

I have another problem i have just found! the login page has quit working - when i enter my login info as a customer it just refreshes the page but doesn't log me in. If i add something to the cart and then checkout - the small login page shows up and logs u in fine!!!

11 Dec 2011, 5:24 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Advanced Search Question (limit to category box)

I would turn off the SEO/rewrites and work on fixing these issues ...

I really cannot test anything as your site is down for maintenance ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Dec 2011, 5:27 PM
#9
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

Ajeh:

I would turn off the SEO/rewrites and work on fixing these issues ...

I really cannot test anything as your site is down for maintenance ...

Ok I turned SEO off

Turned down from maintenance off......

Both errors are confusing me completely!!!:frusty:

11 Dec 2011, 5:46 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Advanced Search Question (limit to category box)

Can you look at the file:
/includes/modules/pages/advanced_search/header_php.php

What do you see on the file for:

  $sData['categories_id'] = (isset($_GET['categories_id'])    ? zen_output_string((int)$_GET['categories_id']) : 0);

is that set to 0?

Can you edit the file:
/includes/templates/template_dir/common/tpl_main_page.php

and under the <body add the line:

<?php echo 'I SEE: ' . $_GET['categories_id']; ?>

I just want to see what it thinks that value is when on the Advanced search

NOTE: if you have that file in your templates and overrides, then edit that one ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Dec 2011, 5:47 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Advanced Search Question (limit to category box)

NOTE: I have no issues logging in with any browser ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Dec 2011, 6:32 PM
#12
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

Ajeh:

Can you look at the file:
/includes/modules/pages/advanced_search/header_php.php

What do you see on the file for:

$sData['categories_id'] = (isset($_GET['categories_id']) ? zen_output_string((int)$_GET['categories_id']) : 0);

> 
> is that set to 0?
> 
> Can you edit the file:
> /includes/templates/template_dir/common/tpl_main_page.php
> 
> and under the <body add the line:
> ```
<?php echo 'I SEE: ' . $_GET['categories_id']; ?>

I just want to see what it thinks that value is when on the Advanced search

NOTE: if you have that file in your templates and overrides, then edit that one ...

First answer is yes it is set to 0

I have edited as you said on the second and the I SEE Value is blank!!!???!?!?!?!?!?!?

11 Dec 2011, 6:43 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Advanced Search Question (limit to category box)

Edit your tpl_advanced_search_result.php

and add this piece of code to test:

<fieldset class="floatingBox back">
    <legend><?php echo ENTRY_CATEGORIES; ?></legend>
    <div class="floatLeft"><?php echo zen_draw_pull_down_menu('categories_id', zen_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)), '0' ,'', '1'), $sData['categories_id']); ?></div>
<?php echo zen_draw_checkbox_field('inc_subcat', '1', $sData['inc_subcat'], 'id="inc-subcat"'); ?><label class="checkboxLabel" for="inc-subcat"><?php echo ENTRY_INCLUDE_SUBCATEGORIES; ?></label>
<br class="clearBoth" />
</fieldset>
<?php echo 'What sdata: ' . $sData['categories_id']; ?>

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Dec 2011, 9:39 PM
#14
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

Ajeh:

Edit your tpl_advanced_search_result.php

and add this piece of code to test:

<fieldset class="floatingBox back"> <legend><?php echo ENTRY_CATEGORIES; ?></legend> <div class="floatLeft"><?php echo zen_draw_pull_down_menu('categories_id', zen_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)), '0' ,'', '1'), $sData['categories_id']); ?></div> <?php echo zen_draw_checkbox_field('inc_subcat', '1', $sData['inc_subcat'], 'id="inc-subcat"'); ?><label class="checkboxLabel" for="inc-subcat"><?php echo ENTRY_INCLUDE_SUBCATEGORIES; ?></label> <br class="clearBoth" /> </fieldset> <?php echo 'What sdata: ' . $sData['categories_id']; ?> ```

OK done that.....

11 Dec 2011, 10:05 PM
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Advanced Search Question (limit to category box)

This is not making a lot of sense how things are working ...

If you look in phpMyAdmin in the table:
categories

do you have any categories_id for 0?

If you look in phpMyAdmin in the table:
categories_description

do you have any categories_id for 0?

Do you have any Categories that hold both Products and Categories?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Dec 2011, 12:14 AM
#16
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

Ajeh:

This is not making a lot of sense how things are working ...

If you look in phpMyAdmin in the table:
categories

do you have any categories_id for 0?

If you look in phpMyAdmin in the table:
categories_description

do you have any categories_id for 0?

Do you have any Categories that hold both Products and Categories?

NO

NO

Not that i can see - it doesn't like if you do that - i've got several categegories with sub categories and sub-sub categories!

12 Dec 2011, 1:31 AM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Advanced Search Question (limit to category box)

Without going through the files on your site, I am really not sure what is causing this ...

Those two tests I had you add to the files are coming up with nothing set so they should not be affecting your advanced search based on those values ...

Something else is causing this but I cannot pin point it ... :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Dec 2011, 4:28 AM
#18
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

Ok - will look at the mods i made in the last little while and work my way back! Process of elimination! :ohmy:

Any ideas on the login deal??

12 Dec 2011, 2:03 PM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Advanced Search Question (limit to category box)

Afraid not ... I have not had any login issues on your site ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Dec 2011, 2:20 PM
#20
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Re: Advanced Search Question (limit to category box)

Ajeh:

Afraid not ... I have not had any login issues on your site ...

:oops: It was my cache again!!! Cleared it and its fine!

Thanks for your help!