Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 adding image to top of tmp_categorytemplate.htm
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Vilcorp
Starting Member

5 Posts

Posted - December 28 2004 :  13:31:49  Show Profile  Reply with Quote
Hi all,

Relatively new to vpasp and running into a few problems customizing. I want to add an image to the top of the tmp_categorytemplate.htm page but when I do so in the html, it puts 3 images on the page, one above each of my 3 categories.. heres the example. http://coffeehouse.com/shop/shopdisplaycategories.asp . I emailed vpasp support and heres what the told me -

Hi,

The category template file is repeated for every category that is displayed on the categories page.

There is no inbuilt method to add an image above the category display in the header section of the page.

You could either modify the categoryheader subroutine in the shopdisplayproducts.asp file or create a static html page to display your categories to replace the database driven shopdisplaycategories.asp file.

-

I am not sure how to use the static html to do this.. is there anyone who could explain to me either how to do this static html approach or an easier way of accomplishing this?

Thanks a lot!

Dan




bmw000
VP-CART New User

137 Posts

Posted - December 28 2004 :  14:28:08  Show Profile  Visit bmw000's Homepage  Reply with Quote
I am unsure how to help you, but I looked at your site and I am very impressed. I like the design and the layout. Did you design it?

Brian Weber
BMW Solutions, LLC
http://www.bmwsolutions.com/shopping

Go to Top of Page

greatphoto
VP-CART Super User

USA
304 Posts

Posted - December 28 2004 :  14:36:14  Show Profile  Reply with Quote
Hi Dan-

Support is of course correct: tmp_categorytemplate.htm is not what you would use to add an image to the top of the category display.

Instead, what you are looking for is closer to the operation of xdisplaycategoryfiles. (See section 7.3 on page 29 of vpasp550devoper.pdf in the documentation). Unfortunately, this only affects the final product display and does not apply to category displays. This problem is easily corrected, but requires some basic editing of the ASP files.

I made a request for this feature addition in a separate thread:
http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=2626

Read that post and the documentation for xdisplaycategoryfiles to see if that is what you are after.

Go to Top of Page

Vilcorp
Starting Member

5 Posts

Posted - December 28 2004 :  15:01:43  Show Profile  Reply with Quote
Thanks for the help.. I'll look into that.. Thanks for the compliment too. Yes, I designed the site.. It's not nearly completed yet but getting there :)

Go to Top of Page

Vilcorp
Starting Member

5 Posts

Posted - December 28 2004 :  15:06:51  Show Profile  Reply with Quote
Greatphoto -

I modified this response w/a dif. question.. From what I read in your thread and from what I understand, this will give add a picture/file above certain categories only.. I would like to display my image above all categories on the shopdisplaycategories.asp page.. Is this possible and if so how?

Thanks!

Dan





Edited by - Vilcorp on December 28 2004 15:16:05
Go to Top of Page

greatphoto
VP-CART Super User

USA
304 Posts

Posted - December 28 2004 :  15:51:35  Show Profile  Reply with Quote
Hi Dan-

Yes, what I wrote about will allow you to have a custom file on each category page. ....say you could have text and images at the top of the syrup category where you explain what to do with syrups and why your syrups are particularly good. The Teas and coffee categories could have completely different intros with pictures.

If you just want the same picture to show up at the top of all the pages, its easier. You can do this by adding a single line of HTML to your shopdisplaycategories.asp file as support suggested. (It could also be done by adding a few lines to your shoppage_header.htm, but there's a few extra lines of code to make it only show up for category displays.)

Which version of the cart do you have?

Go to Top of Page

Vilcorp
Starting Member

5 Posts

Posted - December 28 2004 :  16:18:56  Show Profile  Reply with Quote
I'm using 5.5 What I want is for the image to only show up on the main shopdisplayproducts.asp page that displays the all three categories.. I would actually prefer not to have images above specific categories as your post explains to do w/the use of caextra. The only place I would want an image to be displayed above is - http://coffeehouse.com/shop/shopdisplaycategories.asp . Do you know off the top of your head what specific code I would need to alter to accomplish this? Also a side question, do you know where I can edit/remove/lower the text that is displayed atop of these pages.. i.e. the link above where it says "Product Categories"

Thanks!

Dan




Edited by - Vilcorp on December 28 2004 16:22:41
Go to Top of Page

greatphoto
VP-CART Super User

USA
304 Posts

Posted - December 28 2004 :  18:28:18  Show Profile  Reply with Quote
The line numbers I give below assume you haven't made any other changes to this file and that Support didn't make any mods since I downloaded my copy. You may need to adjust the line numbers slightly to find the correct section.

I am not able to test this at this, but it should get you going in the right direction. Give it a try and let us know how it works:

Starting at line 142 of the version 5.5 shopdisplaycategories.asp, you should see:


Sub CategoryHeader
dim header
If highercategoryid<>0 then
Generatecategorylinks header
else
response.write catHeader & getlang("LangCat01") & catheaderend & "<br><br>"
end if
response.write CatTable
end sub



Add your new HTML starting just after line 146 since you only want to affect display of the highest category. Your new code would look like this:


Sub CategoryHeader
dim header
If highercategoryid<>0 then
Generatecategorylinks header
else
response.write "<img src='images/<your_picture_filename>.gif' width='<your size>' height='<your size>' border='0' alt='<your text>'>"
response.write catHeader & getlang("LangCat01") & catheaderend & "<br><br>"
end if
response.write CatTable
end sub


If this doesn't work for you, you can try moving the new html line outside of the IF statement (after line 148). That should be fine since I don't think you are using sub-categories (yet).


For your "side question", you could add a <br> HTML tag in the same spot mentioned above, but I think it would be better just to add a <br> to the end of your shoppage_header.htm




Go to Top of Page

Vilcorp
Starting Member

5 Posts

Posted - December 28 2004 :  18:43:57  Show Profile  Reply with Quote
Thanks a lot buddy! www.coffeehouse.com/shop/shopdisplaycategories.asp

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