Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Different Header / Menu Within Single Site
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jazzbrew
Starting Member

14 Posts

Posted - May 27 2014 :  16:24:45  Show Profile  Reply with Quote
I am working on a site for a client that is actually two sites but the URLs redirect to a different home page.

I''d like to have the sites share a database and checkout but I want the correct menus to show for each site depending on the products selected.

Here is the first site: http://www.safiskincare.com
This site works fine with regards to menu, headers, etc.

The second site is: http://www.safisignature.com

This site works fine unless you click on the products for details. It pulls the menus from the first site.

I tried using a querystring to pass the site name to each page and then use asp to load the correct header/menu. The problem is the tmp-productformat.htm file won''t allow asp coding for me to make that determination.

Sorry so long winded. Is there a better way to do this? For an example of how this should work check out www.gap.com. Different sub sites share on shopping cart.

pdieppa
VP-CART New User

USA
86 Posts

Posted - May 28 2014 :  13:04:40  Show Profile  Reply with Quote
Hi Jazzbrew

Why don''t you add your logic to the shoppage_header.htm template?

This page usually controls the header of all the pages in the cart.

You can use server side scripting to query the address and show a different header based on safisignature.com instead of safiskincare.com

PD


Go to Top of Page

pdieppa
VP-CART New User

USA
86 Posts

Posted - May 28 2014 :  13:17:54  Show Profile  Reply with Quote
You could use a simple script like this inside shoppage_header.htm

<%
Dim urlStr
urlStr = MID(Request.ServerVariables("HTTP_HOST"),5,21)
if urlStr = "safisignature.com" then %>
'' show signature header here

<% else
'' Show safiskincare header
end if
%>
Go to Top of Page

jazzbrew
Starting Member

14 Posts

Posted - May 28 2014 :  13:18:11  Show Profile  Reply with Quote
Hey PD,

Unless I''m missing something I''m able to add server side script to files with an HTM extension. If you can point me to how I can do that without changing the extension that would be exactly what I need. I already have asp code written that would work I just don''t know how to call it or use it in that shoppage_header.htm file.

My asp coding is really rusty so hopefully it is just a matter of my memory being refreshed.

Thanks for the reply!!
Go to Top of Page

jazzbrew
Starting Member

14 Posts

Posted - May 28 2014 :  13:19:39  Show Profile  Reply with Quote
Disregard my response... let me try that. It looks like it would work perfectly.
Go to Top of Page

jazzbrew
Starting Member

14 Posts

Posted - May 28 2014 :  13:37:44  Show Profile  Reply with Quote
It appears that whomever worked on this site before me - coded the pages to not use the shoppage_header.htm file. Where can I change it or update it so that it does? I do believe this is the perfect solution to this issue. I also need different menus for each and this could also be handled via the header file.
Go to Top of Page

pdieppa
VP-CART New User

USA
86 Posts

Posted - May 28 2014 :  16:03:44  Show Profile  Reply with Quote
Hmmm, that''s tough without having access to the site. Open ShopDisplayCategories.asp and check the top area to see if you can find where the header starts. On mine, line 83 is set to display the header as ShopPageHeader.

It would be something like this: my code starts at line 79.


InitializeSystem
CheckDatabaseOpen dbc
ycatmaxcolumns = clng(GetConfig("xcatmaxcolumns"))
SetupdynamicCategory dbc, highercategoryid
ShopPageHeader <--This calls the function to build the header.
CategoryHeader
ShowCategories
ShopPageTrailer
ShopCloseDatabase dbc
session("seocategoryname") = ""
Go to Top of Page

jazzbrew
Starting Member

14 Posts

Posted - May 29 2014 :  13:34:04  Show Profile  Reply with Quote
I''m still trying to figure this out... where or what file determines the default header to be used in the shop? If I can find that file I''m hoping I can plug in logic to load the correct headers. So far I''ve looked at:

shoppage_header.asp
shoppage_header.htm

Making any changes to these pages do not alter the header of my site.

Thanks again for any help.
Go to Top of Page

g3nnin
VP-CART Super User

209 Posts

Posted - May 29 2014 :  13:40:49  Show Profile  Reply with Quote
Hi,

I recommend to check shopheaders.asp file. Check both ShopFrontPageHeader and ShopPageHeader sub-routines.

Hope this helps!
Go to Top of Page

pdieppa
VP-CART New User

USA
86 Posts

Posted - May 31 2014 :  16:50:06  Show Profile  Reply with Quote
Good call g3nnin

jazzbrew, here is the default code for one of the routines

sub ShopFrontPageHeader
if GetConfig("xaffheaders")="Yes" then
dim filename, affid, rc
affid=GetSess("affid")
if affid<>"" then
filename=xMySite2 & "/templates/" & getconfig("xtemplate") & "/aff" & affid &"_header.htm"
Shopspecialheader filename, rc
if rc=0 then exit sub
end if
end if

Compare it with yours. Maybe they changed the "_header.html" section to point to a different file.

PD
Go to Top of Page

jazzbrew
Starting Member

14 Posts

Posted - June 04 2014 :  06:50:52  Show Profile  Reply with Quote
quote:
Originally posted by pdieppa

You could use a simple script like this inside shoppage_header.htm

<%
Dim urlStr
urlStr = MID(Request.ServerVariables("HTTP_HOST"),5,21)
if urlStr = "safisignature.com" then %>
'' show signature header here

<% else
'' Show safiskincare header
end if
%>



This really looks like the best solution for what I''m trying to do. The problem is the ServerVariable HTTP_HOST always returns the same value for the site. I''m guessing this is because they are using masking to redirect one of the URLs. Is there a way to pull that masked URL or at least determine if the two are different? This would put this issue to bed immediately.

Thanks to everyone for your help here. I feel I am close to a solution if I can nail this down.
Go to Top of Page

pdieppa
VP-CART New User

USA
86 Posts

Posted - June 25 2014 :  11:31:05  Show Profile  Reply with Quote
Sorry Jazzbrew I was away from the forum for the past few weeks. I checked the website and looks like you got it working properly!

PD
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00