devshb
Senior Member
United Kingdom
1904 Posts |
Posted - January 08 2005 : 08:05:01
|
You'll need to include shop$db.asp at the top of your non-vpasp asp files. However, calling/using vpasp functions/content from different directories generally won't work unless you specifically set vpasp up so that it can work from within different directories.
We needed to do this (eg for a forum directory, newsletter directory etc) - we needed to do what you're wanting (making vpasp available to you inside your panels that are normally outside vpasp). Loads of our clients needed this logic for their sites too.
When you get down to the nitty-gritty of working out how to do it, it's actually quite complex to get just right, but once you've got it setup with a sample directory using it then it's really great and very useful.
You can see this in action if you look at our main retail site (http://bigyellowzone.com/) and then click on the forum icon or a newsletter link; those "systems" are entirely separate from vpasp but still allow us to use vpasp inside them so we can call/show/use vpasp stuff around the panels etc (including mini-cart display, login form, category poplists etc).
We call this "Relative-to-Root", where you specify in each directory where vpasp is found, then we use that inside our side-panel links adding it to the front of the image paths and links. It means that you can call vpasp logic/content from any directory above or below your vpasp directory.
We've got this logic "good-to-go" with full documentation; as someone on the forum (ie you) has now requested it, I've now uploaded it to our site as an addon, and you can view/buy it from:
http://bigyellowzone.com/shopexd.asp?id=83
This is bundled with our generic "extra template fields" addon which allows you to create your own new template fields nice and easily. It's bundled because the "relative-path-to-vpasp-directory" value needs to be available as a template field so you can add it to the front of any files/links that are referenced in your templates, and this is part of that bundle (ie the "relative-directory-to-vpasp" template field is part of the bundle so you can add it to the front of your templates' links and image source values etc). So, the relative-path front bit is available both as a template field and as a vbscript variable, so you can use it anywhere you want.
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons
Edited by - devshb on January 08 2005 13:08:09
Edited by - devshb on January 08 2005 13:09:32 |
|
|