Thanks for the code, guys.
I noticed it was made for people who don't call shoppageheader from shopexd. For those who use the shoppageheader on their extended description pages, here's a sample of what you might want to try doing to the code:
<%
SCRIPT_NAME = Request.ServerVariables("SCRIPT_NAME")
' ------------------------------------- debugging and testing
'response.write(right(SCRIPT_NAME,12))
'response.write("<br>" & PageTitle)
' ----------------------------- deleted and logic moved to a Case
' ----------------------------- statement below.
'if PageTitle <> "" Then
Select Case right(SCRIPT_NAME,12) ' -------------- get 12 right most
' ------------------------------------------------ values only.
Case "products.asp"
if Request.QueryString("cat") <> "" then
PageTitle = Request.QueryString("cat") & " - yourshop.com"
else
PageTitle = "Products - yourshop.com" ' ------ eg for searches
end if
Case "tegories.asp"
PageTitle = Request.QueryString("cat") & " - yourshop.com"
Case "ddtocart.asp"
PageTitle = "Your Shopping Cart - yourshop.com"
'--------------------- changed some of the headings to suit my shop
Case "customer.asp"
PageTitle = "Checkout Step 1 of 3: Delivery Address - yourshop.com"
Case "ateorder.asp"
PageTitle = "Checkout Step 2 of 3: Order Details - yourshop.com"
Case "checkout.asp"
PageTitle = "Checkout Step 3 of 3: Payment Details - yourshop.com"
Case "opthanks.asp"
PageTitle = "Thankyou for Your Order - yourshop.com"
Case "/shopexd.asp"
PageTitle=PageTitle ' ----------------------------------------- dummy
Case Else
PageTitle = "yourshop.com"
End Select
' ----------------------------- deleted
'End If
%>
<title><% =PageTitle %></title>
You'll notice a couple of other changes I made there. You just have to make sure that you call shopdisplayheader *after* this line in shopexd:
OpenRecordSet tmpRS
You still have to insert the other line (PageTitle=rs.fields("cname") & " - YourStore.com"
) into shopexd.
You'll notice I only look at the last 12 characters of the filename. This is a hack because I don't know exactly what directory structure I'll have when my site goes live, whether everything will be in the root directory or a shopping directory or what. crude but it works.
JL