yes - it does - but i still have a problem i am working on:
if i try to put a normal product or only a slave product from its product_info.php into my basket it doesn't work - it says its empty - im looking for the error but it's heavy for me to find - here is the relevant code:
(i commented out the review function because i dont use it in my shop)
<?php if ($product_master != 0) { ?>
<!-- If Master Product != 0 then: -->
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<!-- <?php if ($reviews['count'] > 0) { ?>
<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
<?php
}
?> -->
<!-- <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> Vorübergehend entfernt!-->
<?php
if ($product_info['products_price']>0) {
$qty_array = array();
for ($i=0; $n2 = (($product_info['products_quantity'] < 20) ? $product_info['products_quantity'] : 20), $i <= $n2; $i++) {
$qty_array[] = array('id' => $i, 'text' => $i);
}
?>
<td align="right" class="main"><?php if ($product_info['products_quantity'] > 0) {
echo TEXT_AMOUNT . ' ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array);
} else {
echo TEXT_STOCK;
}
echo tep_draw_separator('pixel_trans.gif', '30', '10');
?>
</td>
<?php } ?>
<!-- <td class="main" align="right"><?php echo TEXT_AMOUNT; ?><input type="text" name="quantity" value="1" maxlength="3" size="2"></td> -->
<!-- <td class="main" align="right" width="130"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> -->
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<!-- End Master Products Then -->
<?php } else { ?>
<!-- If Master Products != 0 else: -->
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<!-- <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> Vorübergehend entfernt!-->
<?php
for ($i=0; $i<20; $i++) {
$qty_array[] = array('id' => $i+1, 'text' => $i+1);
}
?>
<td class="main" align="right"><?php echo TEXT_AMOUNT . tep_draw_pull_down_menu('quantity', $qty_array, 1); ?></td>
<td class="main" align="right" width="130"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<!-- End Master Products Else -->
<?php } ?>
it basically works - the if master product != 0 ...
...but in my else there must be a problem with the selection of a quantity to my basket...
the quantity should usually work bec. i changed some value in application_top.php from this
$HTTP_POST_VARS['id']))+1
to this
$HTTP_POST_VARS['id']))+ (int)$HTTP_POST_VARS['quantity']
any idea matt? or anyone else?
//EDIT
do i have to enter a <form method=post blablabla ... tag in the elses form???
Edited by iveo, 01 April 2004, 11:14.