Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 use fields from category table in product pages
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

neil-taylor
Starting Member

United Kingdom
12 Posts

Posted - February 04 2005 :  11:09:34  Show Profile  Reply with Quote
I wish to create a template page which includes information about the category to incorporate at the top of my products pages.

Ideally I would like to use the catextra field to choose a template page which can automatically display some of the appropriate fields from the category table
e.g.
catdescription
catimage
catmemo

How do I get access to these fields as they just show up on the published page as [catmemo] etc. This happens even if I choose to use tmp_categorytemplate.htm as the page defined by catextra. Do I need to identify that these fields are to be called on by this page?

As a secondary - and possibly related - issue I would like to be able to display the category name underneath the product name in the shopping cart.

I feel like I'm missing something here and there is a facility to do this...!

Thanks in advance.

Neil

atari
Starting Member

30 Posts

Posted - February 10 2005 :  15:51:39  Show Profile  Reply with Quote
I'm not really answering your questions directly, but I'll give you an example of what i've done.

if you go here:
http://www.rackattack.com/shopdisplayproducts.asp?id=37&cat=Thule+Wintersport+Racks
you'll see that each product has links for "instructions" and "buy factory mounts". In the template for the products (tmp_productformat.asp) the code to view those is just
[formatproductoptions]

what I gather is that you want to be able to add your own [ ] tags to your template files. in shopproductformat_template.asp there is this (line 69)
Sub Handle_Product (isub)
select case isub
Case "FORMATIMAGE"
Formatimage
'added by sean 10/12/04
Case "FORMATLOCKLINKS"
FormatLockLinks

Case "FORMATBUTTON"
If ProductSelect="Yes" then
AddSelect
else
Formatbutton
end if
Case "FORMATHYPERLINKS"
Formathyperlinks
Case "FORMATOVERALLRATING"
Formatoverallrating
Case "FORMATPRODUCTOPTIONS"
Formatproductoptions
Case "FORMATQUANTITY"
Formatquantity
case else
debugwrite "Unknown sub"
end select
end sub


if you noticed I added my own formatproductoptions to the list, now all you have to do is add the sub "formatproductoptions" to shopproductformat.asp. When your template file has [whatever] it goes tot he product_template file and finds the subrutine, then in productformat it runs it.

so for you, you can either edit exsisting VPASP code to grab the values from the DB for you, or write your own sub (I reccomend that). use shopopendatabase yourConnObj query the DB for the items you want, and write them to the screen.

hope this helps a bit!

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