<?php
	if (! count($results)) {
		echo _('Sorry, no pages were found in this category, or your account is not authorized for this category.');
		return;
	}

	foreach ($results as $record) {
		// Load the language
		$translate = $record->product_translate->where('product_id','=',$record->id)->and_where('language_id','=','fr')->find();

		// If there isnt a translated page, show the default language
		// @todo - default language should come from configuration
		if (! $translate->loaded())
			$translate = $record->product_translate->where('product_id','=',$record->id)->and_where('language_id','=',1)->find();
?>

		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="1" cellpadding="0">
						<tr valign="top">
							<td class="heading"><a href="<?php echo URL::site(sprintf('product/view/%s?cid=%s',$record->id,$cat));?>"><?php echo $translate->name; ?></a> (<?php echo $record->display('price_base'); ?>/mth)</td>
						</tr>
						<tr>
							<td style="background-color: #FFFFFF;">
								<table width="100%" border="0" cellpadding="4">
									<tr>
										<td class="body"><?php echo $translate->description_short; ?></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<br/>
<?php
	}
?>
