I'm trying to add a 10 latest referals section to my statistics page.
I've copied and pasted the section from referals underneath it as a starting point, but I can't work out what is controlling the order that the referals are listed in. I mean the main referals list lists them in order of number of visits, I simply want to reorder them by last_visited.
Any guidance on what I need to change? I can't tell which peice of code controls the order. I've pasted the code for the section below, this creates the new area, but at the moment it still feeds in the same referals data as normal
Code:
{if ($referers_array != "")}
{include file="customer/main/navigation.tpl"}
{capture name=dialog}
<table width="100%" border="0" cellspacing="2" cellpadding="0">
{section name=index loop=$referers_array}
<tr>
<td valign="top" width="90%" class=Text>
{$referers_array[index].referer}</td>
<td valign="top" width="67" class=Text>
<div valign=bottom align="right">{$referers_array[index].visits}</div>
</td>
<td width="1"></td>
<td>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50">{$referers_array[index].last_visited|date_format:"%d/%m/%y - %H:%M"}</td>
</tr>
</table>
</td>
</tr>
{/section}
</table>
{/capture}
{include file="dialog.tpl" title="10 Latest Referals" content=$smarty.capture.dialog extra="width=100%"}
{/if}
Thanks
Amy
__________________
X-Cart version 5 (Previously 3.5-4)
Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin
Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.
Shout me a Coffee!