Hi,
in the following website (http://88.198.17.8/~vip/5/) i have 5 lists ( ????? ??????, ??????????? (?????), ??????????? (?????), ???????????, ???????)
The first one "????? ??????" contains data about customers (firstname, lastname, address, etc.)
The second list "??????????? (?????)" contains invoices about each customer. Now, what i wanna do is to include customers info from the first list (????? ??????) to the second list (??????????? (?????)) just below the title of the list. This info should be filtered according to the invoices that this specific client has. I'm filtering the invoices with the fabrik's default filter (??????? - > dropdown list that comes from the first list)
i'm fetching the data that i want to include in the second list, using the following that is inside default.php of a custom template folder.
<?php
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query
->select($db->quoteName(array('a.Eponimia')))
->from($db->quoteName('1_epikoinonias', 'a'))
->join('LEFT', $db->quoteName('1_repeat_tziros', 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.pelatis_join') . ')');
//->where($db->quoteName('a.Eponimia') . ' = ' . $db->quoteName('b.pelatis_join'));
$db->setQuery($query);
$rows = $db->loadObjectList();
$list = array();
foreach ($rows as $row)
{
$list[] = "<li>" . $row->Eponimia . " " . $row->onoma . "</li>";
}
echo "<ol>" . implode($list) . "</ol>";
?>
"1_epikoinonias" is the table name of the first list and 1_repeat_tziros is the table name of the second list.
The problem is that i can't find the way to filter this data according to the built in filter that fabrik uses, that it returns data from the second list ONLY for one customer.
in the following website (http://88.198.17.8/~vip/5/) i have 5 lists ( ????? ??????, ??????????? (?????), ??????????? (?????), ???????????, ???????)
The first one "????? ??????" contains data about customers (firstname, lastname, address, etc.)
The second list "??????????? (?????)" contains invoices about each customer. Now, what i wanna do is to include customers info from the first list (????? ??????) to the second list (??????????? (?????)) just below the title of the list. This info should be filtered according to the invoices that this specific client has. I'm filtering the invoices with the fabrik's default filter (??????? - > dropdown list that comes from the first list)
i'm fetching the data that i want to include in the second list, using the following that is inside default.php of a custom template folder.
<?php
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query
->select($db->quoteName(array('a.Eponimia')))
->from($db->quoteName('1_epikoinonias', 'a'))
->join('LEFT', $db->quoteName('1_repeat_tziros', 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.pelatis_join') . ')');
//->where($db->quoteName('a.Eponimia') . ' = ' . $db->quoteName('b.pelatis_join'));
$db->setQuery($query);
$rows = $db->loadObjectList();
$list = array();
foreach ($rows as $row)
{
$list[] = "<li>" . $row->Eponimia . " " . $row->onoma . "</li>";
}
echo "<ol>" . implode($list) . "</ol>";
?>
"1_epikoinonias" is the table name of the first list and 1_repeat_tziros is the table name of the second list.
The problem is that i can't find the way to filter this data according to the built in filter that fabrik uses, that it returns data from the second list ONLY for one customer.