mmui Modification Information

Question: How do I change the "Add 1 to Basket" and "Buy 1 Now" buttons to say something else or display buttons?

Answer:  Here is the code for it.. at least one example.
In the mmui.mv file do a find "add 1 to basket".
You should find this: (without the <MvCOMMENT>)
<MvCOMMENT>djash<INPUT TYPE = "submit" VALUE = "Add 1 To Basket"></MvCOMMENT>
djash is only there as a note to me that I changed it.
Then I changed it to this:
<INPUT TYPE = "image" src ="http://www.sportsmansgear.com/graphics/mmui/addone.gif"VALUE = "Add 1 To Basket" border="0">
Of course you would use whatever image and path you choose to it.. but this shoud get you going

Answered by: Dave Ashmore @ http://www.sportsmansgear.com

Question:  Does anyone know of a way to add a "comment box" to the bottom of the checkout page?

Answer: Look in the Miva Exchange (link in the footer of list messages) under
fulfillment for a module called addendum. It will capture the responses
and write them to a text file. But you can also add the responses to an
email fairly easily, eg just before the </MvSMTP>
add in the line
<MvEVAL EXPR = "{ asciichar( 10 ) $ 'Shipping Instructions.: ' $
g.question1}">

Answered by William Weiland @ http://wcw.simplenet.com

Question: Is it possible to remove the navagation bar at top of pages and add my own links?

Answer: You can remove and/or comment out the navigation bar in the mmui.mv. You can
do this in the begin screen function.
MvFUNCTION NAME = "MMUI_Begin_Screen
A search for this will take you to the right location, you can add static
links and comment out the links you do not want.

Answered by Mike Crawford @ www.nothinbutprints.com

Question: How can I add a hyperlink to my Thumbnails?

Answer:  If you go to the link to my store you'll see an example of what you are
looking for, so it can be done - rather easily. If you know how to edit
the mmui.mv (make backup), you do a search for the word thumbnail. That
is the code where the thumbnail displays. Just wrap it with the same
href link that is wrapped around the products name which is within a few
lines of the thumbnail reference.

Answered by William Weiland @ http://wcw.simplenet.com

Question: How can I make the Left Category Frame Transparent?

Answer:  #ffffff - White is not the same as transparent. The table would be "White"
#000000- Black is not the same as transparent.
Leaving it blank is interpeted as black.

To make the catagory table transparent you have to edit the mmui.mv. When you open mmui.mv to edit
search for
"category_tree" it's the only unique word close to the line you need to edit. Look 4 lines above
the line with category_tree. Edit as follows;

To make category background transparent change;

<TD ALIGN = "left" VALIGN = "top" BGCOLOR = "&[ MMUI_Store.d.ctgy_bg:entities ]">

To

<TD ALIGN = "left" VALIGN = "top">
 

Answered by:  John Weaver

Question:  How can I add text below the Category List in the Left Frame?

Answer:  In the mmui.mv file, within the begin_screen function, you will see a
line similar to this:

<MvDO FILE = "{ g.Module_Library_Utilities }" NAME = "l.categories"
VALUE = "{ Category_Tree( Stores.d.code, l.category_id, l.category_id EQ
0 ) }">

After that line I added these lines:

<MvIF EXPR="{sexists('/Merchant/'$g.store_code$'cattext.html')}">
<MvDO FILE = "{'/Merchant/'$g.store_code$'cattext.html'}">
</MvIF>

I created a simple html file called cpgscattext.html (cpgs is the store
code) and put it in the main Merchant directory (the same one where
merchant.mv is located). When you want to make changes, all you do is
change the cpgscattext.html file and the changes show up on all the
pages.

Answered by Sherri Stekl

Question: How can I show the product description to the right of the thumbnail photo on the Category page?

Answer: Look for
MvFUNCTION NAME = "MMUI_ProductDisplay"
In it you will find
<FONT FACE = "&[ MMUI_Store.d.body_font:entities ]" SIZE =
&[ MMUI_Store.d.body_fsize:entities ]">
 <MvEVAL EXPR = "{ Products.d.desc }">
 </FONT>
You can just copy this code, and find a good place in
MvFUNCTION NAME = "MMUI_Category"
to insert it.

Answered by Adam  @  http://www.aaimporting.com

Question:  How can you replace the "blades.gif" at the top left?

Answer:  You can replace the blades.gif in the top left of all your forms
and put your own logo and link back to hour home page. See:

Adding a hyperlink to the navigation bar logo image. Return to Customizing Miva Merchant Tips Index

As you probably know, versions of Miva Merchant in the 1.2 series allow you to specify your own navigation bar images including the logo image. But the logo image has no hyperlink, if you would like to make it link to your home page here is how you do it.

