![]() |
Unique menu for each category |
Post Reply ![]() |
Page 12> |
Author | |
caughlan ![]() Groupie ![]() ![]() Joined: 25-September-2006 Location: Canada Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() Posted: 08-May-2008 at 8:19pm |
i.e. headerA.asp if category 4, headerB.asp if category 5 etc, header.asp if not a category at all... does anyone know the code i would use to do that? for example: http://store.crabtree-evelyn.com/bath-and-body.html Edited by caughlan - 10-May-2008 at 7:15pm |
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
I'd probably look at examining the category ID and using a IF/ELSE ASP statements to implement what you have in mind.
|
|
![]() |
|
caughlan ![]() Groupie ![]() ![]() Joined: 25-September-2006 Location: Canada Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
That's exactly what I mean, but i don't know how to write code for it...
|
|
![]() |
|
caughlan ![]() Groupie ![]() ![]() Joined: 25-September-2006 Location: Canada Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
What about modifying the following code to give me unique menus for pre-determined categories (I hard-code my category menus):
<%if session("customerType")="1" then%> <!--#include file="inc_WholeSaleCatMenu.inc"--> <%else%> <!--#include file="inc_RetailCatMenu.inc"--> <%end if%> Can anyone tell me how to ask for a unique menu for my idCategories and still have the above code work for calling the wholesale menu? |
|
![]() |
|
Hamish ![]() Admin Group ![]() Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
![]() ![]() ![]() ![]() ![]() |
We did something similar for a site - but it was part of a slightly bigger change.
We had a single product we needed to use a variation on ConfigurePrd as well as a different header. In this case we created a copy of configurePrd under a different name and amended the menu to pint to the revised code for those products. Within the amended copy of the configurePrd code we then also included a different Header file. In this particular case we didn't use any ASP code to switch to the different version, but that would also have been a viable and workable approach. |
|
![]() |
|
caughlan ![]() Groupie ![]() ![]() Joined: 25-September-2006 Location: Canada Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Thanks Hamish that might work - I could make the main navigation at the top call on unique viewCategories files which in turn point to unique header files each with its own left side navigation. phew...
It might mean creating quite a few extra files... but if no one knows how to help me write the ASP code to switch it, I might have to do that. Stacelynn |
|
![]() |
|
Hamish ![]() Admin Group ![]() Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
![]() ![]() ![]() ![]() ![]() |
Hi Caughlan,
We only went this route because we wanted both the page content and the header to be different for a single category. I was thinking that the best place to do this is where the header.asp is called and use If/else or case BUT... header.asp is called from many many places. What do you want to be different in the headers? It may well be simpler in the short term and easier to maintain in the long term if you build a version of header.asp that can take account of the categories. Edited by Hamish - 10-May-2008 at 5:23am |
|
![]() |
|
caughlan ![]() Groupie ![]() ![]() Joined: 25-September-2006 Location: Canada Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Hi Hamish - You're right, that would be quite a mess if the header is called from different spots!
I just want the left menu to change based on the category you're in. Seemed like a simple idea So in my earlier post with the code that calls the menus, I thought it could be done here with a simple call for a new menu for each idcategory that i would specify. That would have avoided touching the header.asp completely. But I don't know how to write code so i have no idea if it would work anyway. On another note: This forum seems to be a place where developers-for-hire lurk and jump when they sense someone might hire them. I'm surprised at the private emails I've gotten where I've been told they have the solution, but it will cost me. I participate in many forums and this one is the worst for that... stacelynn |
|
![]() |
|
ProductCart ![]() Admin Group ![]() ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
![]() ![]() ![]() ![]() ![]() |
We added an article to the ProductCart WIKI since other customers might find this information helpful: http://wiki.earlyimpact.com/how_to/display_different_content_category
We're counting on the WIKI becoming a true encyclopedia of everything about ProductCart. We'll need everyone's contribution to make that happen! For now, it's still a work in progress. |
|
![]() |
|
Hamish ![]() Admin Group ![]() Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Wow - just been overtaken by event's then - Well done EA ![]() Anyway - For your specific circumstances - I'm sure the code is straight forward, but probably I would use a case statement. Firstly, what are you trying to achieve with the different menus? It seems an unusual thing to do as usually it's best to leave the customer with the same menu so they feel they can find their way easily so I'd like to understand so I can give the right advice. It MAY be that the dynamic menus available from the WIKI http://wiki.earlyimpact.com/how_to/add_category_navigation will meet your needs - but I suspect it may not. |
|
![]() |
Post Reply ![]() |
Page 12> |
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |