Experienced programmer, new to mivascript...need documentation!!!!!

18 views
Skip to first unread message

ufitzi

unread,
Oct 26, 2006, 4:04:26 PM10/26/06
to miva-script
I found this guide
(http://smallbusiness.miva.com/support/docs/ScriptGuide_html/ScriptGuide.html)

on the miva site, but can't seem to find reference to the new (v5)
mivascript language.

Can someone point me to some, any, documentation?

A function list and syntax examples would be great.

Thanks,
bh

mvmarkus

unread,
Oct 26, 2006, 4:53:53 PM10/26/06
to miva-...@googlegroups.com
Hi bh,

The Scriptguide is the official documentation/reference. It is not 100% up
to date and there aren't any examples, but you may ask additional questions
either on this list (although it is very quiet), or at the official forum at
http://extranet.miva.com/forums/forumdisplay.php?f=30 . There you also find
a few examples and some clues about Miva's stealth documentation.

Markus

Thanks,
bh


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"miva-script" group.
To post to this group, send email to miva-...@googlegroups.com
To unsubscribe from this group, send email to
miva-script...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/miva-script
-~----------~----~----~----~------~----~------~--~---

ufitzi

unread,
Oct 26, 2006, 5:03:21 PM10/26/06
to miva-script
Markus,
Thanks very much for your response.

Basically, we just upgraded one of our stores to MM5.
In examining some of the code, I see tags with the format "
<mvt:if....></mvt:if>
I don't see these tags covered at all in the ScriptGuide doc mentioned
above.
I'm wondering if the new version of MM supports the v4 script.
I would hope it does, but again, I'm not having much luck.

In any case, I tried using some of the functions listed (ex.
substring()), but without any syntax examples I'm left with trial and
error, and haven't yet been able to successfully call a function and
display its' results.

Any ideas?
Once again, thanks so much for your response,
bh

mvmarkus

unread,
Oct 26, 2006, 5:39:36 PM10/26/06
to miva-...@googlegroups.com
.... well, you are right: This new template language (called "Store Morph
Technology") is mainly covered in the release notes of Empresa and the
compiler (version 5.0 - 5.6).

Here an excerpt:

Template Language
-----------------

The template body can have text, HTML and other tags, and a set of
entities and tags specific to the template language. These entities and
tags start with "mvt".

An entity must be placed either inside a tag attribute value, or outside of
a tag.

"Open" item tags must be matched with "close" item tags, or be empty tags.


Entities
--------
Entities start with "&mvt", and have an optional fourth character:

o mvta will attribute encode the value before output.
o mvte will entity encode the value before output.

Examples of using entities:
<quote>

<td align = "left" valign = "bottom" bgcolor =
"&mvt:navbar:bgcolor;">

<a
href="&mvt:global:secure_sessionurl;Action=LOGO&Screen=SFNT&Store_Code=&mvta
:global:Store_Code;">Logout</a><br>

<input type="hidden" name="Product_Code"
value="&mvte:product:code;">

</quote>

The special case "global" will output the value of the global
variable named after the
second colon symbol and the semicolon symbol.

Tags
----

Example of using open, close, and empty item tags:

<mvt:item name="fonts" param="body_font">
<mvt:item name="messages" />
<mvt:item name="customer" />
</mvt:item>


The follow tags are valid:

mvt:item

<MVT:ITEM NAME = "componentname" ( PARAM = "parametername" )>

An item tag calls a component with an optional parameter value.
The compoents that are valid for a template program are passed as an
array to
miva_template_compile.

Example:
<mvt:item name="fonts" param="body_font">
<mvt:item name="messages" />
<mvt:item name="customer" />
</mvt:item>


mvt:if
mvt:elseif
mvt:else

<MVT:IF EXPR = "expression">
<MVT:ELSE>
<MVT:ELSEIF EXPR = "expression">
</MVT:IF>

These tags enable conditional execution of blocks of code. The
"expression" value is
the same syntax as a Miva Script conditional, without the curly
brackets.

Example:
<mvt:if expr = "g.Store:code EQ 'hhh'">
Store Code "hhh"
<mvt:elseif expr = "g.Store:code eq 'ttt'">
Store Code "ttt"
<mvt:else />
Unexpected store code
<mvt:exit>
</mvt:if>


mvt:foreach

<MVT:FOREACH ITERATOR = "iteratorname" ARRAY = "arrayname">

The foreach tag allows iteration through an array defined in a
component.
The name specified as iteratorname will be set to each of the values
in the array.
An arrayname starting with "global:" will iterate through a
globally-defined array.

Example:
<mvt:foreach iterator="item" array="basket:items">
&mvt:item:name;
</mvt:foreach>

mvt:exit

<MVT:EXIT />

Stops display of a given template program. Processing of other
templates is not
affected.

Example:
See mvt:if example.

mvt:comment

<mvt:comment>
</mvt:comment>

This tag denotes a comment. The text between <mvt:comment> and
</mvt:comment> is
not compiled, nor is it output in the resulting .mvc file.

Example:

<mvt:comment>
This is a comment.
</mvt:comment>

============================================================================
==================

Again, subscribe to the official forum, there are dedicated threads to
exactly this.

Markus

-----Original Message-----
From: miva-...@googlegroups.com [mailto:miva-...@googlegroups.com] On
Behalf Of ufitzi
Sent: Donnerstag, 26. Oktober 2006 23:03
To: miva-script
Subject: [miva] Re: Experienced programmer, new to mivascript...need
documentation!!!!!

Bill Gilligan

unread,
Oct 26, 2006, 5:43:09 PM10/26/06
to miva-...@googlegroups.com
You can not use mivascript in MIVA Merchant nativly - in either version.

If you do know MIVA Script code, you can decipher the code in Merchant 5.

If you need true MIVA Script, you'll need some type of module(s).

bill


=========================================
William Gilligan
Our Vision is Building Yours.
www.gilliganonline.com
727-373-2536

-----Original Message-----
From: miva-...@googlegroups.com [mailto:miva-...@googlegroups.com] On
Behalf Of ufitzi
Sent: Thursday, October 26, 2006 4:03 PM
To: miva-script
Subject: [miva] Re: Experienced programmer, new to mivascript...need
documentation!!!!!

ufitzi

unread,
Oct 27, 2006, 11:59:58 AM10/27/06
to miva-script
Bill & Markus,
Thank you both for your input and expertise.

Looks like the Store Morph technology tags and variables (items,
entities) are what I have at my disposal.

Bill, if I understand you correctly, the only place I can use
MivaScript would be when building a module. This would require the
Miva compiler, and once created, could be used in a store. Am I on the
right track here?

The last piece of this would be a list of items/variables available in
the Store Morph "language." I've seen examples that loop through
products/categories, but haven't seen any documentation listing these
data structures.

If anyone knows where/how to find these, that would be great.

Thanks again, guys,
bh

mvmarkus

unread,
Oct 27, 2006, 12:23:42 PM10/27/06
to miva-...@googlegroups.com
Hi bh,

I think (but I am not 100% sure) that there is actually a module out there
that does right that - meaning giving you the names of the
variables/structures.

As to writing modules: Yes, you need the compiler, but it's free now, so
don't hesitate. Even with the Store Morph Technology, you still build much
more powerful applications when you use all the functionality that the
language offers. The template language is basically a simple way for people
with little or no programming background to create some basic logic
(iterations, conditionals etc.) without getting their hands dirty.

Markus

-----Original Message-----
From: miva-...@googlegroups.com [mailto:miva-...@googlegroups.com] On
Behalf Of ufitzi
Sent: Freitag, 27. Oktober 2006 18:00
To: miva-script
Subject: [miva] Re: Experienced programmer, new to mivascript...need
documentation!!!!!

Thanks again, guys,
bh


Bill Gilligan

unread,
Oct 27, 2006, 12:31:51 PM10/27/06
to miva-...@googlegroups.com
smime.p7m

ufitzi

unread,
Oct 27, 2006, 1:33:55 PM10/27/06
to miva-script
Bill, not seeing your response here in the form but saw the email.
I downloaded the latu.net module, looks like exaclty what I need.
Thanks,
bh

Reply all
Reply to author
Forward
0 new messages