New simple code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DMWEBER
    Mivite Lite

    • Feb 2009
    • 3

    #1

    New simple code

    Would like CALL FOR PRICE in the event I wish NOT to put in a price. As it is now, it always shows $0.00 which is lame.
    "if" statement ??? The default would be "call for price" if the item have $0.00, otherwise the price would show

    Dennis

    [email protected]
  • rajnishsi
    Mivite

    • May 2015
    • 176

    #2
    Re: New simple code

    Hi Dennis,

    Assuming you know the place from where your price is being generated and you want to do it in PROD page,

    This might be the code you can use for this purpose:

    Code:
    <mvt:if expr=" ( l.settings:product:base_price NE 0 )">
        &mvt:product:formatted_base_price;
    <mvt:else>
        <p><a href="(Your call for price action)">Call For Price</a></p>
    </mvt:endif>
    Let me know, if my assumptions are wrong any part, or if this doesn't work. In case of discounts, you might want to update the content inside IF clause with what you have default in your site. You'll also need to fill in "(Your call for price action)" part.
    Rajnish Sinha
    ---------------------
    https://twitter.com/rajnishsi

    Comment

    • DMWEBER
      Mivite Lite

      • Feb 2009
      • 3

      #3
      Re: New simple code

      I did have some issue so this is my CODE It's the one that would have KGMC Price

      <div class="panel panel-blue">
      <div class="panel-heading">GUARANTEED LOWEST PRICE Since 1989</div>
      <table class="table">
      <tr>
      <td class="prod-table-label">
      KGMC Price:
      </td>
      <td>
      <div class="prod-price"><span id="price-value-additional" style="text-decoration: line-through"></span> <span id="price-value">&mvt:product:formatted_base_price;</span></div>
      <div id="product-discounts"></div>
      </td>
      </tr>
      <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :LIST">
      <tr>
      <td class="prod-table-label">Retail Price:</td>
      <td><span class="prod-strikeout">&mvt:product:customfield_values:customf ields:LIST;</span></td>
      </tr>
      </mvt:if>
      <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :yousave">
      <tr>
      <td class="prod-table-label">You Save:</td>
      <td>$&mvt:product:customfield_values:customfields: yousave;</td>
      </tr>
      </mvt:if>








      <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :SPECIAL">
      <tr>
      <td class="prod-table-label">Special:</td>
      <td>&mvt:product:customfield_values:customfields:S PECIAL;</td>
      </tr>



      </mvt:if>

      Comment

      • rajnishsi
        Mivite

        • May 2015
        • 176

        #4
        Re: New simple code

        Hi,

        If I'm getting you correctly, this is what you are looking for :

        Code:
        <div class="panel panel-blue">
            <div class="panel-heading">GUARANTEED LOWEST PRICE Since 1989</div>
            <table class="table">
                <mvt:if expr="( l.settings:product:base_price NE 0 )">
                    <tr>
                        <td class="prod-table-label">KGMC Price:</td>
                        <td>
                            <div class="prod-price">
                                <span id="price-value-additional" style="text-decoration: line-through"></span> <span id="price-value">&mvt:product:formatted_base_price;</span>
                            </div>
                            <div id="product-discounts"></div>
                        </td>
                    </tr>
                    <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :LIST">
                        <tr>
                            <td class="prod-table-label">Retail Price:</td>
                            <td>
                                <span class="prod-strikeout">&mvt:product:customfield_values:customfields:LIST;</span>
                            </td>
                        </tr>
                    </mvt:if>
                    <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :yousave">
                        <tr>
                            <td class="prod-table-label">You Save:</td>
                            <td>$&mvt:product:customfield_values:customfields:yousave;</td>
                        </tr>
                    </mvt:if>
                    <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :SPECIAL">
                        <tr>
                            <td class="prod-table-label">Special:</td>
                            <td>&mvt:product:customfield_values:customfields:SPECIAL;</td>
                        </tr>
                    </mvt:if>
                <mvt:else>
                    <tr>
                        <td class="prod-table-label">
                            <button type="button">
                                <a href="(Your call for price action)">Call For Price</a>
                            </button>
                        </td>
                    </tr>
                </mvt:endif>
            </table>
        </div>
        Rajnish Sinha
        ---------------------
        https://twitter.com/rajnishsi

        Comment

        • Kierra
          Mivite Lite

          • Aug 2015
          • 2

          #5
          Re: New simple code

          I need this code to thanks..


          Comment

          Working...
          X