PDA

View Full Version : Miva IF Statement Syntax



Ron_D
08-21-2005, 06:15 AM
Hi everyone,
I'm new with Miva and I'm trying to find information on how to write code that adheres to Miva's syntax. I'd like to display a welcome message to the customer with their first name IF they have logged on. If they haven't logged on, then it'll just display the "Sign-In" link.

I tried backwards engineering the code by looking at established Miva IF statements. I'm having problems understanding the conditional equations that begin the IF statements.


Any help will be most appreciated!
Ron_D

rispku
08-23-2005, 03:25 PM
For what it's worth, Merchant 5 can already do that.

You need to add the 'Customer Link" item to the page you intend to display this on, and then add the following code where you want the link/welcome message to be displayed:

<mvt:item name="customerlink" />

You can edit the messages in the store edit/configuration area (Stores->storename).

Ron_D
08-24-2005, 03:25 AM
I managed to reverse engineer the demo store for the log-in issue I had, but in general, the Miva IF statement begins with an open tag with some sort of conditional equation within quotations. Where does it get the variable names and what are the operands to construct these equations? And how may I create user defined variables to be used in these equations?

Thanks for the reply, rispku,
Ron_D