In the mmui.mv (Or whatever you are calling it now) do a search for:
MvFUNCTION NAME = "MMUI_Begin_Screen"

From there scroll down, or do a search, until you see:
<IMG SRC = "&[ MMUI_Store.d.nav_logo:entities ]">

Simply change that to:

<A HREF="http://yoursite.com"><IMG SRC = "&[ MMUI_Store.d.nav_logo:entities ]"></A>

Where "http://yoursite.com" is replaced with the url you want the link to link to.

Answered by Jeff Hubber @ Miva

Question: How can I place an e-mail link on a catalog page?

Answer:  If you add this line to your mmui.mv under <MvFUNCTION NAME = "MMUI_ProductDisplay" wherever you want it to display: Just
unwrap the following code below.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
<a
href="mailto:custservice@sportsmansgear.com?subject=Prodcode &[ Products.d.code ] &[Products.D.name]"><font size="2"
face="Comic Sans MS"><strong>Broken Image?/Product question?</strong></font></a>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
Of course use your e-mail address and whatever you wish it to say and it will generate an e-mail link that will bring up the product code and name filled in in the subject line of thier e-mail client for each product in your store.

Answered by Dave Ashmore @ http://www.sportsmansgear.com

Question: I noticed that on you pages, your items are arranged horizontally, not vertically, how did you accomplish this?

Answer:  That is accomplished with William Weiland's Pageview.mv, a part of  his CIM Tool Kit.

Check http://wcw.simplenet.com/cim/cimlight.htm to get more information

Answered by  Luray

Question: How can I list products alphabetically?

Answer:  You can either maintain your catalog off line with Excel or Approach or some similar database program and alphabetize them before exporting for import as a flatfile to your server or

You can use William Weiland's  Page Sort module that will sort on-the-fly by name, price, or ID number.  See http://wcw.simplenet.com/cim/cimlight.htm for more information.

Answered by:  Luray

Question: Can anyone reassure me that when I upload my modified mmui  and  change the module, my whole store won't go haywire? If my new  module doesn't work, will I be able to just switch back to the  old one?

Answer: There are two ways to do this. Keep the same module name and filename.  Then just create a backup of mmui.mv (to mmui.mv.date or something like that). Then upload your new mmui.mv, and see what works. If it fails, just revert to the backup copy.

The other option is the change the module name and code, and even the file name. Then add it to the mall, and then select it for the store. Then you can flip back and forth between UI modules in Admin.

Answered by Tom

Question:  Are there any resources (tutorials) on editing the mmui.mv file? Also, are there tutorials for Miva scripting? Or any good books on the subject?

Answer:  In http://www.santafemall.com/faq under the mmui category there are a number of easy to follow examples for some relatively simple modifications. Under the Other Sources category there are many links to other useful information. And you need to join the Merchant Coders group.

Answered by Luray

Question:  Can the language on the store be changed or does it comes in other languages?

Answer:   VISIT MIVA EXCHANGE: http://www.miva.com/exchange/

Look in the Miva Exchange under Merchant:User Interface. There is a
free function library with several language plugins. It does require
that you know how to edit the mmui.mv. Be sure to make backups. An
sample of it running is at my store link below.

Answered by William Weiland @ http://wcw.simplenet.com

Question:  How can I add text or html to the body of category pages?

Answer: An easier way to add html headers to categories
Return to Customizing Miva Merchant Tips Index


Here is a much simpler solution to the issue of adding
headers to categories than the one I previously proposed.

It does require you are running Miva Engine 3.5+ If you have
the ability to do file uploads in Miva Merchant then you are fine.


In the mmui.mv find the:
<MvFUNCTION NAME = "MMUI_Category"

then find this code in that function:

                <BR>
                <BLOCKQUOTE>
                        <FONT FACE = "&[ MMUI_Store.d.hdr_font ]" SIZE = "&[ MMUI_Store.d.hdr_fsize ]" COLOR = "&[ MMUI_Store.d.hdr_fg:entities ]"><B><MvEVAL EXPR = "{ Categories.d.name }"></B></FONT>

Replace all those lines with:

<MvIF EXPR="{sexists('/'$g.Store_Code$'_'$Categories.d.code$'_header.htm l')}">
        <MvDO FILE="{'/'$g.Store_Code$'_'$Categories.d.code$'_header.html'}">
                <BR>
                <BLOCKQUOTE>
<MvELSE>
                <BR>
                <BLOCKQUOTE>
                        <FONT FACE = "&[ MMUI_Store.d.hdr_font ]" SIZE = "&[ MMUI_Store.d.hdr_fsize ]" COLOR = "&[ MMUI_Store.d.hdr_fg:entities ]"><B><MvEVAL EXPR = "{ Categories.d.name }"></B></FONT>

