Announcement

Collapse
No announcement yet.

Nav bar field

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

    Nav bar field

    I attempt to place the following Account string for that url.
    The session_id is broken I know - don't know what I'm doing there and no documentation anywhere I can find on how to place all the freaking entities.

    The BUG I have here is that the admin strips all my # & 38 ; characters and leaves just the & on update.


    <mvt:if expr="g.Basket:cust_id EQ 0"><a href="https://beta.handmade-paper.us/Merchant2/merchant.mvc?&mvt:settings="g.Session_id";&Screen= LOGN&Order=0&Store_Code=&mvt:global:Store_Code;">A ccount</a><mvt:else><a href="https://beta.handmade-paper.us/Merchant2/merchant.mvc?&mvt:settings="g.Session_id";&Screen= ACNT&Order=0&Store_Code=&mvt:global:Store_Code;">A ccount</a></mvt:if>

    Ok it looks like I can't post the hex character in the forum -
    Anytime there is an & in the url I want it to be in hex so it will validate.
    Last edited by Barrett; 07-05-08, 12:19 AM.
    Thanks,
    -Barrett
    Favorite Host Hostasaurus.com
    Order Processing by Shipworks.com
    Kindly Suggesting to:
    *Dump Explorer and http://GetFireFox.com
    *Post a meaningful subject line.
    *Click the # button before pasting code

    #2
    Re: Nav bar field

    &mvt:settings="g.Session_id"; is not a valid entry in a url.
    1) Urls don't contain " marks.
    2) The variable entry is Session_ID=&mvta:global:session_id;
    3) However, most people use &mvte:global:secure_sessionurl; That will include everything from the http up through the session_id.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #3
      Re: Nav bar field

      Originally posted by wcw View Post
      &mvt:settings="g.Session_id"; is not a valid entry in a url.
      1) Urls don't contain " marks.
      2) The variable entry is Session_ID=&mvta:global:session_id;
      3) However, most people use &mvte:global:secure_sessionurl; That will include everything from the http up through the session_id.
      1.) The browser interprets the proper character for the url. A straight & is not valid.

      2.) Thanks, got that string working - so where is the Rosetta Stone for all the freakin variables ?

      3.)The problem with #3 is that variable also includes an invalid character entity reference as the & character at the end of the string.
      Per Procedure:
      HTML Code:
      Replacing & with &amp; is only done when writing the URL in HTML, where "&" is a special 
      character (along with "<" and ">"). When writing the same URL in a plain text email
       message or in the location bar of your browser, you would use "&" and not "&amp;". 
      With HTML, the browser translates "&amp;" to "&" so the Web server would only see
       "&" and not "&amp;" in the query string of the request.


      Miva Admin is stripping my
      HTML Code:
       &amp; or &#38 ;
      down to only & on update.

      How do we get around that ?
      Last edited by Barrett; 07-05-08, 06:39 AM.
      Thanks,
      -Barrett
      Favorite Host Hostasaurus.com
      Order Processing by Shipworks.com
      Kindly Suggesting to:
      *Dump Explorer and http://GetFireFox.com
      *Post a meaningful subject line.
      *Click the # button before pasting code

      Comment


        #4
        Re: Nav bar field

        When I put
        TEST: &mvte:global:secure_sessionurl;
        on the page I see the url with session ID and & on the end. BUT, when I view the source of that displayed page, the & is a &amp;
        Are you sure you are using &mvte and NOT &mvt
        Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
        Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
        Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
        Facebook http://www.facebook.com/EmporiumPlus
        Twitter http://twitter.com/emporiumplus

        Comment


          #5
          Re: Nav bar field

          Ok so I have found Miva Merchant original code improperly uses &mvt.
          &mvte fixes that one part.

          Still I put in:

          Code:
          <mvt:if expr="g.Basket:cust_id EQ 0"><a href="&mvte:global:secure_sessionurl;Screen=LOGN&#38 ;Order=0&#38 ;Store_Code=&mvt:global:Store_Code;">Account</a><mvt:else><a href="&mvte:global:secure_sessionurl;Screen=ACNT&#38 ;Order=0&#38 ;Store_Code=&mvt:global:Store_Code;">Account</a></mvt:if>
          Note: I had to put a space after the &#38 or the forum would strip it too.
          Miva Merchant strips the proper entity refs and we are left with:
          Screen=LOGN&Order=0&Store_Code
          Last edited by Barrett; 07-05-08, 07:25 AM.
          Thanks,
          -Barrett
          Favorite Host Hostasaurus.com
          Order Processing by Shipworks.com
          Kindly Suggesting to:
          *Dump Explorer and http://GetFireFox.com
          *Post a meaningful subject line.
          *Click the # button before pasting code

          Comment


            #6
            Re: Nav bar field

            Code:
            <div><mvt:if expr="g.Basket:cust_id EQ 0"><a href="&mvte:global:secure_sessionurl;Screen=LOGN&amp;Order=0&amp;Store_Code=&mvt:global:Store_Code;">Account</a><mvt:else><a href="&mvte:global:secure_sessionurl;Screen=ACNT&amp;Order=0&amp;Store_Code=&mvt:global:Store_Code;">Account</a></mvt:if></div>
            Upon further testing this when hardcoded into the SFNT template for testing renders as

            Code:
            <a href="https://beta.handmade-paper.us/Merchant2/merchant.mvc?Session_ID=6079a0ec711b1a77f8425313f6098862&amp;Screen=ACNT&Order=0&Store_Code=CPO">Account</a>
            Thanks,
            -Barrett
            Favorite Host Hostasaurus.com
            Order Processing by Shipworks.com
            Kindly Suggesting to:
            *Dump Explorer and http://GetFireFox.com
            *Post a meaningful subject line.
            *Click the # button before pasting code

            Comment


              #7
              Re: Nav bar field

              I have a workaround for this developed and tested for this BUG

              Not saying what it is till a partner of mine tests this also.
              Should know in about a day.

              I hope to continue gloating with satisfaction over this.
              Last edited by Barrett; 07-06-08, 10:52 AM.
              Thanks,
              -Barrett
              Favorite Host Hostasaurus.com
              Order Processing by Shipworks.com
              Kindly Suggesting to:
              *Dump Explorer and http://GetFireFox.com
              *Post a meaningful subject line.
              *Click the # button before pasting code

              Comment


                #8
                Re: Nav bar field

                The work around is to put the contents from the nav bar in the global header. Then empty the nav bar input.
                Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                Facebook http://www.facebook.com/EmporiumPlus
                Twitter http://twitter.com/emporiumplus

                Comment


                  #9
                  Re: Nav bar field

                  my fix still uses the appropriate field for it's intended use if my fix really is holding
                  Thanks,
                  -Barrett
                  Favorite Host Hostasaurus.com
                  Order Processing by Shipworks.com
                  Kindly Suggesting to:
                  *Dump Explorer and http://GetFireFox.com
                  *Post a meaningful subject line.
                  *Click the # button before pasting code

                  Comment


                    #10
                    Re: Nav bar field

                    Workaround


                    1. Place either of these in the navbar and click update twice. Ignore what you see remaining in the admin field.

                    2. Look in browser source of an actual store page to verify syntax is correct and then validate your page at
                    http://validator.w3.org/#validate_by_uri

                    Code:
                    <mvt:if expr="g.Basket:cust_id EQ 0">
                    <a href="&mvte:global:secure_sessionurl;Screen=LOGN&amp;amp;Order=0&amp;amp;Store_Code=&mvt:global:Store_Code;">Account</a><mvt:else>
                    <a href="&mvte:global:secure_sessionurl;Screen=ACNT&amp;amp;Order=0&amp;amp;Store_Code=&mvt:global:Store_Code;">Account</a></mvt:if>
                    
                    <mvt:if expr="g.Basket:cust_id EQ 0">
                    <a href="&mvte:global:secure_sessionurl;Screen=LOGN&amp;#38;Order=0&amp;#38;Store_Code=&mvt:global:Store_Code;">Account</a><mvt:else>
                    <a href="&mvte:global:secure_sessionurl;Screen=ACNT&amp;#38;Order=0&amp;#38;Store_Code=&mvt:global:Store_Code;">Account</a></mvt:if>
                    Code:
                    &mvte:global:secure_sessionurl;  Must use mvte on this as miva engine creates it's own ampersand internally.
                    Last edited by Barrett; 07-06-08, 05:43 PM.
                    Thanks,
                    -Barrett
                    Favorite Host Hostasaurus.com
                    Order Processing by Shipworks.com
                    Kindly Suggesting to:
                    *Dump Explorer and http://GetFireFox.com
                    *Post a meaningful subject line.
                    *Click the # button before pasting code

                    Comment


                      #11
                      Re: Nav bar field

                      Additionally any update to the Store Message field with wipe out the fix and will need to be reapplied.

                      Originally posted by Barrett View Post
                      Workaround


                      1. Place either of these in the navbar and click update twice. Ignore what you see remaining in the admin field.

                      2. Look in browser source of an actual store page to verify syntax is correct and then validate your page at
                      http://validator.w3.org/#validate_by_uri

                      Code:
                      <mvt:if expr="g.Basket:cust_id EQ 0">
                      <a href="&mvte:global:secure_sessionurl;Screen=LOGN&amp;amp;Order=0&amp;amp;Store_Code=&mvt:global:Store_Code;">Account</a><mvt:else>
                      <a href="&mvte:global:secure_sessionurl;Screen=ACNT&amp;amp;Order=0&amp;amp;Store_Code=&mvt:global:Store_Code;">Account</a></mvt:if>
                      
                      <mvt:if expr="g.Basket:cust_id EQ 0">
                      <a href="&mvte:global:secure_sessionurl;Screen=LOGN&amp;#38;Order=0&amp;#38;Store_Code=&mvt:global:Store_Code;">Account</a><mvt:else>
                      <a href="&mvte:global:secure_sessionurl;Screen=ACNT&amp;#38;Order=0&amp;#38;Store_Code=&mvt:global:Store_Code;">Account</a></mvt:if>
                      Code:
                      &mvte:global:secure_sessionurl;  Must use mvte on this as miva engine creates it's own ampersand internally.
                      Thanks,
                      -Barrett
                      Favorite Host Hostasaurus.com
                      Order Processing by Shipworks.com
                      Kindly Suggesting to:
                      *Dump Explorer and http://GetFireFox.com
                      *Post a meaningful subject line.
                      *Click the # button before pasting code

                      Comment


                        #12
                        Re: Nav bar field

                        This should be fixed at the Storemorph compiler level; there are other instances where the compiler chokes on &.

                        The compiler should recognize instances where a url is specified such as href="", src="", or within an third party item as shown below.
                        for href and src the compiler should substitute & for &amp ; W3C valid urls.

                        Also within module items, the compiler currently chokes on &.
                        For Example:
                        Code:
                        <mvt:item name="my_program" param="url|http://www.mystite.com/dothis.php?parm1=1&parm2=2&parm3=3" />
                        I have a module that requires passing a url but the compiler chokes.
                        This is my workaround:
                        Code:
                        <mvt:item name="ry_toolbelt" param="url|'http://www.mystite.com/dothis.php?parm1=1' $ asciichar(38) $ 'parm2=2' $ asciichar(38) $ 'parm3=3'" />
                        Doing it this way forces me to evaluate the string expression within my module.

                        What should happen is that, within <mvt:items>, the param="" string should not be parced/compiled at all but should pass through as a literal string regardless of content.
                        Ray Yates
                        "If I have seen further, it is by standing on the shoulders of giants."
                        --- Sir Isaac Newton

                        Comment


                          #13
                          Re: Nav bar field

                          My Bug workaround does not work now !

                          What did you guys do to the rev ? @$#@%$^$%&^$%@^#$@
                          Thanks,
                          -Barrett
                          Favorite Host Hostasaurus.com
                          Order Processing by Shipworks.com
                          Kindly Suggesting to:
                          *Dump Explorer and http://GetFireFox.com
                          *Post a meaningful subject line.
                          *Click the # button before pasting code

                          Comment


                            #14
                            Re: Nav bar field

                            What did who do? We haven't updated anything recently especially on this side.
                            Thanks,

                            Rick Wilson
                            CEO
                            Miva, Inc.
                            [email protected]
                            https://www.miva.com

                            Comment


                              #15
                              Re: Nav bar field

                              Something has happened to cause my carefully and painfully crafted fix to suddenly not work and cause all the url based ampersands to go invalid.

                              Yes I was accusing the Miva side.
                              Last edited by Barrett; 08-25-08, 09:40 AM.
                              Thanks,
                              -Barrett
                              Favorite Host Hostasaurus.com
                              Order Processing by Shipworks.com
                              Kindly Suggesting to:
                              *Dump Explorer and http://GetFireFox.com
                              *Post a meaningful subject line.
                              *Click the # button before pasting code

                              Comment

                              Working...
                              X