Hi everybody,
In VM1 I added an extra field to
product.product_form.php to add stock location. This was then saved into the database by adding a field to the database in the table product.
In
product.product_list.php I then showed an extra column by first retrieving the value out of the database as such:
$search_sql .= "#__{vm}_product.stock_location LIKE '%$keyword%' OR \n";
and:
if (!empty($category_id) && empty( $product_parent_id)) {
$list = "SELECT #__{vm}_category.category_name,#__{vm}_product.product_id, [...part of statement left out...] #__{vm}_product.stock_location;
And then displayed it like this:
$VM_LANG->_('PHPSHOP_PRODUCT_FORM_STOCK_LOCATION') => "width=\"15%\"",
and:
$listObj->addCell( $db->f("stock_location") );
But how to in VM2??In VM2 I have managed to:
- add the field stock_location to the database in the table product.
- to edit administrator/components/com_virtuemart/views/product/tmpl/product_edit_information.php to show an extra input field for stock location and it saves it to the database.
Now all i need to do is show this value in a column in
administrator/components/com_virtuemart/views/product/tmpl/default.phpFor which i first need to retrieve the value out of the database.
The structure of VM2 has changed a lot.
--> Can anybody please tell me what file to edit to retrieve the value stock_location out of the table product in the database, and what should the code be?--> And how to edit default.php to be able to show this value.Many thanks in advance!
KR Daniel