When I installed this module, I had a problem with my products that are not slaves. The product_info page would show a drop down box labeled "quantity_text" and the customer had to change the value to 1 to order. Also, none of the options would transfer to the cart.
I tracked it down to the form used on the page. Here is the original code:
<td width="800" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
and here is the code after MS2 was added:
<td width="800" valign="top"><?php echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
Here is my fix if anyone is interested:
<!-- Master Products //-->
<?php
$master_status_query = tep_db_query("select p.products_master_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$master_check = tep_db_fetch_array($master_status_query);
if ($master_check['products_master_status'] > 0) {
?>
<td width="800" valign="top"><?php echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
}
else {
?>
<td width="800" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
}
// Master Products EOF
As you can see, I use the products_master_status field to determine which form to draw up. Works like a charm.
BG