Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Making it list in multiple columns


iLLuSiOnS

Recommended Posts

For some reason, sub products only get listed in one long column, how would i tell it to load in multiple columns. Thanks

 

 

///////////////////////////////////////////////////////////////////////////////////////////////////////////

// MOD begin of sub product

 

$sub_products_sql = tep_db_query("select p.products_id, p.products_price, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_parent_id = " . (int)$HTTP_GET_VARS['products_id'] . " and p.products_quantity > '0' and p.products_id = pd.products_id and pd.language_id = " . (int)$languages_id);

if (tep_db_num_rows($sub_products_sql) > 0) {

 

?>

<tr>

<td align="left" ><table>

<?php

while ($sub_products = tep_db_fetch_array($sub_products_sql)) {

$subname = substr( $sub_products['products_name'], strlen( $product_info['products_name'] . ' - ' ));

?>

<tr >

<td style="padding-left:50px;" ><?php if ($sub_products['products_image']) echo "<img src='images/" . $sub_products['products_image'] . "' />"; ?>

<br>

<b><?php echo $subname; ?></b></td>

<td align="right" class="smallText">Qty: <input type="text" name="sub_products_qty[]" value="" class="input3" size="1" />

<br>

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_template_image_submit('jh', IMAGE_BUTTON_IN_CART); ?></td>

</tr>

<?php

echo '<input type="hidden" name="sub_products_id[]" value="' . $sub_products['products_id'] . '">';

}

?>

</table></td>

</tr>

<?php

}

// MOD end of sub product

///////////////////////////////////////////////////////////////////////////////////////////////////////////

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...