[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
RE: [mv] if-field error
Minivend [if] statements, in general, do not nest very will. You might
want try changing the outer [if-field] to a regular [if] with a [then].
Your page is right on the verge of (some would say well past) being better
done with a [perl] statement, which is what I would recommend.
> -----Original Message-----
> From: owner-minivend-users@minivend.com
> [mailto:owner-minivend-users@minivend.com]On Behalf Of Eric Paul
> Sent: Tuesday, December 14, 1999 1:47 PM
> To: minivend-users@minivend.com
> Subject: [mv] if-field error
>
>
> ****** message to minivend-users from Eric Paul
> <epaul@spellbook.net> ******
>
> Is there any problem with using nested if-field statements? I
> am rendering
> a table of technical data, and not every product in my catalog has each
> field. So in my flypage.html I made a list of if-field conditions,
> contained in one big if-field that decides whether or not to
> show the tech
> data at all. Well, everything was working fine until I added a
> footer at
> the bottom of the table. After the footer is the final
> [/if-field]. For
> some reason, this footer is now always being displayed. I
> tried putting in
> HTML comments and sure enough, the last nested [/if-field] is
> breaking the
> whole big [if-field]. I did a grep -c on my flypage, and I
> have the proper
> number of [if-fields] to go with my [/if-fields] so that's not the
> reason. Any other suggestions?
>
> Below is my flypage.html file. Maybe I made some major boo-boo
> that I've
> been starting at for too long to be able to see it anymore :P
>
> <HTML>
> [tag flag build][/tag]
> <HEAD><TITLE>[item-description]</TITLE></HEAD>
> <BODY MV="body 3">
> __LOGOBAR__
> __MENUBAR__
> __LEFTSIDE__
>
> <TABLE WIDTH="80%"><TR __HEADERBG__ TEXT="__HEADERTEXT__"><TD
> ALIGN=CENTER>
> <BR><FONT FACE="arial, helvetica"><H3> Category: [item-field
> category]</H3>
> </TD></TR></TABLE>
> [table-font FACE="verdana,arial, helvetica" SIZE=3]
> <TABLE CELLPADDING="3" VALIGN="top" >
> <TR>
> <TD>
> <TABLE>
> <TR>
> <TD VALIGN="top" ROWSPAN=2>
> <A HREF="[area [item-code]]">
> <IMG SRC="[item-field largeimage]"
> ALT="[item-field description]" BORDER="0"></A>
> <BR>
> </TD>
> <TD VALIGN="top">
>
> <B>[item-field description]</B>
> <BR>
>
> <P>
> [L]Catalog[/L] [L]Number[/L]: [item-code]<BR>
> Price:<B>
> [item-price]
> </B>
>
> [if ordered [item-code]]
> <P>
> <FONT COLOR=RED>
> This item is currently in your
> shopping cart.
> </FONT>
> [/if]
> <P>
> [if-field size]
> <FORM ACTION="[process-target]" METHOD=POST>
> <TABLE BACKGROUND="__IMAGE_DIR__/__BGIMAGE__">
> <TR><TD VALIGN=TOP>
> <INPUT TYPE=SUBMIT VALUE="[L]ORDER NOW[/L]">
> <INPUT TYPE=hidden NAME=mv_todo VALUE=refresh>
> <INPUT TYPE=hidden NAME=mv_order_item
> VALUE="[item-code]">
> <INPUT TYPE=hidden
> NAME=mv_separate_items VALUE="1">
> </TD><TD VALIGN=TOP BGCOLOR="#00F0F0">
> <INPUT SIZE=3 NAME=mv_order_quantity VALUE="1">
> </TD></TR>
> <TR>
> <TD COLSPAN=2>
> [item-accessories
> size][item-accessories
> color]
> </TD>
> </TR>
> <TR>
> <TD COLSPAN=2>
> <TABLE>
> <TR>
> <TD MARGINWIDTH=5 COLSPAN=2
> BACKGROUND=""
> __HEADERBG__
> TEXT="__HEADERTEXT__">
> <H3><B>Quick-order</B></H3>
> </TD>
> </TR>
> <TR>
> <TH>
> Color
> </TH>
> <TH>
> Sizes
> </TH>
> </TR>
> [loop arg="[item-accessories
> color, options]"]
> <TR>
> <TD>
> [loop-code]
> </TD>
> <TD> - - >
> </TD>
> [loop with="-a" arg="[item-accessories
> size, options]"]
> <TD>
> [page form="
> mv_order_item=[item-code]
> mv_order_color=[loop-code]
> mv_order_size=[loop-code-a]
> mv_separate_items=1
> mv_todo=refresh
> "][loop-code-a]</A><BR>
> </TD>
> [/loop]
> </TR>
> [/loop]
> </TABLE>
> </TD>
> </TR>
> </TABLE>
> </FORM>
> [else]
> <BR><B>[order [item-code]]Order
> Now</A></B></NOBR><BR><BR>
> [/else]
> [/if-field]
>
> </TD>
> </TR>
> <TR>
> <TD COLSPAN="2">
> <BR>
> </TD>
> </TR>
> [if-field fullprice]
> <TR>
> <TD COLSPAN="2">
> <P>This item is part of a limited edition run.
> Because of this, the item may not be immedately available to
> ship to you. The
> full price of this item is $[item-field fullprice]. If you
> place an order
> today, we will charge you a non-refundable $25.00 deposit. We
> will contact
> you when we have a firm shipping date to arrange for the
> balance due.</P>
> </TD></TR>
> [/if-field]
> [if-field dimensions]
> <TR>
> <TD COLSPAN="2" VALIGN=TOP ALIGN=LEFT>
> <TABLE BORDER=1>
> <TR><TD COLSPAN=2
> ALIGN=CENTER><B>DIMENSIONS</B></TD></TR>
> [if-field bladewidth]
> <TR><TD>Blade Width</TD><TD>[item-field
> bladewidth]</TD></TR>
> [/if-field]
> [if-field bladelength]
> <TR><TD>Blade Length</TD><TD>[item-field
> bladelength]</TD></TR>
> [/if-field]
> [if-field length]
> <TR><TD>Overall Length</TD><TD>[item-field
> length]</TD></TR>
> [/if-field]
> [if-field quil]
> <TR><TD>Quillion Length</TD><TD>[item-field
> quil]</TD></TR>
> [/if-field]
> [if-field actwt]
> <TR><TD>Weight</TD><TD>[item-field
> actwt]</TD></TR>
> [/if-field]
> [if-field hilt]
> <TR><TD>Hilt Length</TD><TD>[item-field
> hilt]</TD></TR>
> [/if-field]
> [if-field pomel]
> <TR><TD>Pomel Size</TD><TD>[item-field
> pomel]</TD></TR>
> [/if-field]
> [if-field handle]
> <TR><TD>Handle Length</TD><TD>[item-field
> handle]</TD></TR>
> [/if-field]
> [if-field head]
> <TR><TD>Head Dimensions</TD><TD>[item-field
> head]</TD></TR>
> [/if-field]
> [if-field pole]
> <TR><TD>Pole Diameter</TD><TD>[item-field
> pole]</TD></TR>
> [/if-field]
> [if-field balance]
> <TR><TD>Balance Point</TD><TD>[item-field
> balance]</TD></TR>
> [/if-field]
> </TABLE>
> </TD></TR>
> <TR><TD>Please note: The rose is exactly 12
> inches.</TD></TR>
> [/if-field]
> <TR>
> <TD COLSPAN="2">
> <BR>
> </TD>
> </TR>
> <TR>
> <TD COLSPAN="2">
> <P>
> <BLOCKQUOTE>[item-field comment]</BLOCKQUOTE>
> <P>
> </TD>
> </TR>
> </TABLE>
> </TD>
> </TR>
> </TABLE>
> [/table-font]
>
> __NO_RIGHT__
> __MENUBOTTOM__
> __COPYRIGHT__
> </CENTER>
> <!-- current page: @@MV_PAGE@@ -->
> </BODY>
> </HTML>
>
> Some long lines wrapped, but I think all the substance is there.
>
> Eric
> ---
> Eric Paul
> SpellBook Systems
> http://www.spellbook.net
> -
> To unsubscribe from the list, DO NOT REPLY to this message.
> Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to
> Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
>