- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
while( $db->next_record() ) {
$parent_id = $db->f( "product_parent_id" ) ;
if( ($db->f( "product_id" ) != $curr_product) && @$child_id ) {
continue ;
}
// Start row for this child
$q = "SELECT product_id, attribute_name FROM #__{vm}_product_attribute_sku " ;
$q .= "WHERE product_id='" . $db->f( "product_parent_id" ) . "' ORDER BY attribute_list ASC" ;
$db_sku->query( $q ) ;
$attrib_value = array( ) ;
while( $db_sku->next_record() ) {
$q = "SELECT attribute_name,attribute_value " ;
$q .= "FROM #__{vm}_product_attribute WHERE " ;
$q .= "product_id='" . $db->f( "product_id" ) . "' AND " ;
$q .= "attribute_name='" . $db_sku->f( "attribute_name" ) . "'" ;
$db_item->setQuery( $q ) ;
$db_item->query() ;
while( $db_item->next_record() ) {
if( $ci == 0 ) {
$attrib_heading[] = $db_item->f( "attribute_name" ) ;
$tpl->set( 'headings', $attrib_heading ) ;
}
$attrib_value[] = $db_item->f( "attribute_value" ) ;
}
}