Products Module Sort By Added - Solved
Posted: Mon Dec 13, 2010 4:20 pm
Ok I am confused, there is a sort function on the products tab in the admin area. I set this to date added. I am trying to achieve a list of the newest products added. Currently it is still sorting by name. Any help would be appreciated. I edited my summary template to look as follows:
Newest Items
{if isset($catformstart)}
{$catformstart}
{$catdropdown}{$catbutton}
{$catformend}
{/if}
{if isset($pagecount) && $pagecount gt 1}
{$firstlink} {$prevlink} {$pagetext} {$curpage} {$oftext} {$pagecount} {$nextlink} {$lastlink}
{/if}
{counter assign=idx print=0}
{foreach from=$items item=entry}
{counter}
{if $idx fields hash
and to categories via the $entry->categories array of objects. Also
attribute information is available via $entry->attributes.
you should use the get_template_vars and the print_r modifier to see
what is available
*}
detail_url}" class="ProductDirectoryItem">{$entry->product_name}
{if isset($entry->fields)}
{foreach from=$entry->fields key='name' item='field'}
{if $field->type == 'image' && $field->name == 'Image1' && isset($field->thumbnail)}
file_location}/{$field->thumbnail}" alt="{$field->value}"/>
{/if}
{/foreach}
{/if}
{/if}
{/foreach}
Newest Items
{if isset($catformstart)}
{$catformstart}
{$catdropdown}{$catbutton}
{$catformend}
{/if}
{if isset($pagecount) && $pagecount gt 1}
{$firstlink} {$prevlink} {$pagetext} {$curpage} {$oftext} {$pagecount} {$nextlink} {$lastlink}
{/if}
{counter assign=idx print=0}
{foreach from=$items item=entry}
{counter}
{if $idx fields hash
and to categories via the $entry->categories array of objects. Also
attribute information is available via $entry->attributes.
you should use the get_template_vars and the print_r modifier to see
what is available
*}
detail_url}" class="ProductDirectoryItem">{$entry->product_name}
{if isset($entry->fields)}
{foreach from=$entry->fields key='name' item='field'}
{if $field->type == 'image' && $field->name == 'Image1' && isset($field->thumbnail)}
file_location}/{$field->thumbnail}" alt="{$field->value}"/>
{/if}
{/foreach}
{/if}
{/if}
{/foreach}