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-ASP Shopping Cart Customer Forum

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

 All Forums
 VPCart Forum
 General help me questions
 Category heading?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

anatur
Starting Member

42 Posts

Posted - September 04 2008 :  15:37:48  Show Profile  Reply with Quote
Hi

How can I make a catogory heading? Just like on the front page you have the welcome text and picture at top - I want the same on top when you choose a category - (abow the tmp_productformat.htm)? Like on the VP-ASP live demo here. Best was to add the [catmemo] field on top - but where?

thanks

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - September 04 2008 :  17:05:32  Show Profile  Reply with Quote
Hi,

take a look at this previous posting

http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=12086

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

anatur
Starting Member

42 Posts

Posted - September 05 2008 :  01:39:48  Show Profile  Reply with Quote
thank you - I did not see that

however it is not quite the same - I want it on top of a 3 column shopdisplayproducts? ( I dont get it with just add htm file into the cat extra field?)

If you want this as standard for all categories - it means that you must make as many htm files as categories - it would be natural to use the [catmemo] field for this? Is that possible?

How can I set this file into shopdisplayproducts.asp? Can someone simply explain this closely - or give a code part?

If I must make htm files - still how and where do I put this in shopdisplayproducts.asp?

This function to have a intoduction heading for each category should maybe be standard from set up with use of catmemo?

thanks

Edited by - anatur on September 05 2008 02:09:41
Go to Top of Page

Steve2507
VP-ASP Expert

590 Posts

Posted - September 05 2008 :  03:20:25  Show Profile  Reply with Quote
Yes, you create the display as you want it in the catmemo field. Then you call this into your document.

The files you need are shopdisplaycategories and shopdisplayproducts and in easch you need Sub ShowCategoryImage.

Here's the code we use as we have modified our headings as well:
Sub ShowCategoryImage
Dim ImageFileName, description, i
Dim rs
Dim query
imagefilename=""
If highercategoryid="" then exit sub
If getconfig("xDisplayCategoryImages")="Yes" or getconfig("xdisplaycategoryfiles")="Yes" Then
    query =  "select * from categories where categoryid = " & highercategoryid
    set rs = dbc.execute(query)
    If not rs.EOF Then
	imagefilename = rs("catimage")
	description=rs("catextra")
	if isnull(imagefilename) then
	   imagefilename=""
	end if
	if isnull(description) then
	   description="" 
	end if     
    end if
'START MY CODE
if highercategoryid <> 0 then
Dim catmemo2
Dim cattitle1
catmemo2=rs("catmemo")
cattitle1=rs("catextra3")
end if
'END MY CODE
    closerecordset rs
else
   exit sub
end if   
If getconfig("xDisplayCategoryImages")="Yes" and imagefilename<>"" then
'START MY CODE
response.write "<br><table width='500' border='0' align='center' cellpadding='2' cellspacing='2'><tr><td width='3%'><div align='center'><img border=""0"" src=""" & ImageFileName & """ alt=""" & cattitle1 & """ /></div></td><td width='97%'><div class=""prodcatheader""><h1>" & cattitle1 & "</h1><p>" & catmemo2 & "</p></div></td></tr></table>"
'END  MY CODE
end if
If getconfig("xdisplaycategoryfiles")="Yes" and description <>"" then 
 dim readarray(500), readcount
 readcount=0
 ShopReadFile description,ReadArray,readcount
 if readcount=0 then exit sub
 response.write "<br />"
 for i = 0 to readcount-1
 response.write readarray(i) & vbcrlf 
 next
end if  
End Sub



Steve
Sex toys from a UK sex shop
Go to Top of Page

anatur
Starting Member

42 Posts

Posted - September 05 2008 :  07:42:17  Show Profile  Reply with Quote
thanks a lot Steve!

It is what I look for. Bye closer look I have made to impliment it in shopdisplayproducts but I get a runtime error?

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'highercategoryid'

/shop/shopdisplayproducts.asp, line 276

anyone who can help?

thanks

Edited by - anatur on September 05 2008 23:55:19
Go to Top of Page

Steve2507
VP-ASP Expert

590 Posts

Posted - September 06 2008 :  03:56:49  Show Profile  Reply with Quote
You need to define the variable 'highercategoryid' by entering
Dim highercategoryid
before it is called.

Our code is heavily modified so it could be something in our code disrupts our system. Use with care and I would suggest you adapt the code rather than copy it.


Steve
Sex toys from a UK sex shop
Go to Top of Page

anatur
Starting Member

42 Posts

Posted - September 07 2008 :  04:20:59  Show Profile  Reply with Quote
thanks Steve

after twisting my head and the logic in code a litle I get it to work fine - interesting learning as well

thanks
Go to Top of Page

elvis
VP-ASP Super User

202 Posts

Posted - September 14 2008 :  08:27:41  Show Profile  Reply with Quote
Thanks Steve2507
I tried to change only shopdisplayproducts.asp and shopdisplaycategories.asp. Shopdisplaycategories.asp worked, but I wanted only for shopdisplayproducts.asp only.
I could not manage it even I followed the instruction above.

Could you tell me what possibly I am doing wrong?
Could anatur share you code here?

Thanks in advance.

Edited by - elvis on September 14 2008 12:01:44
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000