ORDH Sort Orders Newest First MM9

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phishbed
    Mivite

    • Nov 2007
    • 170

    #1

    ORDH Sort Orders Newest First MM9

    Hello. Using Suivant ReadyTheme, is there a way to reverse the order history list display order? I've seen a few posts about including the sort variable in the ORDH link but it did not cover CSSUI links. I also saw a post about only displaying 365 days of orders but I'd rather just reverse the order to new orders first. Thanks for your help!
    Jamin Jones, CEO
    the Appalachian Offroad Motorcycle Company
  • kayakbabe
    Mega Mivite




    • Jun 2008
    • 1520

    #2
    me too!

    Comment

    • Matt Zimmermann
      Mega Mivite










      • Apr 2008
      • 2482

      #3
      You should be able to change the link to include the sort parameter:
      Code:
      &mvte:urls:ORDH:auto_sep;SortBy=OrdDtDesc
      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

      • kayakbabe
        Mega Mivite




        • Jun 2008
        • 1520

        #4
        OrdDtDesc looks like ORDer DaTe Descending
        are there other sort by codes? like maybe order total ? number of units in the order? Asc or Desc ?

        Comment

        • Matt Zimmermann
          Mega Mivite










          • Apr 2008
          • 2482

          #5
          I believe your sorting options are:
          • Invoice Ascending - InvAsc
          • Invoice Descending - InvDesc
          • Order Date Ascending - OrdDtAsc
          • Order Date Descending - OrdDtDesc
          • Order Total Ascending - OrdTotAsc
          • Order Total Descending - OrdTotDesc

          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

          • KayfabeRockStar
            Mivite

            • Mar 2006
            • 142

            #6
            Is there a way to add sorting options on the order history list? So that the customer can sort their orders ascending, descending, by date, by order total, by order number ... ?
            Jason Lindsey
            Dreamchaser Design
            www.dreamchaserdesign.com
            "You Dream. We Design."

            Comment

            • Matt Zimmermann
              Mega Mivite










              • Apr 2008
              • 2482

              #7
              Hi Jason,

              You can add the sort links to the header row by replacing the Order History List Layout with this code (assuming the page has not been customized):
              Code:
              <div class="column whole cart-contents">
                  <div class="row all-hidden medium-all-shown basket-header-row">
                      <div class="column one-eighth">
                          <mvt:if expr="g.SortBy EQ 'InvAsc' OR ISNULL g.SortBy">
                              <a class="bold" href="&mvte:urls:ORDH:auto_sep;SortBy=InvDesc&Order_BillEmail=&mvta:global:Order_BillEmail;&Order_BillZip=&mvta:global:Order_BillZip;">Order #</a>
                          <mvt:else>
                              <a href="&mvte:urls:ORDH:auto_sep;SortBy=InvAsc&Order_BillEmail=&mvta:global:Order_BillEmail;&Order_BillZip=&mvta:global:Order_BillZip;">Order #</a>
                          </mvt:if>
                      </div>
                      <div class="column one-eighth">
                          <mvt:if expr="g.SortBy EQ 'OrdDtAsc' OR ISNULL g.SortBy">
                              <a class="bold" href="&mvte:urls:ORDH:auto_sep;SortBy=OrdDtDesc&Order_BillEmail=&mvta:global:Order_BillEmail;&Order_BillZip=&mvta:global:Order_BillZip;">Order Date</a>
                          <mvt:else>
                              <a href="&mvte:urls:ORDH:auto_sep;SortBy=OrdDtAsc&Order_BillEmail=&mvta:global:Order_BillEmail;&Order_BillZip=&mvta:global:Order_BillZip;">Order Date</a>
                          </mvt:if>
                      </div>
                      <div class="column one-eighth align-right">
                          <mvt:if expr="g.SortBy EQ 'OrdTotAsc' OR ISNULL g.SortBy">
                              <a class="bold" href="&mvte:urls:ORDH:auto_sep;SortBy=OrdTotDesc&Order_BillEmail=&mvta:global:Order_BillEmail;&Order_BillZip=&mvta:global:Order_BillZip;">Order Total</a>
                          <mvt:else>
                              <a href="&mvte:urls:ORDH:auto_sep;SortBy=OrdTotAsc&Order_BillEmail=&mvta:global:Order_BillEmail;&Order_BillZip=&mvta:global:Order_BillZip;">Order Total</a>
                          </mvt:if>
                      </div>
                      <div class="column one-fourth">Order Status</div>
                      <div class="column three-eighths">Shipments</div>
                  </div>
                  <mvt:foreach iterator="order" array="orders">
                      <div class="row basket-product-row">
                          <div class="column half medium-one-eighth"><strong class="medium-all-hidden">Order # </strong>&mvt:order:id;</div>
                          <div class="column half medium-one-eighth"><strong class="medium-all-hidden">Date: </strong>&mvt:order:date_formatted;</div>
                          <div class="column half medium-one-eighth medium-align-right"><strong class="medium-all-hidden">Total: </strong>&mvt:order:formatted_total;</div>
                          <div class="column half medium-one-fourth"><strong class="medium-all-hidden">Status: </strong>&mvt:order:order_status;</div>
                          <div class="column three-fourths medium-one-fourth">
                              <strong class="medium-all-hidden">Shipments: </strong>
                              <mvt:foreach iterator="shipment" array="order:shipments">
                                  &mvt:shipment:tracklink;<br />
                              </mvt:foreach>
                          </div>
                          <div class="column one-fourth medium-one-eighth align-center"><a href="&mvte:urls:ORDS:secure_sep;SortBy=&mvta:global:SortBy;&amp;Offset=&mvta:global:Offset;&amp;Order_ID=&mvt:order:id;&amp;Order_BillEmail=&mvte:global:Order_BillEmail;&amp;Order_BillZip=&mvte:global:Order_BillZip;" class="button button-mini bg-gray charcoal uppercase">View</a></div>
                      </div>
                  </mvt:foreach>
              </div>
              <mvt:if expr="(g.Offset OR g.NextOffset) AND (l.settings:orderhistory_list:per_page NE 0)">
                  <mvt:if expr="g.Offset EQ 0">
                      <div class="column half">&nbsp;</div>
                  <mvt:else>
                      <form method="post" action="&mvte:urls:_self:auto;"  class="column half">
                          <input type="hidden" name="SortBy" value="&mvte:global:SortBy;" />
                          <input type="hidden" name="Order_BillEmail" value="&mvte:global:Order_BillEmail;" />
                          <input type="hidden" name="Order_BillZip" value="&mvte:global:Order_BillZip;" />
                          <input type="hidden" name="Offset" value="&mvte:global:PrevOffset;" />
                          <mvt:item name="buttons" param="Previous" />
                      </form>
                  </mvt:if>
                  <mvt:if expr="g.NextOffset EQ 0">
                      <div class="column half">&nbsp;</div>
                  <mvt:else>
                      <form method="post" action="&mvte:urls:_self:auto;" class="column half align-right">
                          <input type="hidden" name="SortBy" value="&mvte:global:SortBy;" />
                          <input type="hidden" name="Order_BillEmail" value="&mvte:global:Order_BillEmail;" />
                          <input type="hidden" name="Order_BillZip" value="&mvte:global:Order_BillZip;" />
                          <input type="hidden" name="Offset" value="&mvte:global:NextOffset;" />
                          <mvt:item name="buttons" param="Next" />
                      </form>
                  </mvt:if>
              </mvt:if>
              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

              • ocpxc02
                Mivite


                • Mar 2006
                • 366

                #8
                Originally posted by Matt Zimmermann View Post
                You should be able to change the link to include the sort parameter:
                Code:
                &mvte:urls:ORDH:auto_sep;SortBy=OrdDtDesc
                I would like to sort like this as well. In our global header, we have <mvt:item name="cssui_links" param="orderhistory">. Is there a setting to change the definition of this link so it is applied globally or must I simply replace this link code with the appropriate anchor and href html directly on the page (and any others that lead to Order History?

                Thanks,
                Paul
                Paul

                Comment

                • Matt Zimmermann
                  Mega Mivite










                  • Apr 2008
                  • 2482

                  #9
                  Hi Paul,

                  The cssui_links item, unfortunately, cannot be modified. You would have to replace it with code.
                  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

                  • ocpxc02
                    Mivite


                    • Mar 2006
                    • 366

                    #10
                    Originally posted by Matt Zimmermann View Post
                    Hi Paul,

                    The cssui_links item, unfortunately, cannot be modified. You would have to replace it with code.
                    Thanks for confirming.
                    Paul

                    Comment

                    Working...
                    X