Announcement

Collapse
No announcement yet.

More than one Product Listing for each category on sale in promotional CTGY page

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

    More than one Product Listing for each category on sale in promotional CTGY page

    Is it possible to have more than one Product Listing (similar to Levels ReadyTheme SFNT "Featured Products") for each category on sale in promotional CTGY (e.g.: "Deals") page? If so, how?

    Current Levels ReadyTheme SFNT "Featured Products" Product Listing Snippet:
    Code:
    <!-- READYTHEME PRODUCTLISTING 1 begin -->
    
    
    <!-- READYTHEME PRODUCTLISTING 1 begin -->
    <div class="row product-carousel">
        <div class="column whole hide medium-show medium-two-fifths large-one-fourth">
            <div class="well carrot-right featured-products-descrip" id="js-featured-products-height">
                <h3 class="nm">Featured Products</h3>
                <div class="sky">&bull;&bull;&bull;&bull;&bull;</div>
                <p><mvt:item name="readytheme" param="contentsection( 'home_featured_products' )" /></p>
                <mvt:comment>update the category path here</mvt:comment>
                <a href="//&mvt:global:domain:name;/[CTGY].html" class="button button-hollow align-center uppercase featured-products-view-all">View All</a>
            </div>
        </div>
        <div class="column whole align-center show medium-hide mobile-featured-products">
            <h3 class="nm">Featured Products</h3>
            <div class="sky">&bull;&bull;&bull;&bull;&bull;</div>
        </div>
        <div class="column whole large-three-fourths medium-three-fifths whats-popular-carousel">
            <div id="js-whats-popular-carousel">
                <mvt:foreach iterator="product" array="readytheme:products">
    
                <mvt:if expr="l.settings:product:inv_available LE 0">
                    <mvt:comment>do not display sold out products in carousel</mvt:comment>
                <mvt:else>
    
    
                        <div class="category-product featured-product align-center medium-align-left js-featured-products-height-min">
                            <div class="category-product-image-wrapper flag">
                                <mvt:if expr="NOT ISNULL l.settings:product:imagetypes:main">
                                    <mvt:assign name="l.settings:product:src" value="l.settings:product:imagetypes:main" />
                                <mvt:else>
                                    <mvt:assign name="l.settings:product:src" value="g.theme_path $ '/images/img_no_thumb.jpg'" />
                                </mvt:if>
                                <a href="&mvte:product:link;" class="category-product-image-wrapper">
                                    <img src="&mvt:product:src;" alt="&mvte:product:name;">
                                </a>
                                <div class="category-product-cta-wrapper">
                                    <button type="button" class="button category-product-cta-button category-product-cta-quickview js-quick-view" data-product-link="&mvte:urls:PROD:auto_sep;Product_Code=&mvte:product:code;&amp;show=quickview">
                                        <span class="levels-icon-eye"></span>
                                        <span class="category-product-cta-quickview-text"> Quickview</span>
                                    </button>
                                    <form action="&mvte:urls:BASK:auto;" method="POST" class="category-product-form">
                                        <input type="hidden" name="Action" value="ADPR">
                                        <input type="hidden" name="Product_Code" value="&mvte:product:code;">
                                        <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;">
                                        <input type="hidden" name="Quantity" value="1">
                                        <button class="button category-product-cta-button category-product-cta-button-adpr">
                                            <span data-icon="&#xe07a;"></span><span class="category-product-cta-adpr-text"> Add to Cart</span>
                                        </button>
                                    </form>
                                </div>
                            </div>
                            <span class="breaker"></span>
                            <div class="featured-product-bottom">
                                <p class="category-product-name"><a href="&mvte:product:link;">&mvt:product:name;</a></p>
    
    
    
    
                                <p class="pricing">
    
    
                                        <mvt:if expr="l.settings:product:base_price GT l.settings:product:price">
                                            <span class="category-product-retail-price">&mvt:product:formatted_base_price;</span> <span class="category-product-sale-price">&mvt:product:formatted_price;</span>
                                        <mvt:else>
                                            <span class="category-product-price bold">&mvt:product:formatted_price;</span>
                                        </mvt:if>
    
    
                                    <mvt:if expr="l.settings:product:customfield_values:customfields:product_flag">
                                        <span class="category-product-flag">&mvt:product:customfield_values:customfields:product_flag;</span>
                                    </mvt:if>
                                    <mvt:if expr="l.settings:product:price GE 50">
                                            <span class="truck-icon"><img src="graphics/00000001/free-shipping-truck.png" alt="Free Shipping" title="This item qualifies for Free US Shipping & Handling"></span>
                                    </mvt:if>
                                </p>
                                <mvt:if expr="l.settings:product:inv_available EQ 1">
                                    <p><strong class="limited-stock">Only 1 left in stock!</strong></p>
                                </mvt:if>
    
                            </div>
                        </div>
                    </mvt:if>
                </mvt:foreach>
            </div>
        </div>
    </div>
    <!-- READYTHEME PRODUCTLISTING 1 end -->
    
    
    
    <!-- READYTHEME PRODUCTLISTING 1 end -->
    Thank you, Bill Davis

    #2
    Hi Bill,

    Do you mean a dynamic featured products section for each category display page?
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Originally posted by Matt Zimmermann View Post
      Hi Bill,

      Do you mean a dynamic featured products section for each category display page?
      Not sure I understood what you meant. So here is what I need:

      Only one category page (e.g.: name Deals) that contains the following rows:
      • Product Display one row three columns (9 products) from Category A
      • Product Display one row three columns (9 products) from Category B
      • Product Display one row three columns (9 products) from Category C
      • Product Display one row three columns (9 products) from Category D
      • Product Display one row three columns (9 products) from Category E
      • Product Display one row three columns (9 products) from Category F
      The code I posted was done my the Miva Design Team several years ago. It displays random products from a desired category that are only in stock.
      Thank you, Bill Davis

      Comment


        #4
        Hi Bill,

        I think I get it. You would have to load the product for each category, returning the first nine, and create the layout:
        Code:
        <!-- load all products assigned to a specific category...Category_A in this example -->
        <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code( 'Category_A', l.settings:current_category )" />
        <mvt:do name="l.result" file="g.Module_Library_DB" value="Runtime_ProductList_Load_Offset_Category( l.settings:current_category:id, g.Offset, 9, g.NextOffset, l.settings:products )" />
        
        <mvt:foreach iterator="product" array="products">
             <!-- Code your layout here -->
        </mvt:foreach>
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #5
          Originally posted by Matt Zimmermann View Post
          Hi Bill,

          I think I get it. You would have to load the product for each category, returning the first nine, and create the layout:
          Code:
          <!-- load all products assigned to a specific category...Category_A in this example -->
          <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code( 'Category_A', l.settings:current_category )" />
          <mvt:do name="l.result" file="g.Module_Library_DB" value="Runtime_ProductList_Load_Offset_Category( l.settings:current_category:id, g.Offset, 9, g.NextOffset, l.settings:products )" />
          
          <mvt:foreach iterator="product" array="products">
          <!-- Code your layout here -->
          </mvt:foreach>
          It sound like what I need, not very familiar with Miva Script, but I will give it a try. The idea is to have sale page that lists one row for each category on sale the contains a small random sampling of in-stock products and a link to view all items for said category on sale.

          Our biggest issue when running large promotions, is letting visitors know all the categories and specific items on sale.

          It would be ideal if someday Miva can dynamically display promotions on SFNT and on other pages "promotion panels" similar to Amazon and Deal page (for categories and products based on Price Group without having to know one line of code. Most shops don't have the resources to "effectively" run large and frequent promotions. Most shops use a slider with three to five panels on the home page. Dare to dream.
          Thank you, Bill Davis

          Comment

          Working...
          X