We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 436 ☆ A M B ☆
    • 265 Posts
    I’ve been trying to figure out the best way to do this for a few hours and I can’t work it out.

    What do you guys think is the best way to call some recently added products?

    e.g. All the last products added to the stores inventory within the last month?

    I was thinking of using Ditto with extenders=`request` then the Recent Products nav item would call something like
    <li><a href="/products&ditto_display=10&filter=pub_date<SOMETHING" />Recent Products</a></li>
    but then got stuck.

    To call only Clearance products I was going to use the same method and filter products only tagged with "clearance" using extenders=`tagging` maybe something like this could be used for the Recent Products, but I’m not sure.

    Any ideas?
      MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.
      • 436 ☆ A M B ☆
      • 265 Posts
      I may have figured this out.

      It also just occurred to me that grabbing the last months new additions to the store’s inventory might not be the best idea. If the client hasn’t added any new products to their inventory for over a month that page would show up empty. Not very impressive.

      Instead the Recent Products tab will call:
      <li><a href="/products&ditto_display=20&ditto_sortBy=pub_date&ditto_sortDir=desc"/>Recent Products</a></li>

      This will instead just grab the last 20 products, order by date with the newest first.

      I’d be interested to see if anyone else has got other ideas for achieving this or similar techniques?
        MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.