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

PS3 New Product results Page for each Category

Thread began 1/06/2011 11:17 am by nancy268153 | Last modified 3/27/2012 10:18 am by Jason Byrnes | 2923 views | 15 replies |

nancy268153

PS3 New Product results Page for each Category

In PS3 I have created a few new pages which are simply copies of Products_Results.php with new names and no other changes yet. My purpose is to have 1 permanent (static?) page with lots of keywords, the correct name and title/ meta tags for each of my categories (SEO friendly).
I would like to have the correct respective product results show up beneath my blurb on each of these pages.
Now, I have to fix both the left and the top menus to point to these new pages. I would like to have the user land on different results pages depending on which category they click on but I'm not sure how to do that.
Can anyone point me in the right direction? thank you.
Nancy

Sign in to reply to this post

Jason ByrnesWebAssist

the categfory that is displayed is taken ffrom the querystring.


for example:
products_results.php?Search=1&ProductCategoryID[]=3

loads category id 3


you will need to know the id for the category and set the querystring to include it.

In my test store, id 3 is CDs, so i could duplicate the product result page as:
cds.php and call it as:
cds.php?Search=1&ProductCategoryID[]=3

to load the proper category.

Sign in to reply to this post

nancy268153

That makes sense but I'm ashamed to say that I don't know where to change it. I would like to be able to use the built in menus at the top and left navigation. Can I make it so that when I click on a category or sub category in the current menu (top and / or left) I go to one of my new pages? and these pages would, then, show the correct results. Perhaps I have not understood your answer? sorry but I cannot think what to do with the info :confused:.
BTW I am using Powerstore 3. Not 4 (in case that make a difference).

Sign in to reply to this post

Jason ByrnesWebAssist

the top and left menus are created dynamically. modifying this to work the way you want will require some hand editing.


the top menu is generated by the CSSMenuWriter/css_home/menu.php


the category links are created by this code:

php:
<a href="<?php echo($assumedRoot); ?>Products_Results.php?Search=1&ProductCategoryID[]=<?php echo $row_menuwriter_categories["CategoryID"]; ?>"><?php echo $row_menuwriter_categories["CategoryName"]; ?></a>



if you named your results pages the same as the category name, substituting underscores for spaces, and made sure to use only alpha numeric characters, you could change this code to:

php:
<a href="<?php echo($assumedRoot); ?><?php echo str_replace(" ""_"$row_menuwriter_categories["CategoryName"]); ?>.php?Search=1&ProductCategoryID[]=<?php echo $row_menuwriter_categories["CategoryID"]; ?>"><?php echo $row_menuwriter_categories["CategoryName"]; ?></a>




for the left menu, you would need to edit the templates/main.dwt.php page.

edit the followong code:

php:
$retHTML .= '   <div class="AccordionPanelTab" onclick="doHighlighlight(this);updateContant(\'Products_Results.php?Search=1&ProductCategoryID[]='.$row_SubCategoryList["CategoryID"].'\')">'.(($prevLevels>0)?substr($spaceStr,0,12*$prevLevels):'') .$row_SubCategoryList["CategoryName"].'</div>' . "\n";



to:

php:
$retHTML .= '   <div class="AccordionPanelTab" onclick="doHighlighlight(this);updateContant(\''.str_replace(' ', '_', $row_SubCategoryList["CategoryName"]).'.php?Search=1&ProductCategoryID[]='.$row_SubCategoryList["CategoryID"].'\')">'.(($prevLevels>0)?substr($spaceStr,0,12*$prevLevels):'') .$row_SubCategoryList["CategoryName"].'</div>' . "\n";
Sign in to reply to this post

nancy268153

WOW Horray! it worked with the top navigation but
Not with the accordion panel in the left nav. I did find the code and did the replace but the events triggered by clicking on a category in the left nav have not changed. :(
any other ideas?
-aside question; is the page name supposed to stay at whatever page the user was on when they 1st clicked on a category in the side nav?
Nancy

Sign in to reply to this post

Jason ByrnesWebAssist

please post a link

Sign in to reply to this post

nancy268153

my website is

index.php

thanks!

Originally Said By: Jason Byrnes
  please post a link  
Sign in to reply to this post

Jason ByrnesWebAssist

after editing the template, you need to apply the changes to the pages based on the template.


for this to work, your Dreamweaver site needs to be configured so that the powerstore files are at the root of the site.

Sign in to reply to this post

nancy268153

Right, :o
My copy of Dreamweaver is "touchy". I got them updated and uploaded.
Lots of progress has been made. Thanks so much!

  1. I see the results ! YIPPEE top Nav working exactly right.
  2. The side nav goes to my custom pages Handknits.php and Handspun_Yarn.php too now BUT when I click on the sub category I get a blank page


Sorry Jason, I changed this message as I figured out what I had done wrong ... I only need help with the last issue above now.
thanks so very much for your help,
Nancy

Figured this one out too. Please see next post.

Sign in to reply to this post

nancy268153

Hi again,

Can't stop playing with this.
I figured it out myself!

I thought I'd try making pages for all of the sub categories just in case that menu was looking for them and Abracadabra - it worked.:eek:

So I guess the code that we replaced in the left side navigation made it look for a page with the category name for all of the sub categories as well as just the main ones which is actually just fine. Now I can put more "stuff" on each of these new static pages.
I'm a happy camper. thanks a big bunch.

ONE MORE QUESTION: Would it be possible to get the Top Navigation menu to get my sub category special pages also? right now it will point to the main category special pages but when clicking on sub categories it will revert to original behavior.

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...