Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Please somebody know this


rotulistaz

Recommended Posts

Please somebody know how put several column in this contribution

 

http://www.oscommerce.com/community/contributions,1685

 

This is the code

 

<!-- all manufacturers begin //-->

<center>

<?php

$manufacturers_query = tep_db_query("select manufacturers_name, manufacturers_id, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name" );

 

if (tep_db_num_rows($manufacturers_query) >= '1') {

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

 

echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' . $manufacturers['manufacturers_name'], 'NONSSL', false) . '">'. $manufacturers['manufacturers_name'] . '

' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name']) . "</a>

 

\n";

}

}

?>

</center>

<!-- all manufacturers end //-->

 

Thak you very much for help

Link to comment
Share on other sites

Please somebody know how put several column in this contribution

 

http://www.oscommerce.com/community/contributions,1685

 

This is the code

 

<!-- all manufacturers begin //-->

<center>

<?php

$manufacturers_query = tep_db_query("select manufacturers_name, manufacturers_id, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name" );

 

if (tep_db_num_rows($manufacturers_query) >= '1') {

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

 

echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' . $manufacturers['manufacturers_name'], 'NONSSL', false) . '">'. $manufacturers['manufacturers_name'] . '

' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name']) . "</a>

 

\n";

}

}

?>

</center>

<!-- all manufacturers end //-->

 

Thak you very much for help

 

Please some help..?

Link to comment
Share on other sites

here is some code I put together to do what you asked.

you will have to debug it since I don't use the mod you are takling about.

 

 

 

<!-- all manufacturers begin //-->
<center>
<table><tr><td>

<?php
$manufacturers_query = tep_db_query("select manufacturers_name, manufacturers_id, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name" );

if (tep_db_num_rows($manufacturers_query) >= '1') 
{

 $count = tep_db_fetch_array($manufacturers_query); // count the manufactures
 $show_columns = 3; // number of columns one less than needed since it starts with 0
 $column_place = 0; // hold the starting point
 $list_manufacturers = ''; // create an empty var
 $modulus = 4 -($count % 4);  //get remaining empty columns

 while ($manufacturers = tep_db_fetch_array($manufacturers_query))
 {

// this is unchanged
$list_manufacturers .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' .  $manufacturers['manufacturers_name'], 'NONSSL', false) . '">'. $manufacturers['manufacturers_name'] . ' ' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name']) . "</a>\n";

// count which column it is and add the right table code
if ($column_place == 3)
{
$list_manufacturers .= '</td></tr><tr><td>';
}else
{
$list_manufacturers .= '</td><td>';
}

if ($column_place == 3){$column_place == 0;}else {$column_place ++;}

 }
// when the list of manufactures is done fill in the empty table tags
for ($i=0, $i<$modulus; $i++)
{
$list_manufacturers .= ' </td><td>';
}
// print to screen the 4 column list
echo $list_manufacturers;
}
?>

</td></tr></table>
</center>

Link to comment
Share on other sites

here is some code I put together to do what you asked.

you will have to debug it since I don't use the mod you are takling about.

<!-- all manufacturers begin //-->
<center>
<table><tr><td>

<?php
$manufacturers_query = tep_db_query("select manufacturers_name, manufacturers_id, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name" );

if (tep_db_num_rows($manufacturers_query) >= '1') 
{

 $count = tep_db_fetch_array($manufacturers_query); // count the manufactures
 $show_columns = 3; // number of columns one less than needed since it starts with 0
 $column_place = 0; // hold the starting point
 $list_manufacturers = ''; // create an empty var
 $modulus = 4 -($count % 4);  //get remaining empty columns

 while ($manufacturers = tep_db_fetch_array($manufacturers_query))
 {

// this is unchanged
$list_manufacturers .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' .  $manufacturers['manufacturers_name'], 'NONSSL', false) . '">'. $manufacturers['manufacturers_name'] . ' ' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name']) . "</a>\n";

// count which column it is and add the right table code
if ($column_place == 3)
{
$list_manufacturers .= '</td></tr><tr><td>';
}else
{
$list_manufacturers .= '</td><td>';
}

if ($column_place == 3){$column_place == 0;}else {$column_place ++;}

 }
// when the list of manufactures is done fill in the empty table tags
for ($i=0, $i<$modulus; $i++)
{
$list_manufacturers .= ' </td><td>';
}
// print to screen the 4 column list
echo $list_manufacturers;
}
?>

</td></tr></table>
</center>

 

Thank very much pyramids, now is work fine.

Link to comment
Share on other sites

here is some code I put together to do what you asked.

you will have to debug it since I don't use the mod you are takling about.

<!-- all manufacturers begin //-->
<center>
<table><tr><td>

<?php
$manufacturers_query = tep_db_query("select manufacturers_name, manufacturers_id, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name" );

if (tep_db_num_rows($manufacturers_query) >= '1') 
{

 $count = tep_db_fetch_array($manufacturers_query); // count the manufactures
 $show_columns = 3; // number of columns one less than needed since it starts with 0
 $column_place = 0; // hold the starting point
 $list_manufacturers = ''; // create an empty var
 $modulus = 4 -($count % 4);  //get remaining empty columns

 while ($manufacturers = tep_db_fetch_array($manufacturers_query))
 {

// this is unchanged
$list_manufacturers .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' .  $manufacturers['manufacturers_name'], 'NONSSL', false) . '">'. $manufacturers['manufacturers_name'] . ' ' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name']) . "</a>\n";

// count which column it is and add the right table code
if ($column_place == 3)
{
$list_manufacturers .= '</td></tr><tr><td>';
}else
{
$list_manufacturers .= '</td><td>';
}

if ($column_place == 3){$column_place == 0;}else {$column_place ++;}

 }
// when the list of manufactures is done fill in the empty table tags
for ($i=0, $i<$modulus; $i++)
{
$list_manufacturers .= ' </td><td>';
}
// print to screen the 4 column list
echo $list_manufacturers;
}
?>

</td></tr></table>
</center>

 

Thank very much pyramids, now is work fine.

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...