</MvIF>

Then in the root of your site place a file named starting
with the store code of your store, then an underscore, then
the category code for the category you want it to appear
under followed by '_header.html' and if that file is
there it will load.

For Example. A store with a store code of 'TheCoolStore'
wants category headers to be loaded for the categories
with codes of 'FormalWear', 'Dresses', and 'Suits'. The
three files would be named:
TheCoolStore_FormalWear_header.html
TheCoolStore_Dresses_header.html
TheCoolStore_Suits_header.html

Answered by Jeff Hubber @ www.miva.com

Question:  When a customer is filling out an order form and doesn't have to go to the "ship to" side of the form, the "Continue" button is way over on the right side, almost out of sight. How can this be moved to the middle of the form to make it more visible

Answer: Find in mmui.mv, approx line 2482, (with word wrap off)

<TD ALIGN = "right"> <FONT FACE = "&[ MMUI_Store.d.body_font:entities ]"
SIZE = "&[ MMUI_Store.d.body_fsize:entities ]"><INPUT TYPE = "submit" VALUE
= "Continue">

replace with:
<TD ALIGN = "center"><FONT FACE = "&[ MMUI_Store.d.body_font:entities ]"
SIZE = "&[ MMUI_Store.d.body_fsize:entities ]"><INPUT TYPE = "submit" VALUE
= "Continue">

Notice how align right has changed to align center.

Answered by Ian Vincent

Question:  How can I modify the code so that the images all appear uniform automatically to the size that I designate?

Answer: You could do this by adding height and width attributes in the **ui.mv. In the mmui.mv, to designate size for thumbnail display do a find/search for
IMG SRC = "&[ Products.d.thumbnail ]"

You can add width and height to the end of this string. You can do the same thing with the full size image at:

IMG SRC = "&[ Products.d.image ]"

This may not be ideal if your images have dramatically different natural dimensions, like some are wide some are tall, the image may be distorted.  Also, pixel size may be the least of your worries, # of bytes and kbytes may be too high and make the images impractical for web viewing unless they are compressed.

Answered by:  Mike Crawford @ www.nothinbutprints.com

Question:  How can I completely remove the lefthand sidebar area that is used for the categories listings

Answer: This solution is for completely eliminateing the categories sidebar on the
lefthand side of the storefront page in Miva 1.25. I had many people
suggesting that I comment our out a particular line... this still left a
sidebar of empty unuseable space. The code below is the relevant snippet
that has been modified to give the storefront an appearance like this link
(
www.wonderrocks.com/Merchant/merchant.mv)

The only modifications are as follows...

1) Insert a <MvCOMMENT></MvCOMMENT> surrounding the following phrase...

<MvCOMMENT><MvDO FILE = "{ g.Module_Library_Utilities }" NAME =
"l.categories" VALUE = "{ Category_Tree( Stores.d.code, l.category_id,
l.category_id EQ 0 ) }"></MvCOMMENT>

This results in not showing categories in the lefthand space. However this
does not fix the table to the right. The next change in code allows the
entire window to be utilized.

2) Change the next table (immediately after the table that the
aforementioned MVComment was inserted). Here you need to change the Table
width value from 80% to 100%. The code should look as follows.

It was... <TD ALIGN = "left" VALIGN = "top" WIDTH = "80%">
It should be... <TD ALIGN = "left" VALIGN = "top" WIDTH = "100%">

Complete example of appropriate code...
<TR>
<MvIF EXPR = "{ l.greymenu }">
<TD ALIGN = "left" VALIGN = "top" BGCOLOR =
&[ MMUI_Store.d.ctgy_bg:entities ]">
<TABLE BORDER = 0 CELLPADDING = 10 CELLSPACING = 0>
<TR><TD ALIGN = "left" VALIGN = "top" NOWRAP>
<FONT FACE = "&[ MMUI_Store.d.ctgy_font:entities ]" SIZE =
&[ MMUI_Store.d.ctgy_fsize:entities ]">
<MvCOMMENT>
<MvDO FILE = "{ g.Module_Library_Utilities }" NAME = "l.categories" VALUE =
"{ Category_Tree( Stores.d.code, l.category_id, l.category_id EQ 0 ) }">
</MvCOMMENT>
</FONT>
</TD></TR>
</TABLE>
</TD>
</MvIF>

<TD ALIGN = "left" VALIGN = "top" WIDTH = "100%">
----- Original Message -----
From: <
Uniquely.Silver@pdq.net>
To: <
merchant-users@miva.com>
Sent: Tuesday, November 30, 1999 8:32 AM
Subject: [mru] Re: Removing Category Sidebar, Only 3 Products...

