Removed the need for price_base/price_setup in products table

This commit is contained in:
Deon George
2013-01-11 14:12:04 +11:00
parent 3fa1ca3665
commit a7a60a96d8
5 changed files with 10 additions and 30 deletions

View File

@@ -1,20 +1,6 @@
<?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','=',1)->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">
@@ -27,7 +13,7 @@ echo Form::open('cart/add');
<td style="background-color: #FFFFFF;">
<table width="100%" border="0" cellpadding="4">
<tr>
<td class="body" rowspan="4"><?php echo $translate->description_full; ?></td>
<td class="body" rowspan="4"><?php echo $record->description_long(); ?></td>
<td style="text-align: right;"><?php if ($a=$record->show_thumb()) echo $a; ?></td>
</tr>
<tr>
@@ -39,7 +25,8 @@ echo Form::open('cart/add');
<tr>
<?php if ($record->prod_plugin_file && 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>';
// @todo This is a hack, need to work out the correct recur_price_schedule dynamically
echo '<td style="vertical-align: top;">'.$pio->contract_view($record->prod_plugin_data,$record->price(0,1,'price_base'),$record->price(0,1,'price_setup')).'</td>';
} ?>
</tr>
<tr>