PDA

View Full Version : MM5 update function question


ids
05-15-08, 09:09 PM
MM5
Production Release 4
Miva Merchant Engine v5.06
Database API: mivasql

My vars are testing as empty in the update function for some reason.

<MvFUNCTION NAME="Module_Utility_Update" PARAMETERS="module var" STANDARDOUTPUTLEVEL="">

even if i assign in the function:
<MvASSIGN NAME = "l.path" VALUE = "{ '/Merchant5/s01/mymod/' }">

Or pass from the _content function.

<INPUT TYPE="hidden" NAME="MY_PATH" VALUE="{/Merchant5/s01/mymod/'}">

Ultimately, I need to MvExport some data. The file ends up in the mivadata folder instead of the modules folder.

Any ideas?

TIA
Scott

MichaelBrock
05-16-08, 05:50 PM
setting a local variable in the _content function won't work, but setting it in a hidden form field in the _content function should work. You have a typo in your form field, you're missing a beginning '. Did you view the source of the content page to verify the your hidden MY_PATH field has the proper value set in it? That variable/value should then be available in the _update function as g.MY_PATH (although it's not case sensitive).

ids
05-17-08, 11:31 PM
Thanks Mike.

The problem, still not sure why, turned out to be using the MvImport function of the exported file. I did have a typo getting the path info to MvExport though not realated to my typo in this post. Once that was solved, I found MvImport wouldn't work for some reason. In this case I could use and have success with the file_read() function avail in Empressa VM 5+.