hallo liebe community
bin grad dabei ein oscommerce-shop zu erweitern. ich quäle mich jetzt schon seit tagen mit einem kleinen code-schnipsel, den ich einfach nicht richtig hinbekomme. 1000 verschiedene varianten habe ich schon probiert, aber klappen tut es nicht so wie ich möchte.
ichhabe mal bild angehangen, die mein problem illustrieren - bilder sagen ja bekanntlich mehr als 1000 worte
so ist es jetzt:
so sollte es aussehen:
das 2. bild habe ich mit photoshop erstellt, desshalb die abweichungen in der tabelle. es geht mir eigentlich nur darum eine tabelle zu erstellen in der ich die .gif im oberen teil einfügen kann (hinzufuegen und dieses produkt...)
hier der code. ich hoffe es findet sich jemand der mir helfen kann - bin echt am verzweifeln
PHP-Code:
<?php
$xsell_array = array();
$xsell_query_raw = "SELECT p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, xp.xsell_id, m.manufacturers_name, m.manufacturers_id from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m ON p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' AND p.products_id = xp.xsell_id AND xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' AND p.products_id = pd.products_id ORDER BY pd.products_name";
$xsell_split = new splitPageResults($xsell_query_raw, MAX_DISPLAY_PRODUCTS_NEW);
if ($xsell_split->number_of_rows > 0) { ;?>
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td class="main" width="100%">[i]
Die unten aufgeführte Liste zeigt Produkte die wir zusätzlich für den obigen Artikel empfehlen. Um weitere Artikel hinzuzufügen klicken sie auf die die Checkbox der Spalte "Hinzfügen" und anschließend auf die Option "In den Warenkorb". (Hinweis: Bei Verwendung dieser Option, wird der oben aufgeführte Artikel sowie das gewählte Zusatzprodukt in den Warenkorb gelegt.)
[/i]</td></tr></table>
<table class="productListing" width="100%" cellspacing="0" cellpadding="0" bgcolor="#FDFDFD">
<tr>
<td width="85" align="center" class="productListing-heading">Hinzufügen
</td>
<td class="productListing-heading">
<?php echo tep_draw_separator('pixel_trans.gif', '150', '10'); ?>
</td>
<td width="100%" class="productListing-heading">Folgende Artikel werden zudem von uns Empfohlen</td>
</tr>
<?php
$xsell_query = tep_db_query($xsell_split->sql_query);
while ($xsell = tep_db_fetch_array($xsell_query)) {
if ($xsell_price = tep_get_products_special_price($xsell['products_id'])) {
$products_price = '<s>' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($xsell_price, tep_get_tax_rate($xsell['products_tax_class_id'])) . '</span>';
} else {
$products_price = $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id']));
}
?>
<tr>
<td class="main" align="center">
<?php
echo tep_draw_checkbox_field('add_recommended[]',$xsell['products_id']);
?>
</td>
<td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" align="center" valign="top" class="main"><?php echo '[url="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '"]' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '[/url]'; ?></td>
<td valign="middle" class="smallText"><?php echo '[url="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '"][b]<u>' . $xsell['products_name'] . '</u>[/b][/url]
Hersteller: [url="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $xsell['manufacturers_id']) . '"]' . $xsell['manufacturers_name'] . '[/url]
Preis (incl. 16% MwSt.): ' . $products_price; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}
} else {
?>
<table>
<tr>
<td>
<?php echo tep_draw_separator('pixel_trans.gif', '100%', '10');?>
</td>
</tr>
<?php
}
?>
</tr>
</table>
?>