samuel89 Posted March 8, 2014 Share Posted March 8, 2014 How to sort Order Reference starting from latest date in contact-form.tpl in the contact us form page. {if !$PS_CATALOG_MODE} {if (!isset($customerThread.id_order) || $customerThread.id_order > 0)} <p class="text select"> <label for="id_order">{l s='Order reference'}</label> {if !isset($customerThread.id_order) && isset($isLogged) && $isLogged == 1} <select name="id_order" > <option value="0">{l s='-- Choose --'}</option> {foreach from=$orderList item=order} <option value="{$order.value|intval}" {if $order.selected|intval}selected="selected"{/if}>{$order.label|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> {elseif !isset($customerThread.id_order) && empty($isLogged)} <input type="text" name="id_order" id="id_order" value="{if isset($customerThread.id_order) && $customerThread.id_order|intval > 0}{$customerThread.id_order|intval}{else}{if isset($smarty.post.id_order) && !empty($smarty.post.id_order)}{$smarty.post.id_order|intval}{/if}{/if}" /> {elseif $customerThread.id_order|intval > 0} <input type="text" name="id_order" id="id_order" value="{$customerThread.id_order|intval}" readonly="readonly" /> {/if} Thanks. 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