Announcement

Collapse
No announcement yet.

Question about NorPrice

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

    Question about NorPrice

    Hi Norman

    A question about your brilliant NorPrice currency covertor which I have been using for years now!

    I notice you have most of the javascript in external files but this bit is not:

    <!-- START NorPrice Support -->
    <script language=JavaScript>
    <!-- V1.17
    var hidemain = 'CUSTOMVAR:MAINCURRENCY';
    var hidealt = 'CUSTOMVAR:ALTCURRENCY';
    var showonly = 'CUSTOMVAR:SHOWONLY';
    var hidefraction = CUSTOMVAR:HIDEFRACTIONRATE;
    var mainsymbol = 'CUSTOMVAR:MAINCURRENCYSYMBOL';
    var cgiurl = 'NETQUOTEVAR:CGIURL';
    function norpricepopup(){
    var arg = '';
    if ( arguments.length == 1 ) arg = '?' + arguments[0];
    var pricewin=window.open('NETQUOTEVAR:BASEHREFnorpricepopup.html' + arg, 'pricepop', 'height=100,width=400,toolbar=no');
    pricewin.focus();
    }
    //-->
    </script>
    <SCRIPT LANGUAGE="JavaScript" SRC="norpricesupport.js" TYPE="text/javascript"></SCRIPT>
    <style type="text/css">
    <!--
    .altprice {font-size: xx-small; color: darkblue;}
    -->
    </style>
    <!-- END NorPrice Support -->
    Is there any reason for that? I plan to move it into an external file for SEO purposes, but I just wanted to check that was possible.

    Paul
    KJ Beckett
    Men's Clothing & Accessories
    Cufflinks, Underwear, Ties, Grooming Products
    Bath, England
    Fast delivery to UK, USA and worldwide.
    Men's Fashion Blog

    #2
    Probably worth posting this on Norman's support forum over at www.drillpine.biz
    Bill
    www.egyptianwonders.co.uk
    Text directoryWorldwide Actinic(TM) shops
    BC Ness Solutions Support services, custom software
    Registered Microsoft™ Partner (ISV)
    VoIP UK: 0131 208 0605
    Located: Alexandria, EGYPT

    Comment


      #3
      Norman is away skiing at the moment so it may be a while before he replies.

      Comment


        #4
        for SEO purposes
        If you moved the currency converter to the right of the page this should place the code after your body content and so solve any SEO problems.

        Comment


          #5
          If you moved the currency converter to the right of the page this should place the code after your body content and so solve any SEO problems.
          Thanks but my left hand side is the functional side (all the controls for the user on site) and the right hand side is marketing/x-nav. I want to try and keep this consistent for usability.

          Presumably moving the code to an external file would have the same affect... I'm not sure why Norman didn't set it up like this and wonder if his patch wont work properly if I was to put it in an external file. I will wait until his return!

          Paul
          KJ Beckett
          Men's Clothing & Accessories
          Cufflinks, Underwear, Ties, Grooming Products
          Bath, England
          Fast delivery to UK, USA and worldwide.
          Men's Fashion Blog

          Comment


            #6
            Originally posted by RuralWeb
            If you moved the currency converter to the right of the page this should place the code after your body content and so solve any SEO problems.
            If you want it in the same place you can wrap the contents in a <div> at the end of the page and use CSS to position back at the top thereby getting the SEO and the consistent functionality


            Bikster
            SellerDeck Designs and Responsive Themes

            Comment


              #7
              The reason that JavaScript has to be inline is that Actinic won't expand the CUSTOMVAR's and NETQUOTEVAR's if the code is in a separate file.

              It's best to leave this code where it is.

              You could move it all to the very end of Act_Primary (just above the </body> line). However, this would mean that the popup wouldn't work until the page's HTML had fully loaded.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Hi Norman

                Actinic won't expand the CUSTOMVAR's and NETQUOTEVAR's if the code is in a separate file
                I knew there must have been a reason!

                Just thinking about this .... the user only needs to click the button once during a visit. My page takes a few seconds to load but I think it is unlikely that a new user will immediately click on that button - they will need to take some time to compose themselves on the page - by that time the page should be loaded. Existing users may be different... but I think the risk is low.

                I will do this move.

                Thanks.

                Paul
                KJ Beckett
                Men's Clothing & Accessories
                Cufflinks, Underwear, Ties, Grooming Products
                Bath, England
                Fast delivery to UK, USA and worldwide.
                Men's Fashion Blog

                Comment


                  #9
                  Existing users may be different
                  They will have the page loaded from the cache on thier PC so it will not affect them. As in my reply to your other thread on the subject - if you cannot move your js to an external file then it should be placed at the bottom of the page as norm also suggests.

                  Comment


                    #10
                    Thanks.

                    js to an external file then it should be placed at the bottom of the page as norm also suggests
                    My only concern is that if the external script is at the bottom of the page - and therefore wont load until last - the page may look abit strange whilst loading.

                    On some computer systems I have noticed slight delays as all my images load. Apart from loading images, the page currently looks fine. My concern is that pricing will look strange for a few seconds and this will put the users off. I am currently doing some tests.

                    Paul
                    KJ Beckett
                    Men's Clothing & Accessories
                    Cufflinks, Underwear, Ties, Grooming Products
                    Bath, England
                    Fast delivery to UK, USA and worldwide.
                    Men's Fashion Blog

                    Comment


                      #11
                      FYI

                      Moving the scripts below to the bottom of the page (just above </body> does not work. I am now going to try placing the code as far down the page as possible but above the values where the currency conversion is required.

                      <!-- START NorPrice Support -->
                      <script language=JavaScript>
                      <!-- V1.17
                      var hidemain = 'CUSTOMVAR:MAINCURRENCY';
                      var hidealt = 'CUSTOMVAR:ALTCURRENCY';
                      var showonly = 'CUSTOMVAR:SHOWONLY';
                      var hidefraction = CUSTOMVAR:HIDEFRACTIONRATE;
                      var mainsymbol = 'CUSTOMVAR:MAINCURRENCYSYMBOL';
                      var cgiurl = 'NETQUOTEVAR:CGIURL';
                      function norpricepopup(){
                      var arg = '';
                      if ( arguments.length == 1 ) arg = '?' + arguments[0];
                      var pricewin=window.open('NETQUOTEVAR:BASEHREFnorpricepopup.html' + arg, 'pricepop', 'height=100,width=400,toolbar=no');
                      pricewin.focus();
                      }
                      //-->
                      </script>
                      <!-- END NorPrice Support -->

                      <!-- START NorPrice Support 2 -->
                      <script type="text/javascript">
                      <!-- Extract and remember the US$ to UK£ rate
                      if ( document.cookie ) // only if cookies enabled
                      {
                      if ( document.cookie.indexOf('destcurr=') == -1 ) // cookie not set so lets set it
                      {
                      var baserate = -1;
                      var intialrate = -1;
                      var basecurrency = document.textor1.basecurrency.value; // our normal currency
                      var initialcurrency = document.textor1.initialcurrency.value; // our additional currency
                      for(var i=0; i <= 100 ;i++) // all the ISO codes
                      {
                      if ( iso[i] == basecurrency ) baserate = curate[i]; // look for the BASE to $ rate
                      if ( iso[i] == initialcurrency ) intialrate = curate[i]; // look for the DEST to $ rate
                      }
                      if ( (baserate > -1) && (intialrate > -1) ) // valid rate
                      {
                      document.cookie = 'destcurr=' + escape(initialcurrency + ':' + baserate + ':' + intialrate) + '; path=/'; // set the cookie
                      document.location.reload(); // and reload the page
                      }
                      }
                      }
                      //-->
                      </script>
                      <!-- END NorPrice Support 2 -->
                      KJ Beckett
                      Men's Clothing & Accessories
                      Cufflinks, Underwear, Ties, Grooming Products
                      Bath, England
                      Fast delivery to UK, USA and worldwide.
                      Men's Fashion Blog

                      Comment


                        #12
                        Moving the scripts below to the bottom of the page (just above </body> does not work. I am now going to try placing the code as far down the page as possible but above the values where the currency conversion is required.
                        Yes, moving the script to the very bottom of the page did not work but moving it to the middle - below all the left hand nav but above the main content did work. I can only presume that the script needs to load before the currency is loaded and if not the additional currency wont be displayed.

                        Example page: http://www.kjbeckett.com/acatalog/Delivery.html

                        Paul
                        KJ Beckett
                        Men's Clothing & Accessories
                        Cufflinks, Underwear, Ties, Grooming Products
                        Bath, England
                        Fast delivery to UK, USA and worldwide.
                        Men's Fashion Blog

                        Comment


                          #13
                          The other solution would be to move the currency js call (image/link) from the LHS to the RHS of the page - it would then be after the bulk (inner layout) of the page and move the script to be after that - that might benefit SEO because it would then be after the product info.

                          Comment


                            #14
                            Hi

                            The other solution would be to move the currency js call (image/link) from the LHS to the RHS of the page
                            Thanks. I probably wont do this on this occasion becuase I try to keep all my user functionaility on the left side and marketing on the right. Also would the issue still not apply in the fact that the products (that have the money amount) would still load up before script does?

                            But I am really happy that I can get the script below my static html left hand nav, and the page'1 <h1> tag.

                            Paul
                            KJ Beckett
                            Men's Clothing & Accessories
                            Cufflinks, Underwear, Ties, Grooming Products
                            Bath, England
                            Fast delivery to UK, USA and worldwide.
                            Men's Fashion Blog

                            Comment

                            Working...
                            X