Answered by Troy Arnold

Question:  I know you can use any HTML in a Merchant product   description, but can you reference an html document in a product description?

Answer:  We use them in the UI file, as in (chopped from memory here):

<MvIF EXPR="{sexists('/yourpath/'$Products.d.code$'.html')}">
<MvDO FILE="{'/yourpath/'$Products.d.code$'.html'}">
<BR>
<MvELSE>
<MvEVAL EXPR = "{ Products.d.desc }">
</MvIF>

Where if it finds a separate .HTML file with the product code name, it includes it. Otherwise it pulls the memo field from the product database, if it exists. Also, for better or worse, we can store all the included files in their own directory, for a little bit easier management.

Answered by Jonathan @ http://driftwood.net/mmg/

 Question:  I need to add code to the final order page. Can someone at Miva tell me which module/location I can find it? thanks v1.25

Answer: In general, almost all modifications take place in a file called mmui.mv. This file contains many functions, several of which control the appearance of user "screens." Now, as far as the "final" order screen. If its the one where the user selects a payment method, you'll find it following the line:

<MvFUNCTION NAME = "MMUI_Order_ShippingPaymentSelection"

If its the following screen that results from a successful payment
selection, then its
<MvFUNCTION NAME = "MMUI_Order_Payment"

Anasered by:   Burce Golub

Question:  How can I set up a minimum amount required for an order?

Answer: Just look for the function "MMUI_Order_CustomerInformation" which starts with this line (in the mmui.mv):

<MvFUNCTION NAME = "MMUI_Order_CustomerInformation" STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">

Immediately after this line, add the following lines:


<MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.total" VALUE = "{ Basket_Total( g.Session_ID ) }">
<MvIF EXPR = "{ l.total LT 50.00 }">
<MvFUNCTIONRETURN VALUE = "{ MMUI_BasketContents() }">
</MvIF>

Then to let customers know why their order didn't go through add this:

Place this in the MMUI_BasketContents function, immediately after the <MvELSE> right after the MMUI_Begin_Screen call.

<MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.total" VALUE = "{ Basket_Total( g.Session_ID ) }">
<MvIF EXPR = "{ l.total LT 50.00 }">
<FONT FACE = "&[ MMUI_Store.d.body_font:entities ]" SIZE = "&[ MMUI_Store.d.body_fsize:entities ]" COLOR = "red">
<B>Your basket must contain at least $50.00 before checking out!</B>
</FONT>
</MvIF>

That's all there is to it.

Answered by Darren Ehlers @ http://www.starbase21.com/

Question:  How do I add a thumbnail image next to the  product on the basket contents page?

Answer: This will do it:

<MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.productid" VALUE = "{
Product_Find_Code(
Baskets.d.code ) }">

<IMG SRC ="&[ Products.d.thumbnail ]" BORDER = 0 alt="&[ Baskets.d.name ]">

The MvDo call looks up the product so you can refer to the thumbnail in
products.dbf.

Answered by Diana Bouska

Question:  How can I change the Gray & black box look of the "Continue", "Next", "Previous", etc buttons to an image of my own?

Answer:  You will have to go through the mmui.mv file with a search for each button you want to change, i.e. continue, next, previous. Make the following code change at each occurance of the button:

<MvCOMMENT><INPUT TYPE = "submit" VALUE = "Continue"></MvCOMMENT>
<INPUT TYPE="IMAGE" NAME="Continue button"
SRC="graphics/00000001/continue.gif" ALT="Continue button" BORDER="0">

This will replace the grey button with an image. Obviously, you can use any image path and name you wish.

Answered by luray @ http://www.santafemall.com/faq

Question:  How can I have a customer remain in Basket Contents after selecting "Add to Basket" instead of being returned to the product page?

Answer:  This is a simple change, but you will need to edit the category function of your mmui. Find the form for add to basket, and the hidden form field that looks like this:

<INPUT TYPE = "hidden" NAME = "Screen" VALUE = "CTGY">

change that line to

<INPUT TYPE = "hidden" NAME = "Screen" VALUE = "BASK">

Answered by Adam

Question:  I would like to use Style Sheets with the pages that Miva Generates. For my static pages, I include the following line in the <head> part of the  html document.

 <LINK REL=StyleSheet HREF="/includes/style.css" TYPE="text/css"
TITLE="Site Style Sheet">

Is there a single place I could put this in Miva so that all of the pages it generates read my style sheet? If not, how else could this be done? Can it be done?

Answer: Place the script just above the </HEAD> tag in the begin_screen function in the mmui.mv file.

Answered by Luray @ santafemall.com