Patryk Tchórzewski Posted July 17, 2018 Share Posted July 17, 2018 Hi i try show last order in user nav i am add code {if $orders && count($orders)} {foreach from=$orders item=order name=myLoop} {if $smarty.foreach.myLoop.first} <a class="color-myaccount" href="javascript:showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('order-detail', true)|escape:'html':'UTF-8'}');"> <p>{l s='From:'}</p> <p>{dateFormat date=$order.date_add full=0}</p> </a> {/if} {/foreach} {else} <p class="alert alert-warning">{l s='You have not placed any orders.'}</p> {/if} But this code working only on when open is Order history page (history.tpl) I try add code in HistoryController after history.tpl is define I try with: $this->setTemplate(_PS_THEME_DIR_.'index.tpl'); {*not-working*} $this->setTemplate(_PS_THEME_DIR_.'/modules/blockuserinfo/nav.tpl'); {*not working*} $this->setTemplate(_PS_THEME_DIR_.'modules/blockuserinfo/nav.tpl'); {*not working*} I am always see that same issue /tools/smarty/sysplugins/smarty_internal_templatebase.php(157) undefined index orders Anyone can help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now