We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36811
    • 5 Posts
    hi,

    I'm new to using minishop and I'd like to know if there's a way of sorting the items that's being displayed.
      • 42046
      • 436 Posts
      If you're using a getPage call to display the products use a standard &sortby=`whatever` (can use JSON strings here) or if you're using a direct call to the msProducts snippet use the format [[!msProducts?sortby=`msProduct.pagetitle`]] or [[!msProducts?sortby=`Data.price`]] or to display items marked as favorites [[!msProducts?where=`{"Data.favorite":"1"}`]]

      Sorting by TVs can be achieved through such things as:

      [[!msProducts?
      &includeTVs=`action,discount`
      &sortby=`TVaction.value`
      &where=`{"TVdiscount":"1"}`
      ]]

      More examples are at: http://bezumkin.ru/modx/minishop2/snippets/917/ (Russian page)