VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: 1Jumpman on September 16, 2012, 19:05:00 PM

Title: HELP! Extra column on order list w. product attributes or (and) product image.
Post by: 1Jumpman on September 16, 2012, 19:05:00 PM
Did somebody do new column into a  back-end order list with product attributes or (and) product image?
Maby somebody help me how can i do a query from database who can show this attributes and product image thumbnail?

This code show attributes all list, how can i show only one record from one product? I'm not a coder
file: administrator/components/com_virtuemart/views/orders/tmpl/orders.php
<?php
$db = JFactory::getDBO();
$query = 'SELECT * FROM #__virtuemart_order_items'; 
$db->setQuery($query);
$list = $db->loadObjectList();
foreach ($list as $item) {
//$item_title = $item->title;
//echo $item_title.'<br />';

if (!empty($item->product_attribute)) {
if(!class_exists('VirtueMartModelCustomfields'))require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'customfields.php');
$product_attribute = VirtueMartModelCustomfields::CustomsFieldOrderDisplay($item,'FE');
echo '<div id="dostarczenie">';
echo $product_attribute;
echo '</div>';
}
}
?>




Printscreen:
(http://www.wypasionastrona.pl/vm/atrybutnaliscie.jpg)

Thx for help.
Jumpman