Announcement

Collapse
No announcement yet.

Original Miva Shipping Method Conditionals

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

    Original Miva Shipping Method Conditionals

    Under what circumstances would a shipping method not have a price?
    If I put conditionals on the "if" output to restrict certain shipping methods to certain price groups do I need to put the conditionals on the "else" output as well?

    Code:
    <mvt:if expr="ISNULL l.settings:shippingmethods">    <option value="">Unable to Calculate Shipping Costs</option>
    <mvt:else>
        <mvt:foreach array="shippingmethods" iterator="method">
            <mvt:if expr="NOT ISNULL l.settings:method:price">
                <option value="&mvte:method:module;:&mvte:method:code;">&mvt:method:name; (&mvt:method:formatted_price;)</option>
            <mvt:else>
                <option value="&mvte:method:module;:&mvte:method:code;">&mvt:method:name;</option>
            </mvt:if>
        </mvt:foreach>
    </mvt:if>
    Attached Files

    #2
    Re: Original Miva Shipping Method Conditionals

    You should only need to add your logic to the if and not the else. It is possible for a shipping method not to have a price, but most all shipping methods will contain a price value.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Original Miva Shipping Method Conditionals

      Wouldn't you also want to use:

      <mvt:if expr="l.settings:method:price">

      as if there is no cost, price will be '0' which is NOT ISNULL
      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

      Working...
      X