1

I've just upgraded to Expresso Store 2 and I've noticed that on my customers 'my orders' page that the orders are being listed from oldest to newest ignoring my parameters asking for them to be listed from newest to oldest.

(I'm not sure if this is a new bug with Store v2, or if I've only noticed it since upgrading).

Any advice on sorting this out please?

My code below:

{exp:store:orders member_id='CURRENT_USER' order_by='order_date' sort='desc'}

            {if no_orders}
                <tr>
                    <td colspan="5"><strong>You haven't placed any orders yet!</strong></td>
                </tr>
            {/if}

            <tr>
                <td>{order_id}</td>
                <td class="product">
                    {items}
                        {item_qty} &times; {title}<br />
                    {/items}
                </td>
                <td>{order_date format="%j %M %Y"}</td>
                <td>{order_total}</td>
                <td>{order_status}</td>
                <td><a href="{path='store/order/{order_hash}'}" class="button-style2">Details</a></td>
            </tr>

        {/exp:store:orders}
1

Looks like the parameter should be "OrderBy" without the underscore.

https://exp-resso.com/docs/orders_tag.html#orderby

I also verified this in the code that it is indeed looking for the "OrderBy" parameter opposed to "Order_By"

:D

| improve this answer | |
  • Can you confirm whether this works Tom? If this is the case I'm not sure how it was working for you in v1 at all. – Adrian Macneil Oct 8 '13 at 10:39
  • Thanks Mike. One of those "can't see the wood for the tree's" kinda problems! – Tomtids Oct 14 '13 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.