desperate for navcattabs help
Can someone please help me with big navigation errors on my website. I have tried posting in the add-on help discussion with no reply. I put on a mod to turn the nav cat tabs into a drop down menu. It was just a matter of adding styling to the tpl_modules_categories_tabs.php file. Since doing this the navigation is stuffed up, breadcrumbs have had to be switch off. If you browse around in a few categories, it will start not letting you go in to other categories. If you look at
Cat A - SubCat A - Product 1, then if you want to go back and look at SubCat B, you can't! Cat A will default to Subcat A.
PLEASE HELP! It wasn't much to edit so I can't have done much wrong, but not being an expert at this I don't know whats doing it.
My site link is here.
thanks :dontgetit
Re: desperate for navcattabs help
Quote:
Cat A - SubCat A - Product 1, then if you want to go back and look at SubCat B, you can't! Cat A will default to Subcat A.
What???
I do not know how to replicate what you have stated??
Re: desperate for navcattabs help
In Firefox and IE8, I have repeated alternating subcat selections a half-dozen or more times without encountering any problems. Can you give a specific example of a sequence that fails for you? How does it fail? Does the option to select a subcat disappear?
Re: desperate for navcattabs help
okay, this is a fault I get every time. On the menu I pick this sequence: "feeding", "bottles" "nuk", and then click on any product there. Then go back up to the menu and choose "feeding", "bottles", and instead of taking you back to bottles, it goes straight to "nuk". You can't go and choose a different category under bottles. Whichever brand you choose under bottles, it will default to that anytime after that you try to go to bottles.
Thats a quick error. I STILL haven't figured it out.
Re: desperate for navcattabs help
Everything works OK up to the product info page display. As you said, when you go back to the navigation and click the subcat again, it just appends the subcat id to whatever is there :
Feeding > Bottles and Cups > Nuk > Nuk 125ml bottle is
cpath=27_31_34&products_id=98
When you click from there on Bottles and Cups, instead of the correct cpath=27_31, it shows 27_31_34_31
I would guess some error in the code of that mod when handling ids.
If you activate the Categories sidebox does it work right there ?
Re: desperate for navcattabs help
Hi, I have tested it before by turning the nav cat tabs bar off, and just using the categories side box, and it goes fine. Its just the nav cat tabs bar I'm having the problem with. I could post the code here if anyone is better at coding than me (I'm useless:blush:)
Otherwise my only other solution is to put my own nav bar in there. I have one using html and javascript, it is on the main part of my website here, but not in the shopping cart as I was hoping to use the nav cat tabs bar to the same effect. Only trouble with that is, I don't know exactly where to put the table (html) and the javascript in the zen files.
Re: desperate for navcattabs help
Note the errors as shown in RED.
<php echo zen_ez_pages_link(ndex.php?main_page=contact_us); ?>
- need to fix or remove
<!--eof-header ezpage links-->
<!--bof-optional categories tabs navigation display-->
<style type="text/css">
- cannot have Style code within your Body, must be within the Header.
href="http://lefty.hosts.net.nz/~admin134/estore/index.php?main_page=index&cPath=65&zenid=pq5j1hfkdaj903tbaiovvj7532">Fitted Nappies</a></li><br /><li>
- you cannot hard code a 'zenid' into any URL
- you cannot use a <br /> inbetween li code
There are other errors as well but fixing the above should help to clear up your problems.
Re: desperate for navcattabs help
I thought I had removed that first one but must have backed up from an old file. Thats gone now.
The <style type="text/css"> in the mod is in the tpl_nav_cat_tabs file, to put that in the header should I put it in the styleheet instead?
I have not hardcoded any zen id into the links deliberately, it should be calling on the categories, I haven't coded it at all so I don't know why it would have done that.
This is what code is in the tpl_nav_cat_tabs.php (sorry to post code...
PHP Code:
<?php
if (CATEGORIES_TABS_STATUS == '1')
{
echo '<div id="navCatTabsWrapper">';
echo '<div id="navCatTabs">';
echo '<div id="navCatTabsDropdown">';
echo '<ul>';
$categories_tab_query = "SELECT c.categories_id, cd.categories_name FROM ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.categories_id=cd.categories_id AND c.parent_id= '0' AND cd.language_id='" . (int)$_SESSION['languages_id'] . "' AND c.categories_status='1' ORDER BY c.sort_order, cd.categories_name;";
$categories_tab = $db->Execute($categories_tab_query);
while (!$categories_tab->EOF)
{
// currently selected category
echo '<li>';
echo '<a class="category-top" href="'.zen_href_link(FILENAME_DEFAULT,'cPath=' . (int)$categories_tab->fields['categories_id']).'">';
if((int)$cPath == $categories_tab->fields['categories_id'])
echo '<span class="category-subs-selected">'.$categories_tab->fields['categories_name'].'</span>';
else
echo $categories_tab->fields['categories_name'];
echo '</a>';
$subcategories_tab_query="SELECT c.categories_id, cd.categories_name FROM ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.categories_id=cd.categories_id AND c.parent_id= '".(int)$categories_tab->fields['categories_id']."' AND cd.language_id='" . (int)$_SESSION['languages_id'] . "' AND c.categories_status='1' ORDER BY c.sort_order, cd.categories_name;";
$subcategories_tab=$db->Execute($subcategories_tab_query);
if($subcategories_tab->RecordCount()>0)
{
echo '<ul>';
while (!$subcategories_tab->EOF)
{
$cPath_new=zen_get_path($subcategories_tab->fields['categories_id']);
$cPath_new=str_replace('=0_', '=', $cPath_new);
echo '<li>'.'<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">'.$subcategories_tab->fields['categories_name'].'</a></li><br />';
$subcategories_tab->MoveNext();
}
echo '</ul>';
}
$products_tab_query="SELECT p.`products_id`, pd.`products_name`, pd.`language_id` FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.`master_categories_id`='".(int)$categories_tab->fields['categories_id']."' AND p.`products_id`=pd.`products_id` AND pd.`language_id`='".(int)$_SESSION['languages_id']."' ORDER BY p.`products_sort_order`;";
$products_tab=$db->Execute($products_tab_query);
if($products_tab->RecordCount()>0)
{
echo '<ul>';
while (!$products_tab->EOF)
{
$cPath_new=zen_get_path($categories->fields['categories_id']);
$cPath_new=str_replace('=0_', '=', $cPath_new);
echo '<li>'.'<a href="'.zen_href_link(zen_get_info_page($products_tab->fields['products_id']),$cPath_new. '&products_id=' . $products_tab->fields['products_id']) . '">'.$products_tab->fields['products_name'].'</a></li><br />';
$products_tab->MoveNext();
}
echo '</ul>';
}
echo '</li>';
$categories_tab->MoveNext();
}
echo '</ul>';
echo '</div>';
echo '</div>';
echo '</div>';
}
?>
Thanks for having a look.:bigups:
Re: desperate for navcattabs help
Putting the CSS code into a stylesheet would be good.
Your 'tpl_nav_cat_tabs.php' file shows '</a></li><br />' is used on two separate lines.
Also, the zenid only appears to stay if I browse the site with Javascript turned off; that's not right. The zenid is not attached by any JS methods.
What are your settings in Admin > Configuration > Sessions - you don't need to provide the Session Directory path, just the other info.
Finally, why are you using "http://lefty.hosts.net.nz/~admin134/" for your URL? Using a "~" is very insecure and will need to be changed at some point. For your benefit and your site Visitors, best to start using your Domain name and get a Dedicated SSL Cert, ASAP.
Re: desperate for navcattabs help
I have a SSL just have not installed it yet.
The settings you asked about is
Cookie Domain - True
Force Cookie Use - False
Check SSL Session ID - False
Check User Agent - False
Check IP Address - False
Prevent Spider Sessions - True
Recreate Session - True
IP to Host Conversion Status - true
"Your 'tpl_nav_cat_tabs.php' file shows '</a></li><br />' is used on two separate lines."
I didn't write this code, I gather that is to force a break, would you delete it or use <br class="clearBoth" /> instead?
I pasted the style code into the stylesheet and it didn't have the same look at all, but I'll give it another shot.