예제 #1
0
function StructuredSpecificationsTable($model, $showtooltip = true, $showicons = true)
{
    global $languages_id;
    $productspecs_query = tep_db_query("SELECT * FROM productspecs WHERE products_model = '" . $model . "' order by subkenmerk");
    $product_id_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_model = '" . $model . "'");
    $product_id = tep_db_fetch_array($product_id_query);
    $categories_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int) $product_id['products_id'] . "'");
    $categories = tep_db_fetch_array($categories_query);
    $count = 0;
    if (tep_db_num_rows($productspecs_query) > 0) {
        $text .= '<div class="box">';
        $text .= '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="data-table">';
        $text .= '<tr class="title">';
        if (PRODUCT_COMPARE == 'true') {
            $text .= '<td>' . Translate('Technische specificaties') . '</td>';
            if (strstr($_COOKIE['compare_' . $categories['categories_id']], '_' . $product_id['products_id'])) {
                $text .= '<td><a href="#" class="compare_add">' . Translate('Niet meer vergelijken') . '</a></td>';
            } else {
                $text .= '<td><a href="#" class="compare_add">' . Translate('Vergelijken') . '</a></td>';
            }
        } else {
            $text .= '<td colspan="2">' . Translate('Technische specificaties') . '</td>';
        }
        $text .= '</tr>';
        while ($productspecs = tep_db_fetch_array($productspecs_query)) {
            $specifications_query = tep_db_query("SELECT value, title FROM specifications WHERE hoofdkenmerk = '" . $productspecs['hoofdkenmerk'] . "' AND subkenmerk = '" . $productspecs['subkenmerk'] . "' AND language_id = '" . (int) $languages_id . "' order by subkenmerk");
            while ($specifications = tep_db_fetch_array($specifications_query)) {
                /*if ($showtooltip == true) {
                			$tooltip = '<span class="tltp_container">'.tep_get_tooltip($productspecs['hoofdkenmerk'].$productspecs['subkenmerk'], $specifications['value']).'</span>';
                		} else {
                			$tooltip = '';
                		}
                		*/
                if ($specifications['title'] != 1) {
                    $count++;
                    if ($count % 2) {
                        $tr_class = ' even';
                    } else {
                        $tr_class = ' odd';
                    }
                    $text .= '<tr class="data' . $tr_class . '">';
                    $text .= '<td width="50%" class="first">' . $tooltip . $specifications['value'] . ' : </td>';
                    $text .= '<td width="50%" class="last">';
                    if ($specifications['title'] != 1) {
                        $specsdescription_query = tep_db_query("SELECT value FROM specsdescription WHERE subkenmerk = '" . $productspecs['value'] . "' AND language_id = '" . (int) $languages_id . "' order by language_id");
                        while ($specsdescription = tep_db_fetch_array($specsdescription_query)) {
                            if ($showicons == true) {
                                $waarde = ShowSpecificationIcons($specsdescription['value']);
                            } else {
                                $waarde = $specsdescription['value'];
                            }
                            $text .= $waarde;
                        }
                    }
                    $text .= '</td>';
                    $text .= '</tr>';
                } else {
                    $text .= '<tr class="title"><td colspan="2" class="first">' . $tooltip . $specifications['value'] . '</td></tr>';
                }
            }
        }
        $text .= '</table>';
        $text .= '</div>';
    } else {
        $text = '';
    }
    return $text;
}
예제 #2
0
                                                        ?>
													<td class="product-<?php 
                                                        echo $compare_count;
                                                        ?>
" style="width:<?php 
                                                        echo $product_width;
                                                        ?>
%;">
														<?php 
                                                        $display_class = 'list';
                                                        if ($differ == '' && $kenmerk != '') {
                                                            if (ShowSpecificationIcons(show_product_spec($products_id, $productspecs['hoofdkenmerk'], $productspecs['subkenmerk'], $display_class)) != $kenmerk) {
                                                                $differ = true;
                                                            }
                                                        }
                                                        $kenmerk = ShowSpecificationIcons(show_product_spec($products_id, $productspecs['hoofdkenmerk'], $productspecs['subkenmerk'], $display_class));
                                                        echo $kenmerk;
                                                        ?>
													</td>
												<?php 
                                                    }
                                                }
                                                if ($compare_count == $total_products) {
                                                    ?>
												</tr>
												<?php 
                                                    if ($differ == 'true') {
                                                        if (PRODUCT_COMPARE_DIFFERENCES == 'true') {
                                                            ?>
													<script type="text/javascript">
													/* <![CDATA[ */