View Full Version : Anyway to 'fake' NETQUOTEVAR:NAVB* for BrochurePrimary in a theme?
allen
14-Mar-2003, 09:23 AM
Hi all,
since Actinic doesn't support NETQUOTEVAR:NAVB* in the BrochurePrimary template, does anyone know of a way to 'fake' these in a theme (ie. I don't know what the cgi-bin is going to be)?
Specifically I'm using:
NETQUOTEVAR:NAVBHOME
NETQUOTEVAR:NAVBCART
NETQUOTEVAR:NAVBCHECKOUT
NETQUOTEVAR:NAVBINFO
NETQUOTEVAR:NAVBMAIL
TIA
Allen
NB: This has been added to the wishlist and Chris Discken want's these supported too, so fingers crossed for 6.0.3 or 6.0.4. Of course, the more people that submit it to the wishlist, the more likely it is to be added.
I sometimes just wish all NETQUOTEVAR's were supported in all pages - that would probably make life a lot easier ;)
garyhay
14-Mar-2003, 09:41 AM
Allen
Is this just for one site?
allen
14-Mar-2003, 10:13 AM
Yes, but as I said, it's supposed to be a theme, so ideally I want to be able to do these assuming that I don't know what the cgi-bin is.
Allen
garyhay
14-Mar-2003, 02:59 PM
Sorry Allen
I have not worked out to do this with a theme. The themes I create don't use brouchure
allen
14-Mar-2003, 03:19 PM
Gah, wimp. :eek: :p
Allen
allen
14-Mar-2003, 04:15 PM
Here's how to 'fake' NAVBCART:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function smart_getBasketURL(ar)
{
var strIDs = '';
for (var i=1; i <= ar.length; i++) {
if (ar[i].sURL !=null) {
var re = /\?SECTIONID=(.*)$/;
var uridec = decodeURI (ar[i].sURL);
uridec = uridec.replace (re, "");
uridec = uridec.replace ("ss00", "ca00");
var thispage = location.href;
re = /index\.html$/;
thispage = thispage.replace (re, "");
re = /\/acatalog/;
if (!re.test (thispage)) {
thispage = thispage + "acatalog/";
}
uridec = uridec + '?ACTION=SHOWCART&ACTINIC_REFERRER=' + thispage;
return uridec;
}
}
}
document.write ('<p><a href="');
document.write (smart_getBasketURL(sections));
document.write ('">View Basket</a>');
//-->
</SCRIPT>
Assumes that you're generating Act_Sections.js and have it sepcified at teh top of the file.
The link for the checkout is:
http://www.test.sdhost.com/madhouse/cgi-bin/os000001.pl?ACTION=Start!
You probably do require the referrer - doesn't hurt to specify it anyway.
So change:
uridec = uridec.replace ("ss00", "ca00");
to:
uridec = uridec.replace ("ss00", "os00");
And:
uridec = uridec + '?ACTION=SHOWCART&ACTINIC_REFERRER=' + thispage;
to:
uridec = uridec + '?ACTION=Start!&ACTINIC_REFERRER=' + thispage;
Allen
cdicken
17-Mar-2003, 08:48 AM
Thanks for these - very handy.
allen
17-Mar-2003, 10:45 AM
OK. Code correction. Change:
var thispage = location.href;
re = /index\.html$/;
thispage = thispage.replace (re, "");
to:
var thispage = location.href;
for (j = thispage.length; j == 0; j--) {
if (thispage.substr(j,1) == "/") {
thispage = thispage.substr(0,j);
j = 0;
}
}
This makes sure that the URL is now correct whatever brochure page your on, not just the home page o_O
And for the info link:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function smart_getInfoURL()
{
var thispage = location.href;
for (j = thispage.length; j == 0; j--) {
if (thispage.substr(j,1) == "/") {
thispage = thispage.substr(0,j);
j = 0;
}
}
re = /\/acatalog/;
if (!re.test (thispage)) {
thispage += "acatalog/";
}
thispage += 'info.html';
return thispage;
}
document.write ('<a href="');
document.write (smart_getInfoURL());
document.write ('">info</a>');
//-->
</SCRIPT>
The only item I haven't been able to reproduce that I need is the contact us (email) link.
Allen
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.