Announcement

Collapse
No announcement yet.

Code now causing compiling error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Code now causing compiling error

    I've been using this snippet of code for years now:

    Code:
    <tr><td align="left" valign="top" nowrap>
                <mvt:item name="fonts" param="body_font">
                <b>Ship Via:</b>
                </mvt:item>
            </td><td align="left" valign="bottom">
                <mvt:item name="fonts" param="body_font">
                <mvt:comment>Shipping Method Radio Buttons</mvt:comment>
    <mvt:if expr="ISNULL l.settings:shippingmethods">
    Unable to Calculate Shipping Costs<br />
    <mvt:else>
    
    <mvt:foreach array="shippingmethods" iterator="method">
    <mvt:if expr="ISNULL g.ShippingMethod AND pos1 EQ 1">
    <input type="radio" name="ShippingMethod" value="&mvte:method:module;:&mvte:method:code;" checked="checked" /> &mvt:method:name; (&mvt:method:formatted_price;)<br />
    <mvt:elseif expr="g.ShippingMethod EQ (l.settings:method:module $ : $ l.settings:method:code)">
    <input type="radio" name="ShippingMethod" value="&mvte:method:module;:&mvte:method:code;" checked="checked" /> &mvt:method:name; (&mvt:method:formatted_price;)<br />
    <mvt:else>
    <input type="radio" name="ShippingMethod" value="&mvte:method:module;:&mvte:method:code;" /> &mvt:method:name; (&mvt:method:formatted_price;)<br />
    </mvt:if>
    </mvt:foreach>
    </mvt:if>
    
    <mvt:if expr="ISNULL l.settings:shippingmethods">
    <br>No valid shipping methods are available for your order. You will be contacted regarding shipping when your order is processed.
    </mvt:if>
                </mvt:item>
            </td></tr>
    And now all of sudden when I was trying to make a simple tweak to the page template, I get this error:
    Error compiling template: Line 82: Expression compilation failed: Invalid Argument ':' Found in expression
    which is referring to this line of code:

    Code:
    <mvt:elseif expr="g.ShippingMethod EQ (l.settings:method:module $ : $ l.settings:method:code)">
    what is the correction needed to allow the template to compile?

    Thanks,
    Leslie
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Re: Code now causing compiling error

    $ ':' $

    odd that it ever would compile but i've seen the compiler miss minor errors before. basically, it was using ":" as a variable.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: Code now causing compiling error

      Originally posted by Bruce - PhosphorMedia View Post
      $ ':' $

      odd that it ever would compile but i've seen the compiler miss minor errors before. basically, it was using ":" as a variable.
      That part I understand, I need to find, figure out what the replacement code is.
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment


        #4
        Re: Code now causing compiling error

        Originally posted by lesliekirk View Post
        That part I understand, I need to find, figure out what the replacement code is.
        <mvt:elseif expr="g.ShippingMethod EQ (l.settings:method:module $ ':' $ l.settings:method:code)">

        should work
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Re: Code now causing compiling error

          <mvt:doh><mvt:facepalm>thanks</mvt:facepalm></mvt:doh>
          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment

          Working...
          X