OSB enhancements to date

This commit is contained in:
Deon George
2010-11-30 09:41:08 +11:00
parent 8715a2059b
commit ec6a542bc3
478 changed files with 23423 additions and 9309 deletions

View File

@@ -0,0 +1,7 @@
<table width="100%" border="0">
<?php foreach ($results as $value) {?>
<tr>
<td class="menu"><a href="<?echo URL::site('product/category/'.$value->id);?>"><?php echo $value->name?></a></td>
</tr>
<?}?>
</table>

View File

@@ -0,0 +1,40 @@
<?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','=','en')->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 Currency::display($record->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
}
?>

View File

@@ -0,0 +1,85 @@
<?php
if (! $record) {
echo _('Sorry, product not found, or your account is not authorized to view it.');
return;
}
// 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','=','en')->find();
// @todo Need to add in product attributes
// @todo Need to add in product plugins
echo Form::open('cart/add');
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<?php echo Form::hidden('product_id',$record->id); ?>
<?php echo Form::hidden('quantity',1); ?>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td style="background-color: #FFFFFF;">
<table width="100%" border="0" cellpadding="4">
<tr>
<td class="body"><?php echo $translate->description_full; ?></td>
<?php if ($record->prod_plugin && method_exists($record->prod_plugin_file,'product_view')) {
$pio = new $record->prod_plugin_file;
echo '<td style="vertical-align: top;">'.$pio->product_view($record->prod_plugin_data).'</td>';
} ?>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
<?php if ($record->prod_plugin && method_exists($record->prod_plugin_file,'contract_view')) {
$pio = new $record->prod_plugin_file;
echo '<td style="vertical-align: top;">'.$pio->contract_view($record->prod_plugin_data,$record->price_base,$record->price_setup).'</td>';
} ?>
</tr>
<tr>
<td class="spacer" colspan="2">&nbsp;</td>
</tr>
<tr>
<td class="body" style="width: 50%;"><b>SKU</b></td>
<td class="body" style="width: 50%;"><b>Currency</b></td>
</tr>
<tr>
<td class="body"><?php echo $record->sku;?></td>
<!-- @todo The default currency should be system configurable and displayed by default -->
<!-- @todo If CURRENCY's value is not active in the DB, then the wrong flag is shown, as StaticList_Module::form() only returns active values -->
<!-- @todo Currency is not used in the cart? -->
<?php $CURRENCY_ISO='AUD'; $CURRENCY=6; $COUNTRY=61?>
<td class="body"><?php echo StaticList_Module::form('currency','currency',$CURRENCY,'id','name',array('status'=>'=:1'));?> <?php echo Country::icon($COUNTRY);?></td>
</tr>
<tr>
<td class="body"><b>Price Type</b></td>
<td class="body"><b>Taxable</b></td>
</tr>
<tr>
<td class="body"><?php echo StaticList_PriceType::display($record->price_type);?></td>
<td class="body"><?php echo StaticList_YesNo::display($record->taxable);?></td>
</tr>
<tr>
<td class="body"><b>Recurring Billing Schedule</b></td>
<td class="body"><b>&nbsp;</b></td>
</tr>
<tr>
<td class="body"><?php echo StaticList_RecurSchedule::form('recurr_schedule',$record);?> </td>
<td class="body"><?php echo '';?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="text-align: center;"><?php echo Form::submit('submit','Add to Cart'); ?> | <?php echo Form::submit('submit','Add to Cart & Checkout',array('disabled'=>'disabled')); ?></td>
</tr>
</table>
</td>
</tr>
</table>
<?php echo Form::close(); ?>
<br/>