Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Help with static html pages
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

oceans420
Starting Member

USA
17 Posts

Posted - March 31 2005 :  16:42:49  Show Profile  Reply with Quote
Hello All,

I was hoping that someone could tell me how to configure the dynamically generated product static html pages to be built with the product cname or ccode instead of a number (Example: instead of p123.htm I want productname.htm). I have over 5000 products and it would take for ever to manually change them one by one.

Any help would be greatly appreciated.


Thanks everyone for the replies. I have VPASP 5.50 with the option pack. I am try to generate the pages with the admin html generator. I would like it to generate the pages with the product name or ccode as the url instead of just numbers. this is something that would greatly increase ranking on the search engines and makes it alot easier to link to the static pages.


Thanks
Mike D


Edited by - oceans420 on April 01 2005 06:58:37

devshb
Senior Member

United Kingdom
1904 Posts

Posted - March 31 2005 :  17:40:25  Show Profile  Visit devshb's Homepage  Reply with Quote
I think it'll depend on what version you're on; I've got a feeling that 5 and 5.5 do things quite differently for the html page generation.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - March 31 2005 :  21:23:24  Show Profile  Visit apswater's Homepage  Reply with Quote
I am pretty sure you can not create or save a file with asp can you? so having the actual .html file name would be impossible. you can change the titles and descriptions dynamically. I think someone here talked a botu a program that makes the pages static. We use mostly dynamic pages and have no problems getting 5000 seperate pages listed in msn becasue we have dynamic titles and descriptions.

Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - April 01 2005 :  02:19:26  Show Profile  Visit devshb's Homepage  Reply with Quote
I think they're talking about the vpasp admin's html-generator which queries the products and creates new html files for each product, and then creates index html pages to link them all together as site-map pages. I can't remember if that's part of default vpasp or if it's only available on the deluxe version.

This creates new static/html files that you can then use on your site, but those static html files in turn get generated dynamically when you press the "generate htmls" button on the admin page. (ie it's a dynamic thing that creates static pages, if you see what I mean).

you can do almost anything with the files in asp (although sometimes it's a bit clunky and platform-specific), including creating files on-the-fly (you can even do things like finding out the dimensions of image files, which I was surprised about when I found it).

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on April 01 2005 02:22:30
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - April 01 2005 :  08:36:15  Show Profile  Visit apswater's Homepage  Reply with Quote
ok how do you save to disk with asp code? I knowyou can save to a database but what the simple code for say, creat a text file an save it to disk?

Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - April 01 2005 :  09:01:16  Show Profile  Visit devshb's Homepage  Reply with Quote
it depends on what operating system's being used. I think that unix/linux does things completely differently to windows/nt.

you also need to ensure that the directory concerned has the relevant write-access to it so that the asps have permission to create the files.

here are some sample functions:

Sub FuOpenOutputFileForCreation
Set tgfilescriptobject=CreateObject("Scripting.FileSystemObject")
Set tgfilescriptobjectFile=tgfilescriptobject.CreateTextFile(tfullfilepath)
End Sub


Sub FuCloseOutputFileAfterCreation
tgfilescriptobjectFile.Close
Set tgfilescriptobject=Nothing
Set tgfilescriptobjectFile=Nothing
End Sub

Sub FuWriteline(arg_scriptfilepointer,arg_text)
arg_scriptfilepointer.WriteLine arg_text
end sub

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

oceans420
Starting Member

USA
17 Posts

Posted - April 01 2005 :  09:42:19  Show Profile  Reply with Quote
Vpasp 5.50 will create the static pages for you and upload them to a folder of your choose. I just want to static pages using the product name as the url instead of the way that it alreadey doesit by number the page as a url. like p123.htm. I want productname.htm. OS system is Windows.

thanks
Mike D.

Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - April 01 2005 :  11:36:31  Show Profile  Visit devshb's Homepage  Reply with Quote
you'd need to make a relatively minor change to shopa_generatehtml.asp, I think the WriteHtmlFiles and CreateOutputfile functions are what'd need to be changed.

off the top of my head, a starting point would be changing:

Sub CreateOutputfile (rs, filename, objfile, serverfilename, tmpfile)
dim catalogid,objFS
catalogid=rs("catalogid")
filename="p" & TRIM(catalogid) & ".htm"


to something like:

Sub CreateOutputfile (rs, filename, objfile, serverfilename, tmpfile)
dim catalogid,objFS
catalogid=rs("catalogid")
filename="p" & rs("cname") & ".htm"

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on April 01 2005 11:38:46
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - April 01 2005 :  13:40:21  Show Profile  Visit apswater's Homepage  Reply with Quote
I use 4.5 but in your example, are you generating the output as an html or are you actually saving it to disk so it remains static?



Edited by - apswater on April 01 2005 13:40:45
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - April 01 2005 :  13:51:14  Show Profile  Visit devshb's Homepage  Reply with Quote
it gets saved as a new physical file on the server (ie output'd as a text stream to a new physical file, not output'd to the browser)

the idea is that the merchant presses the "create html" button in admin every week or so and generates a full set of pages for all their products in one big-bang with the latest prices/descriptions etc. it also creates index files which link to all those new html product pages.

this means you can put the newly generated index file as a site-map link on your site, and the robots would crawl all over your html product pages really nicely.

if you upgrade to 5 or 5.5, all that logic will be available in the standard cart.

well worth upgrading, even if it's only for the html-generator; it'd be a big/nasty job creating all the ncessary logic from scratch.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on April 01 2005 13:53:05
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - April 01 2005 :  14:19:31  Show Profile  Visit apswater's Homepage  Reply with Quote
Thanks, you are a big help. I have made so many mods to 4.5 it makes it hard to upgrade. I do have 5.0 but we use the database shared across many different websites (all ours) and with 5.0 you need a copy for each one. I do hear about a lot of cool features in 5.5 and wish I was starting now.... but 4.5 is still pretty damn good.

Go to Top of Page

oceans420
Starting Member

USA
17 Posts

Posted - April 04 2005 :  06:49:17  Show Profile  Reply with Quote
Hello devshb,

I want to thank you for all your help.
I still haven't gotten it to work, It trys to name all the pages cname.htm and not the actual product name.htm but as soon as I get it figured out I will post the code here.

Once again thank you
Mike D




Edited by - oceans420 on April 04 2005 06:49:58
Go to Top of Page

InkMagic
VP-CART New User

123 Posts

Posted - May 11 2005 :  15:37:34  Show Profile  Reply with Quote
I would like to use 'cname' for the file name in HTML_generate also. I keep getting errors, but then, I don't know a thing about ASP programming.

Anyone got this working yet? Care to share it with us?

Thanks!!

Dale

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