Announcement

Collapse
No announcement yet.

Editing error messages

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

    Editing error messages

    Are the error messages still "locked up"? Was wondering about the error message on the OCST screen and the possibility of it being able to name the missing fields in the error message? Even though I think the required labels and fields turning red would be enough of an attention getter, I'm still wondering if it's doable.

    Leslie
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Re: Editing error messages

    Replying to subscribe.

    Comment


      #3
      Re: Editing error messages

      Originally posted by Brandon MUS View Post
      Replying to subscribe.
      You can always select "Subscribe to this Thread..." from the Thread Tools menu at the top of the page, without actually replying to the original post.

      Comment


        #4
        Re: Editing error messages

        Hey Leslie -

        The error messages are not customization via the admin, however most all of them can be controlled in the template language by conditionally checking for the error message and displaying your own:

        An Example:
        Code:
        <div class="error-message">
        <mvt:foreach iterator="error" array="messages:error_messages">
            <mvt:if expr=" 'One or more required fields were not filled out correctly.' CIN l.settings:error">
                This is my custom error message.
            <mvt:else>
                &mvt:error;
            </mvt:if>
        </mvt:foreach>
        </div>
        </mvt:if>

        To do what you are trying to do there are global variables you can check, for each of the bill to / ship to fields.

        Code:
        <mvt:if expr="g.ShipFirstName_Row EQ 'form_row invalid'">
        First Name Needs to be filled out.
        </mvt:if>
        Last edited by Brennan; 08-14-13, 01:53 PM.
        Brennan Heyde
        VP Product
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          Re: Editing error messages

          Hey Brennan,

          I tried this, but I think something might be missing as it did not display my alternate message or any message:

          Code:
          <div class="error-message">
          <mvt:foreach iterator="error" array="messages:error_messages">
              <mvt:if expr=" 'Shipping could not be calculated for your basket. This may be due to a network or configuration error, or the contents of your basket may not be able to be shipped in a single shipment.' CIN l.settings:error">
                  Delivery charges could not be calculated for your basket.
              <mvt:else>
                  &mvt:error;
              </mvt:if>
          </mvt:foreach>
          </div>
          Leslie
          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment


            #6
            Re: Editing error messages

            I couldn't get that code to work either. Not 100% sure why but perhaps there are spaces at the beginning/end of the error message that are causing the conditional check you are doing to fail.

            Try just checking for a sub section of the text vs the entire text. This was working for me:

            Code:
            <mvt:if expr="'Shipping could not be calculated for your basket.' CIN  l.settings:error ">
                    Delivery charges could not be calculated for your basket.
            <mvt:else>
                    &mvt:error;
            </mvt:if>
            Brennan Heyde
            VP Product
            Miva, Inc.
            [email protected]
            https://www.miva.com

            Comment


              #7
              Re: Editing error messages

              I tried using it on the OCST screen but it wouldn't display anything.


              Code:
              <p><mvt:item name="messages" /></p>
              
              <div class="error-message">
              <mvt:foreach iterator="error" array="messages:error_messages">
                  <mvt:if expr="'Shipping could not be calculated for your basket.' CIN  l.settings:error ">
                      Delivery charges could not be calculated for your basket.
              <mvt:else>
                    message  &mvt:error;
              </mvt:if>
              </mvt:foreach>
              </div>
              I left the original item token in place, thinking I would see the old message and the new one. But nothing displayed at all. If I removed the foreach just mvt:else "message" text displayed.
              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


                #8
                Re: Editing error messages

                It looks like you're on an MMUI store. All these code samples only work on CSSUI. In MMUI the messages are not available in the template language to conditionally check for.. they are "hidden" behind the messages item.

                If you want to change add custom messages to a MMUI store you would need to do it via JavaScript after the page is loaded.

                Check out this thread:

                http://extranet.mivamerchant.com/for...584#post404584
                Brennan Heyde
                VP Product
                Miva, Inc.
                [email protected]
                https://www.miva.com

                Comment

                Working...
                X