Joomla! 3.5.1
VirtueMart 3.0.14
Hi
I created an additional mysql database table with the following entries:
UNique ID
Product ID
Amount
Expiration Date
So a Product can have multiple entries with diffrent expiration Dates. No i wanna add These informations to the inventory list like this example here:
Product 1 SKU12 420 in Stock 120$Price
EpxDate 25.10.2016 Amount 300
EpxDate 13.12.2017 Amount 120
Product 2 SKU15 200 in Stock 200$Price
EpxDate 20.1.2018 Amount 200
I know i Need to do this in the file Administrator/components/com_virtuemart/views/tmpl/Default.php in the following code:
<?php
if (count($this->inventorylist) > 0) {
$i = 0;
$k = 0;
$keyword = vRequest::uword ('keyword', "", ' ,-,+,.,_,#,/');
foreach ($this->inventorylist as $key => $product) {
$checked = JHtml::_('grid.id', $i , $product->virtuemart_product_id);
$published = $this->gridPublished( $product, $i );
//<!-- low_stock_notification -->
if ( $product->product_in_stock - $product->product_ordered < 1) $stockstatut ="out";
elseif ( $product->product_in_stock - $product->product_ordered < $product->low_stock_notification ) $stockstatut ="low";
else $stockstatut = "normal";
$stockstatut='class="stock-'.$stockstatut.'" title="'.vmText::_('COM_VIRTUEMART_STOCK_LEVEL_'.$stockstatut).'"';
?>
<tr class="row<?php echo $k ; ?>">
<!-- Checkbox -->
<td class="admin-checkbox"><?php echo $checked; ?></td>
<!-- Product name -->
<?php
$link = 'index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id='.$product->virtuemart_product_id.'&product_parent_id='.$product->product_parent_id;
?>
<td><?php echo JHtml::_('link', JRoute::_($link, FALSE), $product->product_name, array('title' => vmText::_('COM_VIRTUEMART_EDIT').' '.htmlentities($product->product_name))); ?></td>
<td><?php echo $product->product_sku; ?></td>
<td <?php echo $stockstatut; ?>><?php echo $product->product_in_stock; ?></td>
<td <?php echo $stockstatut; ?> width="5%"><?php echo $product->product_ordered; ?></td>
<td><?php echo $product->product_price_display; ?></td>
<td><?php echo $product->product_instock_value; ?></td>
<td><?php echo $product->product_weight." ". $product->weigth_unit_display; ?></td>
<td><?php echo $published; ?></td>
</tr>
<?php
$k = 1 - $k;
$i++;
}
}
?>
But unfortunatley i dont know what and how i Need to insert it.... Can someone help me pls?