OSB enhancements to date
This commit is contained in:
85
modules/product/views/product/view.php
Normal file
85
modules/product/views/product/view.php
Normal 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"> </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"> </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> </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/>
|
Reference in New Issue
Block a user