It would be great if there was a block for orders, would like to place it in home page to be visible for registered signed in customers. 80% of customers never go to customers order details page to communicate about particular order, they just contact via email or contact us then I spend lots of time to find a person in system (sometimes contacting email is not same as registered in system)...
Add HTML block with Smarty support and the following content:
{if $auth.user_id} {$params = $smarty.request} {$params.user_id = $auth.user_id} {$_orders = $params|fn_get_orders:50} {foreach from=$_orders.0 item="o"} {foreachelse} {/foreach}
{__("id")} | {__("status")} | {__("customer")} | {__("date")} | {__("total")} |
---|---|---|---|---|
#{$o.order_id} | {include file="common/status.tpl" status=$o.status display="view"} |
|
{$o.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"} | {include file="common/price.tpl" value=$o.total} |
{__("text_no_orders")} |
Just brilliant! Thank you
Let me know one more thing, how can I limit to load last, latest 3 ?
{foreach from=$_orders.0 item="o"}
OK I figured that one myself :)
{$_orders = $params|fn_get_orders:50}
changed to
{$_orders = $params|fn_get_orders:3}
OK I figured that one myself :)
{$_orders = $params|fn_get_orders:50}changed to
{$_orders = $params|fn_get_orders:3}
Right!