Announcement

Collapse
No announcement yet.

Miva Merchant Empresa Bugs?

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Re: Miva Merchant Empresa Bugs?

    Originally posted by RayYates View Post
    Wrapping foreachcontinue inside comments causes the template compiler to fail.

    Error compiling template: At 260:7-260:21 - syntax error, unexpected FOREACHCONTINUE

    Code:
    <mvt:comment> 
    <mvt:if expr="NOT ('_Head' IN l.settings:item:name)">
        <mvt:foreachcontinue />
    </mvt:if>
    </mvt:comment>
    Miva Merchant 9.0004
    MivaScript Engine v5.23
    A bug has been filed and will most likely be fixed in the 5.24 engine. My bet is you will get that error for all the other continue/stop functions that exist.
    David Carver
    Miva, Inc. | Software Developer

    Comment


    • MvCALL Method="PUT" related issue.

      <MvCALL ACTION="{ g.Tradier_API_Host $ l.url_ext }"
      FIELDS="l.duration,l.type,l.price"
      METHOD="PUT"
      HEADERS="{ g.JSONDATA $ g.Tradier_Hdr }">
      <MvASSIGN NAME = "l.return" VALUE = "{ l.return $ s.callvalue }">
      <BR> <MvEVAL EXPR = "{ s.callvalue }">
      </MvCALL>

      Above script fails to send fields data as real values. Instead, it sends it as 'null' to the destination server. I have tried with POST, it appears fine. It only fails during the PUT method. I am using v5.32

      Could you please help.


      Last edited by rajpatel_uk; 07-09-19, 11:24 AM. Reason: I have managed to find the workaround for this issue. Instead of sending three fields separately, i created a one big string with parameters related to all three fields, and it worked!

      Comment


      • Originally posted by rajpatel_uk View Post
        MvCALL Method="PUT" related issue.

        <MvCALL ACTION="{ g.Tradier_API_Host $ l.url_ext }"
        FIELDS="l.duration,l.type,l.price"
        METHOD="PUT"
        HEADERS="{ g.JSONDATA $ g.Tradier_Hdr }">
        <MvASSIGN NAME = "l.return" VALUE = "{ l.return $ s.callvalue }">
        <BR> <MvEVAL EXPR = "{ s.callvalue }">
        </MvCALL>

        Above script fails to send fields data as real values. Instead, it sends it as 'null' to the destination server. I have tried with POST, it appears fine. It only fails during the PUT method. I am using v5.32

        Could you please help.

        Hello,

        PUT does allow data to be sent. Does it literally send "null" or do you mean it just ends up sending a blank value? This quick program works for me (albeit I imagine the data being send will need to have some kind of delimiter).

        Code:
        <MIVA STANDARDOUTPUTLEVEL = "">
        
        <MvASSIGN NAME = "l.duration"    VALUE = "forever">
        <MvASSIGN NAME = "l.type"        VALUE = "outside">
        <MvASSIGN NAME = "l.price"        VALUE = "expensive">
        
        <MvCALL METHOD = "PUT"
                ACTION = "http://localhost"
                FIELDS = "l.duration, l.type, l.price">
        </MvCALL>
        generates this request

        Code:
        PUT / HTTP/1.1
        Host: localhost
        Content-Type: text/plain
        Content-Length: 23
        Connection: close
        
        
        foreveroutsideexpensive
        David Carver
        Miva, Inc. | Software Developer

        Comment

        Working...
        X

        This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

        This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

        Accept