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!
Announcement
Collapse
No announcement yet.
ORDH Sort Orders Newest First MM9
Collapse
X
-
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
- 1 like
Comment
-
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
-
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;&Offset=&mvta:global:Offset;&Order_ID=&mvt:order:id;&Order_BillEmail=&mvte:global:Order_BillEmail;&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"> </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"> </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
- 1 like
Comment
-
Originally posted by Matt Zimmermann View PostYou should be able to change the link to include the sort parameter:
Code:&mvte:urls:ORDH:auto_sep;SortBy=OrdDtDesc
Thanks,
PaulPaul
Comment
-
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
Comment