Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

customizing product listing???


alex243

Recommended Posts

I am trying to change the formate of how products are listed when a catagorie is selected but am having a hard time understanding how the information is formated. I have been working on changing the boxes.php file by creating a new class but can't figure out how I could reformate it similar to the new products listing. I know this would take a lot of explaining but if someone has the time I would really appreciate it! Thanks

 

// class constructor

function tableBox2($contents, $direct_output = false) {

$tableBox_string = '<table border="' . $this->table_border . '" width="' . $this->table_width . '" cellspacing="' . $this->table_cellspacing . '" cellpadding="' . $this->table_cellpadding . '"';

if ($this->table_parameters != '') $tableBox_string .= ' ' . $this->table_parameters; . "n";

 

for ($i=0, $n=sizeof($contents); $i<$n; $i++) {

if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "n";

$tableBox_string .= ' <tr';

if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;

if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];

$tableBox_string .= '>' . "n";

 

if (is_array($contents[$i][0])) {

for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {

if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {

$tableBox_string .= ' <td';

if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . $contents[$i][$x]['align'] . '"';

if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {

$tableBox_string .= ' ' . $contents[$i][$x]['params'];

} elseif (tep_not_null($this->table_data_parameters)) {

$tableBox_string .= ' ' . $this->table_data_parameters;

}

$tableBox_string .= '>';

if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];

$tableBox_string .= $contents[$i][$x]['text'];

if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';

$tableBox_string .= '</td>' . "n";

}

}

} else {

$tableBox_string .= ' <td';

if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . $contents[$i]['align'] . '"';

if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {

$tableBox_string .= ' ' . $contents[$i]['params'];

} elseif (tep_not_null($this->table_data_parameters)) {

$tableBox_string .= ' ' . $this->table_data_parameters;

}

$tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "n";

}

 

$tableBox_string .= ' </tr>' . "n";

if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "n";

}

 

$tableBox_string .= '</table>' . "n";

 

if ($direct_output) echo $tableBox_string;

 

return $tableBox_string;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...