Announcement

Collapse
No announcement yet.

How do I display the plain ol' price?

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

    How do I display the plain ol' price?

    There is a nifty feature on the product page which calculates the price based on the number in the Quantity field. But I have a lot of items that have minimum quantities above 1.

    Example: A product is $3.09 each and has a minimum quantity of 100. I know it will confuse some of my customers to see the price as $309.00 when they first visit the page.

    So, what changes would I have to make to the template to show just the simple, non-calculated price? I'm already in advanced mode.

    Code:
                        <mvt:comment>PRODUCT PRICE BEGIN</mvt:comment>
                        <mvt:if expr="l.settings:product:price EQ 0">
                        <!-- If price is Zero, then display this: (nothing) -->
                        <mvt:else>
                        <!-- Otherwise, display this: -->
                            <div class="h3 nbm">
                                <mvt:if expr="l.settings:product:base_price GT l.settings:product:price">
                                    <s id="js-additional-price" class="product-additional-price">&mvt:product:formatted_base_price;</s>
                                </mvt:if>
                                <span id="js-price-value" class="product-price" data-base-price="&mvt:product:price;">&mvt:product:formatted_price;</span>
                                <mvt:if expr="l.settings:product:customfield_values:customfields:product_flag">
                                    <span class="product-product-flag">&mvt:product:customfield_values:customfields:product_flag;</span>
                                </mvt:if>
                            </div>
                        </mvt:if>
                        <mvt:comment>PRODUCT PRICE END</mvt:comment>
    Thanks for any help.
    Last edited by VisHorizons; 04-11-18, 07:09 AM.
    Doug
    Using Miva Merchant since 2004
    StoreSMART.com

    #2
    The tokens feature will really help you find the variables for this stuff. I think it is assigned by default to every template, but if it isn't go into the template items and assign the item named tokens.
    then on the ... button at the top left, you will see "view tokens". it will pop up and show you all the tokens available. for pages like categories or products, you can even put in a product or category code so you can find values by their values... here is a video that might help you https://docs.miva.com/videos/token-list

    The one you want is
    &mvt:product:price;
    Last edited by kayakbabe; 04-11-18, 08:14 AM.

    Comment


      #3
      Actually might be:

      &mvt:product:formatted_base_price;

      of

      &mvt:product:formatted_price;
      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


        #4
        Thanks for the replies.

        I tried:
        Code:
        <span id="js-price-value" class="product-price" data-base-price="&mvt:product:price;">&mvt:product:formatted_base_price;</span>
        That still returns the calculated total.

        (Also, on my dev site, the token list is broken. Not too worried about fixing that, as I plan to go live soon.)
        Doug
        Using Miva Merchant since 2004
        StoreSMART.com

        Comment


          #5
          Try

          <mvt:do name="g.theActualPrice" file="g.Module_Root $ g.Store:currncy_mod:module" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:product:price )" />

          &mvt:global:theActualPrice;

          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


            #6
            Great, that seems to have done the trick! Thanks!

            EDIT:

            I notice that after I implemented that change, my Related Products carousel isn't working. It's just showing everything in a column.
            Last edited by VisHorizons; 04-12-18, 05:45 AM.
            Doug
            Using Miva Merchant since 2004
            StoreSMART.com

            Comment


              #7
              With Bruce's fix, if the product has an attribute, then the Related Products carousel is messed up. If the product does not have an attribute, everything is fine. In either case, the price displays they way I like.
              Doug
              Using Miva Merchant since 2004
              StoreSMART.com

              Comment


                #8
                hmmm...there should be no reason the code i wrote would cause an issue with the carousel....perhaps you need to wrap the result in a more structured container?
                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


                  #9
                  Originally posted by VisHorizons View Post
                  With Bruce's fix, if the product has an attribute, then the Related Products carousel is messed up. If the product does not have an attribute, everything is fine. In either case, the price displays they way I like.
                  Check to see if you have an open or broken closing tag. That's what this sounds like.
                  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


                    #10
                    Thanks for your help. Yeah, my guess is that Bruce's code is perfect, and that I messed up somewhere. Usually a safe bet ha ha.
                    Last edited by VisHorizons; 04-12-18, 09:30 AM.
                    Doug
                    Using Miva Merchant since 2004
                    StoreSMART.com

                    Comment

                    Working...
                    X