Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 tmp_product.htm on 4.5
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

apswater
VP-CART Super User

444 Posts

Posted - August 28 2007 :  13:15:08  Show Profile  Visit apswater's Homepage  Reply with Quote
I am using 4.5 still and my question is this,

I want to add a buch of if..then's to the product templates. I could just hard code the pages directly but hoped it would work by changing the templates to asp and then change the pointer in admin form htm to asp. It didnt. I changed the template to asp and it diplays, but none of the asp code executes. Ie. I did a simple response.write "-" and nothing. In the html part of the code, I can add text and it displays just fine.

is there a way to turn the template files into asp that works? maybe I need to change or add an include in the shopdisplay products or something?

Any help?

Cam?

support
Administrator

4679 Posts

Posted - August 28 2007 :  19:58:44  Show Profile  Visit support's Homepage  Reply with Quote
Hi Mitch,

This is a little bit involved and you will need to create new sub routines in the shopproductformat.asp and shopproductformat_template.asp pages and then add the new sub routine to the templates.

This is for the shopdisplayproducts.asp display.

To change the shopexd.asp display page you need to add them to the shopfileio.asp page.

Select an existing sub routine and then trace it through the pages to see how it needs to be added is the best way.

If you have a site wide search tool then this will be invaluable.

Hope this helps

Thanks
Cam

VP-ASP Support
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - August 28 2007 :  20:26:21  Show Profile  Visit devshb's Homepage  Reply with Quote
You might find our template-field addon useful, as it comes with example fields/functions for that kind of thing:

Extra Template-Fields (BYZ033) -
http://www.bigyellowzone.com/shopexd.asp?id=42

That module actually comes free with any of our template-field related addons, so if there's another addon that's template-related which you'd like then there's no need to buy BYZ033 separately.

The latest version of BYZ033 also allows you to use literals as template-field arguments, as well as multiple arguments. We use it for all our template-related addons, and it's really useful to have all your template-fields/functions split-out into separate files like that so that you can easily maintain them (especially makes upgrades much easier)

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

Edited by - devshb on August 28 2007 20:27:15
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - August 28 2007 :  20:53:54  Show Profile  Visit apswater's Homepage  Reply with Quote
Thanks Cam. I was hoping there was a simple way. I want the templates to be asp, I'll just have to a re-write in those sections.

ahha Leave it to Simon not to miss a beat selling me the add on! You are too funny Simon.
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - August 28 2007 :  20:59:59  Show Profile  Visit devshb's Homepage  Reply with Quote
(yep; always worth a try!)

asp-templates are a lot more complex on the backend than they might seem (we found that out to my cost when building our asp-generator; that uses asp-templates but it was a nightmare to work out from a coding point of view because there are so many potential layers/orders of execution).

the only practical way is to either use different template files, or do the template-field/function stuff.

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 - August 28 2007 :  22:45:37  Show Profile  Visit apswater's Homepage  Reply with Quote
I think it is easier then that, I wrote this on the fly article generator.. it uses an asp templates and works just fine.
http://www.apswater.com/techservice.asp . I think I will modify the displayproducts and the shopexd and use an include to the asp template. It should be fine.

If I make it asp, then I can use a database to write different pages depending on product type. Also I want to be able to read the catalog numbers and generate links to support articles without having to code each and every product individually.

Edited by - apswater on August 28 2007 22:47:01
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