Announcement

Collapse
No announcement yet.

Need help with a conditional

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

    Need help with a conditional

    On OPAY I am trying to display the message for PayPal Payments PRO error 10555. I can not get the conditional correct. Need some help!

    <mvt:foreach iterator="error" array="messages:error_messages">
    <mvt:if expr=" '10555' IN l.settings:messages:error">
    The transaction was declined because the AVS (Address Verification Service) returned a partial match between the street address and the zip code.
    <br> The address must be entered exactly how it appears on the credit card statement including any punctuation
    </mvt:if>
    &mvt:error;
    </mvt:foreach>
    Don Lappin
    Manager
    PLFixtures.com
    1-816-463-3034

    #2
    Re: Need help with a conditional

    This goes back a bit but might be relevant to your situation:

    http://extranet.miva.com/forums/show...ssages-in-Miva

    Comment


      #3
      Re: Need help with a conditional

      The link provided above has a lot of explanation and examples for how you can do this, and you're definitely on the right track. The error is that you're referencing the iterator in the foreach loop as "l.settings:messages:error" instead of just l.settings:error. When you use a foreach loop, the "iterator=something" part determines the name of the variable you use in the loop. In this case, it's "iterator=error" so you use "l.settings:error" for the variable and &mvt:error; for the entity.

      So instead of:

      <mvt:if expr=" '10555' IN l.settings:messages:error">

      You would use:

      <mvt:if expr=" '10555' IN l.settings:error">

      Also, you should add <mvt:else> before the
      &mvt:error; so it doesn't display your new message followed by the old message. The else statement will make it either/or.

      I hope this helps!


      Josh

      Comment


        #4
        Re: Need help with a conditional

        Thanks!
        Don Lappin
        Manager
        PLFixtures.com
        1-816-463-3034

        Comment

        Working...
        X