Announcement

Collapse
No announcement yet.

Anyway to 'fake' NETQUOTEVAR:NAVB* for BrochurePrimary in a theme?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anyway to 'fake' NETQUOTEVAR:NAVB* for BrochurePrimary in a theme?

    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

    #2
    Allen

    Is this just for one site?
    Owner of a broken heart

    Comment


      #3
      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

      Comment


        #4
        Sorry Allen

        I have not worked out to do this with a theme. The themes I create don't use brouchure
        Owner of a broken heart

        Comment


          #5
          Gah, wimp.

          Allen

          Comment


            #6
            Here's how to 'fake' NAVBCART:
            Code:
            <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/...l?ACTION=Start!
            You probably do require the referrer - doesn't hurt to specify it anyway.

            So change:
            Code:
            	  uridec = uridec.replace ("ss00", "ca00");
            to:
            Code:
            	  uridec = uridec.replace ("ss00", "os00");
            And:
            Code:
                  uridec = uridec + '?ACTION=SHOWCART&ACTINIC_REFERRER=' + thispage;
            to:
            Code:
                  uridec = uridec + '?ACTION=Start!&ACTINIC_REFERRER=' + thispage;

            Allen

            Comment


              #7
              Thanks for these - very handy.

              Comment


                #8
                OK. Code correction. Change:
                Code:
                  var thispage = location.href;
                  re = /index\.html$/;
                  thispage = thispage.replace (re, "");
                to:
                Code:
                  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:
                Code:
                <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

                Comment

                Working...
                X