Welcome, Guest ( Customer Panel | Login )




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

nathan_ark
Starting Member

United Kingdom
4 Posts

Posted - November 12 2003 :  10:06:52  Show Profile  Reply with Quote
Hi guys and gals!
Any ideas how to put the Category images into the left hand navigation? I dont want them to be hard coded i would like them to be read from whatever categories have been created. I guess they need to be implimented in to the header file or something other :|

Any help would be greatfully appreciated!
thanks
Nathan

jonmadrid
VP-CART New User

USA
192 Posts

Posted - November 12 2003 :  12:24:07  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
Nathan,

Do you want just the top-level category images, or the subcategories as well? I am working on that right now actually.

All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com


Go to Top of Page

nathan_ark
Starting Member

United Kingdom
4 Posts

Posted - November 12 2003 :  13:53:53  Show Profile  Reply with Quote
Hi Jon,

I just want the top level category images in. Been trying for quite a while but i'm not at the same level as using this software as u are!
Nathan


Go to Top of Page

jonmadrid
VP-CART New User

USA
192 Posts

Posted - November 12 2003 :  16:09:45  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
Nathan,

I just wrote the code that should take care of this for you. The ways that are provided in the cart provided to do this didn't work very well and werent very flexible so I decided to write my own version. It's fairly simple and does an excellent job. I made it really easy to incorporate into other sites and added some features for easy (though basic) customization as well. The necessary code is in a text file, in a zip archive on our webserver at http://demo.madridcom.com/vpasp/LeftSideCategoryImages.zip

Download that zip file, and copy the code out of the text file inside it. In your shopping cart folder, open the shopproductsubs.asp file and go all the way to the bottom. Paste the code you copied from the text file into the very end of the shopproductsubs.asp file (make sure you place it at the end , but before the %> tag).

Next, there are some variables that you can define at that top of that chunck of code that will determine how it is processed and displayed. I added these so it would be easy to adapt to how you want/need it. So, define those variables, save the file and upload it to your server.

The only thing you have left to do now is place a call to the NavigateShowCategoryImages() Sub that we just pasted into the shopproductsubs.asp file. Open your header file (or trailer, depending on where you want this to display) and insert the following code:

<% NavigateShowCategoryImages() %>

Save and upload that file and away you go. That's it. Easy as that.

You will now have the images of your categories (and sub categories if you so choose) displayed in the location you called it from. I also added a little thing in there that handles the categories that do not have subcategories. Rather than sending them to the shopdisplaycategories.asp page where there will be nothing for them to see, the code determines for you if there are subcategories or not and makes the link to the appropriate page... ShopDisplayCategories.asp for categories with subcategories and ShopDisplayProducts.asp for categories with only products and no subcategories. Its basically the same as what was done here http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=2077, just adapted for this application.

All of the code is commented so you can see what is happening each step of the way if you are so inclined. It's really straight forward though and should take less than 5 minutes to have it in place.

Please let me know if this works for you.

All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com



Go to Top of Page

nathan_ark
Starting Member

United Kingdom
4 Posts

Posted - November 12 2003 :  19:19:14  Show Profile  Reply with Quote
Hi Jon,
Thanks a lot for that, it worked fine. I can see the top cat images though I have turned off the text links as the comments in the code indicated how to do. Great you should reply as I was admiring your arizona golf site just last night linked from some past post or other. Smart stuff.
Many thanks again!

Laters Nathan


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