Announcement

Collapse
No announcement yet.

Need help with array of newest products for specific category - TOOLKIT

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

    Need help with array of newest products for specific category - TOOLKIT

    This code works beautifully for displaying RANDOM products for a specific category -
    but I need to display NEWEST products -

    ANY help would be greatly appreciated :-)


    <mvt:item name="toolkit" param="sassign|cat_code|EveningGownsSleeve" />
    <a href="/CTGY/EveningConservativeCoverage.html"><h1>Evening Gowns with Sleeves</h1></a>
    <mvt:item name="toolkit" param="randomcat|pcount|g.cat_code|5" />
    <mvt:if expr="pcount GT 0">
    <table border="0" width="100%" cellpadding="35px" cellspacing="25px">
    <tr valign="top" align="center">
    <mvt:foreach iterator="sub_product" array="sub_products">
    <td width="20%" padding="15px">
    <mvt:if expr="NOT ISNULL l.settings:sub_product:thumbnail">
    <a href="/PROD/&mvt:sub_product:code;.html"><img src="&mvt:sub_product:thumbnail;" height="150px" width="100x" border="0"></a>
    </mvt:if>
    <br />
    <a href="/PROD/&mvt:sub_product:code;.html">&mvt:sub_product:name ;</a>
    </td>
    </mvt:foreach>
    </tr>
    </table>
    </mvt:if>

    #2
    Re: Need help with array of newest products for specific category - TOOLKIT

    Look at Toolkit's #34 last/ lastcat function instead of using randomcat.

    Comment


      #3
      Re: Need help with array of newest products for specific category - TOOLKIT

      That does work well for the last products added to the store -

      but I need to add this (or something similiar) <mvt:item name="toolkit" param="sassign|cat_code|EveningGownsSleeve" />
      to make it only display the newest products for a SPECIFIC category:

      Any clues?

      ~Michelle

      Comment


        #4
        Re: Need help with array of newest products for specific category - TOOLKIT

        If you use the "lastcat" function, it'll do it based on the current category code:

        "A variation of this is the function lastcat. Everything is identical except use lastcat instead of last in the function. It can only be used on category pages. It displays the most recent products added to the current category. "


        If you aren't trying to do it on the CAT page that won't work, though. What's the application?
        Last edited by nottheusual1; 11-08-14, 12:55 PM.

        Comment


          #5
          Re: Need help with array of newest products for specific category - TOOLKIT

          I am trying to use this on a category page -
          this category page does not show products for this category,
          it displays a "forced listing" of other categories.

          I tried changing the code to below, but no dice:

          <mvt:item name="toolkit" param="sassign|cat_code|EveningGownsSleeve" />
          <mvt:item name="toolkit" param="lastcat|pcount|10" />
          <mvt:if expr="pcount GT 0">
          <table border="0" width="200">
          <th>What's New</th>
          <tr><td align="center">
          <font size="-1">
          <mvt:foreach iterator="newproduct" array="new">
          <a href="&mvt:global:sessionurl;Screen=PROD&Product_C ode=&mvta:newproduct:code;&Store_Code=&mvta:store: code;">
          &mvt:newproduct:name;</a>
          <br>
          &mvt:newproduct:formatted_price; <br><br>
          </mvt:foreach>
          </font>
          </td></tr>
          </table>
          </mvt:if>

          Comment


            #6
            Re: Need help with array of newest products for specific category - TOOLKIT

            Check out the directions once more -- for sure you aren't needing to assign the category code. The Toolkit function will get it automatically.

            Is this an actual category template page or an additional page-type concept?

            Comment


              #7
              Re: Need help with array of newest products for specific category - TOOLKIT

              I am trying to use it on an actual category page -
              but the Toolkit code is getting the category code from the CURRENT category,
              and need to assign DIFFERENCE category codes for each array on the page.

              This is why I was trying
              <mvt:item name="toolkit" param="sassign|cat_code|EveningGownsSleeve" />
              before the
              <mvt:item name="toolkit" param="lastcat|pcount|10" />

              Comment


                #8
                Re: Need help with array of newest products for specific category - TOOLKIT

                Hopefully Bill will chime in or one of the Miva guys. I don't know if it's possible to change the cat_code like you need to. Sorry!

                Comment


                  #9
                  Re: Need help with array of newest products for specific category - TOOLKIT

                  DRAT!!!

                  It works just fine with RANDOMCAT
                  just not NEW :-(

                  Thank you for your help, though :-)

                  ~Michelle

                  Comment


                    #10
                    Re: Need help with array of newest products for specific category - TOOLKIT

                    The variable is probably category_code since lastcat is an automatic assignment to the current category.
                    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                    Facebook http://www.facebook.com/EmporiumPlus
                    Twitter http://twitter.com/emporiumplus

                    Comment


                      #11
                      Re: Need help with array of newest products for specific category - TOOLKIT

                      Bill, you are WONDERFUL!!!

                      Changed
                      <mvt:item name="toolkit" param="sassign|cat_code|EveningGownsSleeve" />
                      to
                      <mvt:item name="toolkit" param="sassign|category_code|EveningGownsSleeve" />

                      and it works perfectly ...

                      THANK YOU SO MUCH :-)

                      Comment

                      Working...
                      X