Hey Everyone,
I am trying to sort our pick list items by Warehouse Location (a custom field) and then by Product Code. I can successfully sort by one or the other, but I cannot sort by location and then code.
Here is the code that I am attempting to run right before my order:groups for loop in our pick list Order Contents section.
The above code just sorts by whichever QuickSortArray call is last in line.
Anything obvious I am missing here?
Thank you!
--Scott
I am trying to sort our pick list items by Warehouse Location (a custom field) and then by Product Code. I can successfully sort by one or the other, but I cannot sort by location and then code.
Here is the code that I am attempting to run right before my order:groups for loop in our pick list Order Contents section.
Code:
<table class="product-info" <tr> <th class="code">Code</th> <th class="product" width=200px>Product</th> <th class="total">Price</th> <th class="quantity">Quantity</th> <th class="total">Total</th> <!--<th width=10px padding=0px> </th>--> </tr> <mvt:assign name="g.basktotal" value="0" /> <mvt:assign name="g.baskweight" value="0" /> <!-- Scott D added secondary sorts by code (Secondary Sort)--> <!-- This does not work in conjunction with the sort by Location below --> <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:order:groups, ':product:code', 1)" /> <!-- Scott D added sort by location (Primary Sort)--> <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:order:groups, ':customfield_values:customfields:product_location ', 1)" /> <mvt:foreach iterator="item" array="order:groups"> .......
Anything obvious I am missing here?
Thank you!
--Scott
Comment