Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 category navigation as images
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

webboy
VP-CART New User

Australia
52 Posts

Posted - July 20 2006 :  20:12:05  Show Profile  Reply with Quote
Fellow customisers,

How can i change the category navigation to use images rather than text. I know the page to use but i can't see where to upload images for them.

Thank you

webboy

Built for the future

jubjub
VP-CART New User

110 Posts

Posted - July 20 2006 :  23:11:18  Show Profile  Reply with Quote
Find the NavigateShowCategoriesStyled subroutine in shopproductsubs.asp and you will find where it generates the links. It's around line 326 for me.

Replace the "name" variable in between the <a> tags with your image. It might be easier saving your images based on the category id, like cat10.gif and cat10_hassub.gif, so it'll be-

if hasSubcategory ="" then
mylink="<a HREF=""shopdisplayproducts.asp?id=" & cid & "&cat=" & Server.URLEncode(name) & addwebsesslink & """><img src=""cat" & cid & ".gif"" alt=""" & name & """></a>"
else
mylink="<a HREF=""shopdisplaycategories.asp?id=" & cid & "&cat=" & Server.URLEncode(name) & addwebsesslink & """><img src=""cat" & cid & "_hassub.gif"" alt=""" & name & """></a>"
end if

Hope that helps...
Go to Top of Page

webboy
VP-CART New User

Australia
52 Posts

Posted - July 20 2006 :  23:59:15  Show Profile  Reply with Quote
Excellent..i thought of somethimg similar but then i'll have to make the images everytime which kind of defeated the purpose.

But i'll take yours and just do it.

Thanks

Built for the future
Go to Top of Page

mikelane
Starting Member

45 Posts

Posted - January 24 2007 :  08:11:01  Show Profile  Reply with Quote
Hi Guys,

This is excellent, however the only problem i'm having with this is the images are outlined as links, i.e. previously visited categories get outlined in purple etc. Any idea how to stop these outlines?

Cheers
Go to Top of Page

mikelane
Starting Member

45 Posts

Posted - January 24 2007 :  15:30:52  Show Profile  Reply with Quote
Ok, after a bit of fiddling i managed to sort it. If anyones interested this is the slightly modified code that i am using now:

mylink="<a HREF=""shopdisplayproducts.asp?id=" & cid & "&cat=" & Server.URLEncode(name) & addwebsesslink & """><img src=""cat" & cid & ".gif"" border=0" & name & """></a>"
else
mylink="<a HREF=""shopdisplaycategories.asp?id=" & cid & "&cat=" & Server.URLEncode(name) & addwebsesslink & """><img src=""cat" & cid & "_hassub.gif"" border=0" & name & """></a>"
end if

The red code is the key here, personally i didn't need the alt command so i just replaced it with the border=0.

Hope that helps someone out there.
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