close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Side Navagation Bar

Thread began 8/17/2009 9:38 am by tamyala164613 | Last modified 12/20/2009 9:53 pm by Andre.M | 2847 views | 15 replies |

tamyala164613

Side Navagation Bar

I have noticed that the side navigation list continues to grow as I enter my products. My database is huge and I don't want that list to go on forever. Is there a way to only show categories on the side navigation?

Sign in to reply to this post

msjj000Beta Tester

Side Navigation Need

Hi WA,

Firstly - a great upgrade with the version 2 of PowerStore. The product variables were a great addition and are a help to reduce the number of products listed. I managed to get it localized and up and running for local country requirements utilizing all the same code changes from version one - keep it up!

I'd also like to utilize a cascading or collapsible/expandable side menu bar to only show categories and expand the selected category. Can you use the WA CSS menu writer to achieve this or alternatively can you assist with some php code? I've tried CSS menu writer in the past - simple to use; however it seems to muck up the predefined menu settings in place with the PowerStore. The site has grown from 7-10 categories to over 20 now and navigation the look and feel is getting messy withthe categories starting to stretch over a page.

Any advice would be great.

Thanks, Mark.

Sign in to reply to this post

Jason ByrnesWebAssist

tamyala164613:

The side navigation menu is created in the CSSmenuWriter/intermediate.php file. You could edit lines 12 - 46:

php:
<?php do { ?>

<?php
$catParam 
$row_ProductCategories['CategoryID'];
?>
<?php
$catParam_ProductMenu 
"0";
if (isset(
$catParam)) {
  
$catParam_ProductMenu = (get_magic_quotes_gpc()) ? $catParam addslashes($catParam);
}
mysql_select_db($database_localhost$localhost);
$query_ProductMenu sprintf("SELECT * FROM products WHERE ProductLive <> 0 AND COALESCE((SELECT GroupingID FROM productoptions WHERE productoptions.ProductID = products.ProductID LIMIT 1), ProductID) = ProductID AND ProductCategoryID = %s"GetSQLValueString($catParam_ProductMenu"int"));
$ProductMenu mysql_query($query_ProductMenu$localhost) or die(mysql_error());
$row_ProductMenu mysql_fetch_assoc($ProductMenu);
$totalRows_ProductMenu mysql_num_rows($ProductMenu);

$WA_localRoot "".$WAGLOBAL_localRoot"";
$WA_remoteRoot "".$WAGLOBAL_remoteRoot"";
$WA_curURL strtolower((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:"");
$assumedRoot $WA_remoteRoot;
if ((
strpos($WA_curURL,strtolower($WA_localRoot)) !== false && strpos($WA_curURL,strtolower($WA_localRoot)) == 0) && (strlen($WA_localRoot) >= strlen($WA_remoteRoot) || strpos($WA_curURL,strtolower($WA_localRoot)) === 0)) {
  
$assumedRoot $WA_localRoot;
}

?>
      <a href="<?php echo($assumedRoot); ?>Products_Results.php?Search=true&CategoryID=<?php print $row_ProductCategories['CategoryID']; ?>"><h2><?php print $row_ProductCategories['CategoryName']; ?></h2></a>
<ul >
  <?php do { ?>
      <?php if ($totalRows_ProductMenu 0) { // Show if recordset not empty ?>
  <li><span><a href="<?php echo($assumedRoot); ?>Products_Detail.php?ProductID=<?php echo $row_ProductMenu['ProductID']; ?>"><?php print $row_ProductMenu['ProductName']; ?></a></span></li>
  <?php // Show if recordset not empty ?>
<?php 
} while ($row_ProductMenu mysql_fetch_assoc($ProductMenu)); ?></ul>
<?php
mysql_free_result
($ProductMenu);
?>
<?php 
} while ($row_ProductCategories mysql_fetch_assoc($ProductCategories)); ?>





to:

php:
<?php do { ?>

<?php
$WA_localRoot 
"".$WAGLOBAL_localRoot"";
$WA_remoteRoot "".$WAGLOBAL_remoteRoot"";
$WA_curURL strtolower((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:"");
$assumedRoot $WA_remoteRoot;
if ((
strpos($WA_curURL,strtolower($WA_localRoot)) !== false && strpos($WA_curURL,strtolower($WA_localRoot)) == 0) && (strlen($WA_localRoot) >= strlen($WA_remoteRoot) || strpos($WA_curURL,strtolower($WA_localRoot)) === 0)) {
  
$assumedRoot $WA_localRoot;
}

?>
      <a href="<?php echo($assumedRoot); ?>Products_Results.php?Search=true&CategoryID=<?php print $row_ProductCategories['CategoryID']; ?>"><h2><?php print $row_ProductCategories['CategoryName']; ?></h2></a>
<?php } while ($row_ProductCategories mysql_fetch_assoc($ProductCategories)); ?>



in order to only show the categories.

--
uberbean:

It will require hand coding to create a collapsible or expandable menu for the product categories. unfortunately, we cannot offer support for this.

Sign in to reply to this post

jazzman247315378

tamyala, did you get the results you were expecting this fix? I am considering the same thing, but would like to hear from someone who has tried it.

Sign in to reply to this post

msjj000Beta Tester

Yep - fixed - worked well

Hi,
I tried it adn it worked well - thanks Jason.
I also aligned the titles to the left hand side. centred looks better with the inventory items but when they are taken away it looks messy.
UB

Sign in to reply to this post

tamyala164613

Results

Originally Said By: jazzman247315378
  tamyala, did you get the results you were expecting this fix? I am considering the same thing, but would like to hear from someone who has tried it.  



Yes, this did work. Only the links to each category are shown. When you click the category link then the products for that category are shown.

Sign in to reply to this post

mick106153

I tried the tweak as well and didn't like the results.
What I did instead was to play with the css to trim down the look and feel.
Still experimenting and looking forward to an accordion of some sort.

intuHorsesPowerStore/

Mick

Sign in to reply to this post

Ray BorduinWebAssist

We will try to address some of these issues in the next update to the powerstore. Thank you for the feedback.

Sign in to reply to this post

denise234045

Similar Side Nav Question

I'm going to change the php to show the categories only as well - far too many products - but is there also a way to show only the categories, EXCEPT when you are in a specific category section and then list those products that are in the category a user is in?

So,

Category 1

Category 2

Category 3
product1
product 2
product 3

Category 4

Sign in to reply to this post

Ray BorduinWebAssist

You can do anything you want if you are familiar with php and aren't afraid to get your hands dirty. This isn't a configurable option in the globals.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...