VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Got it! Use different templates on pages!
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

United Kingdom
11 Posts

Posted - February 26 2004 :  04:08:19  Show Profile  Visit webpro's Homepage  Reply with Quote
I've been working on a few VP projects - and have wanted the flexibility to use different header/trailer templates on different pages - i.e. on the products page, cart page, and on different bespoke pages.

How it's done:

1. Open shopheaders.asp and add a new sub - e.g:

Sub ShopPageTrailer2
<!-- #include file="shoppage_trailer32.asp" -->
end sub

(note - ShopPageTrailer2)

2. On the page - i.e. shopaddtocart.asp

Locate the sub that loads the header/trailer :-

' Sub display form
Sub DisplayForm()
If Serror<>"" then
shopwriteerror serror
end if
arrCart = GetSessA("CartArray")
scartItem = GetSess("CartCount")
end sub

Then change ShopPageTrailer to ShopPageTrailer2

And that's it. You can add multiple subs for headers/trailers and get much more flexibility on the design - instead of using the same files for all pages/sections.

Hope this is useful.


  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000