Announcement

Collapse
No announcement yet.

Display Regular and Sale Price in What's Popular Section

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

    Display Regular and Sale Price in What's Popular Section

    I'm using the Ready Theme>Product Listings>What's Popular section to display sale products. It's easy to set up and works great but I can only display either the regular price or the sale price; not both.

    Ideally I'd like the products to display just as they look in the category product display. It has the regular price faded and crossed out with the sale price right next to it and in red. Anyway to do this?
    Matt E.
    www.harpkit.com

    #2
    Re: Display Regular and Sale Price in What's Popular Section

    Try adding this code:

    Code:
    <mvt:if expr="l.settings:product:base_price GT l.settings:product:price">
    	<p><strong class="strike">&mvt:product:formatted_base_price;</strong><strong class="red">&mvt:product:formatted_price;</strong></p>
    <mvt:else>
    	<p><strong>&mvt:product:formatted_price;</strong></p>
    </mvt:if>
    Also under Point and Click Mode, make sure Display Price is set to Sale Price and Additional Price Display is set to base price.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Display Regular and Sale Price in What's Popular Section

      Thanks, Brennan. I tried that and it does, indeed, display the prices as requested. But it has the unfortunate side effect of displaying all the products in one column instead of in the sliding carousel.
      Matt E.
      www.harpkit.com

      Comment


        #4
        Re: Display Regular and Sale Price in What's Popular Section

        I forgot to mention, when you update settings in point and click mode it rewrites the template back to default. After you change the settings, go back to point and click mode, revert back a version, then add your new code.
        Brennan Heyde
        VP Product
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          Re: Display Regular and Sale Price in What's Popular Section

          That did it!

          Before you solved this for me I was attempting to do this using custom fields but wasn't having any luck. I did test the custom field code on the product display and it worked fine there, just doesn't show anything on this carousel. Can you not use custom fields here?

          Here is the code I used.

          Code:
          <div class="row bottom-shadow product-carousel">    <div class="column whole h3"><span class="uppercase">ON SALE through Dec. 31</span><a href="" class="float-right">view all<span data-icon="&#xe046;"></span></a></div>
              <div id="js-whats-popular-carousel" class="column whole float-none whats-popular-carousel">
                  <mvt:foreach iterator="product" array="readytheme:products">
                      <mvt:if expr="l.settings:product:customfield_values:customfields:product_flag NE 'none'">
                          <mvt:assign name="l.settings:product:flag" value="'flag--' $ tolower(l.settings:product:customfield_values:customfields:product_flag)" />
                      </mvt:if>
                      <div class="category-product">
                          <a href="&mvte:product:link;" title="&mvt:product:name;">
                              <span class="flag &mvt:product:flag;">
                                  <mvt:if expr="NOT ISNULL l.settings:product:imagetypes:main">
                                      <img src="&mvte:product:imagetypes:main;" alt="&mvte:product:name;" title="&mvte:product:name;" />
                                  <mvt:else>
                                      <img src="../images/img_no_thumb.jpg" alt="&mvte:product:name;" title="&mvte:product:name;" />
                                  </mvt:if>
                              </span>
                              <span class="breaker"></span>
                              <p>&mvt:product:name;</p>
                              <p><strong>&mvt:product:formatted_price;</strong></p>
                              <mvt:item name="customfields" param="Read_Product_Code(g.Product_Code,'msrp',g.msrp )" />
                             <font size="-1">&mvte:global:msrp;</font>
                              
                          </a>
                      </div>
                  </mvt:foreach>
              </div>
          </div>
          Matt E.
          www.harpkit.com

          Comment


            #6
            Re: Display Regular and Sale Price in What's Popular Section

            Yes, make sure the custom fields are assigned to the readytheme product listing and the code above should work.
            Brennan Heyde
            VP Product
            Miva, Inc.
            [email protected]
            https://www.miva.com

            Comment


              #7
              Re: Display Regular and Sale Price in What's Popular Section

              I tried that and it didn't work. I wonder if it is because I haven't made any of the 9.0004 template changes... No big deal though. Your original solution works fine and I'm happy with that.
              Matt E.
              www.harpkit.com

              Comment

              Working...
              X