Zen Cart Logo
Forums / General Questions / Customizing Product Listing Page

Customizing Product Listing Page

Views: 1,079

Results 1 to 8 of 8
27 Jul 2014, 5:38 PM
#1
tim_hershberger avatar

tim_hershberger

New Zenner

Join Date:
Jul 2014
Location:
Ozark, Missouri, United States
Posts:
5
Plugin Contributions:
0

Customizing Product Listing Page

Hello,

Need help, I've spent over 10 hours and reviewed all the threads but cant' figure this out.

I have been on this forum for 5 years under 'timhersh' but can't get the system to reset my password.

anyways,

I have edited the product info page to include extra fields, example

http://vermontindexable.com/indexable-tools/end-milling-c-3/weldon-shank-coolant-style-c-3_39/12-34-c-3_39_40/v12000-weldon-shank-coolant-style-p-38.html?cPath=3_39_40

But I can't get a couple of those fields to show up on the product listing page
example http://vermontindexable.com/indexable-tools/index.php?main_page=index&cPath=3_39_40

I'm lost and can't figure it out. Something I'm missing

Here is what is on my product listing page and my template vars page, located at /includes/modules/pages/index

The field I'm trying to add is in the products_description table and called, products_short_desc5

thanks

product listing

$list_box_contents[0] = array('params' => 'class="productListing-rowheading"');

$zc_col_count_description = 0;
$lc_align = '';
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  switch ($column_list[$col]) {
    case 'PRODUCT_LIST_MODEL':
    $lc_text = TABLE_HEADING_MODEL;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_text = TABLE_HEADING_PRODUCTS;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_SHORT_DESC5':
    $lc_text = PRODUCT_LIST_SHORT_DESC5;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_PRICE':
    $lc_text = TABLE_HEADING_PRICE;
    $lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : '');
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_text = TABLE_HEADING_QUANTITY;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $lc_text = TABLE_HEADING_WEIGHT;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_IMAGE':
    $lc_text = TABLE_HEADING_IMAGE;
    $lc_align = 'center';
    $zc_col_count_description++;
    break;
  }

main template vars----

  // create column list
 } else {
    // do not set the category
  }
  // create column list
  $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
  'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
  'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
  'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
  'PRODUCT_LIST_SHORT_desc5' => PRODUCT_LIST_SHORT_desc5,
  
  
 
  'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

  /*                         ,
  'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
  */
  asort($define_list);
  reset($define_list);
  $column_list = array();
  foreach ($define_list as $key => $value)
  {
    if ($value > 0) $column_list[] = $key;
  }

  $select_column_list = '';

  for ($i=0, $n=sizeof($column_list); $i<$n; $i++)
  {
    switch ($column_list[$i])
    {
      case 'PRODUCT_LIST_MODEL':
      $select_column_list .= 'p.products_model, ';
      break;
      case 'PRODUCT_LIST_NAME':
      $select_column_list .= 'pd.products_name, ';
      break;
	   case 'PRODUCT_LIST_SHORT_DESC5':
      $select_column_list .= 'pd.products_short_desc5, ';
      break;
      case 'PRODUCT_LIST_MANUFACTURER':
      $select_column_list .= 'm.manufacturers_name, ';
      break;
	  
	  case 'PRODUCT_LIST_SHORT_desc5':
      $select_column_list .= 'pd.products_short_desc5, ';
      break;
	  
  
29 Jul 2014, 4:31 AM
#2
tim_hershberger avatar

tim_hershberger

New Zenner

Join Date:
Jul 2014
Location:
Ozark, Missouri, United States
Posts:
5
Plugin Contributions:
0

Re: Customizing Product Listing Page

Hello, I can't figure this out. Any direction would be great. I'm using 5.0 so the module 'short descriptions' wont work.

I have this http://vermontindexable.com/indexable-tools/index.php?main_page=index&cPath=3_39_41

But need to get some custom fields that are in my products_description table added to the page, for example short_description5

thank you

29 Jul 2014, 6:28 AM
#3
tim_hershberger avatar

tim_hershberger

New Zenner

Join Date:
Jul 2014
Location:
Ozark, Missouri, United States
Posts:
5
Plugin Contributions:
0

Re: Customizing Product Listing Page

still working on this

here is what is in my english.php

// specials box text in sideboxes/specials.php
  define('BOX_HEADING_SPECIALS', 'Specials');
  define('CATEGORIES_BOX_HEADING_SPECIALS','Specials ...');
  define('TABLE_HEADING_SHORT_DESC','Specials ...');

  define('TABLE_HEADING_SHORT_DESCC','Specials ...');

  define('TABLE_HEADING_SHORT_DESC3','Specials ...');
  define('TABLE_HEADING_SHORT_DESC4','Specials ...');

here is what is in my main_template_vars @ /vermontindexable.com/indexable-tools/includes/modules/pages/index

 // create column list
  $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
  'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
  'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
  'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
  'TABLE_HEADING_SHORT_DESC' => TABLE_HEADING_SHORT_DESC,
    'TABLE_HEADING_SHORT_DESCC' => TABLE_HEADING_SHORT_DESCC,
	  'TABLE_HEADING_SHORT_DESC3' => TABLE_HEADING_SHORT_DESC3,
	    'TABLE_HEADING_SHORT_DESC4' => TABLE_HEADING_SHORT_DESC4,
  
 
  'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

  /*                         ,
  'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
  */
  asort($define_list);
  reset($define_list);
  $column_list = array();
  foreach ($define_list as $key => $value)
  {
    if ($value > 0) $column_list[] = $key;
  }

  $select_column_list = '';

  for ($i=0, $n=sizeof($column_list); $i<$n; $i++)
  {
    switch ($column_list[$i])
    {
      case 'PRODUCT_LIST_MODEL':
      $select_column_list .= 'p.products_model, ';
      break;
      case 'PRODUCT_LIST_NAME':
      $select_column_list .= 'pd.products_name, ';
      break;
	  
      case 'PRODUCT_LIST_MANUFACTURER':
      $select_column_list .= 'm.manufacturers_name, ';
      break;
	  
	   case 'PRODUCT_LIST_SHORT_DESC':
    $select_column_list .= 'pd.products_short_desc, ';
    break;  
	
	 case 'PRODUCT_LIST_SHORT_DESCC':
    $select_column_list .= 'pd.products_short_descc, ';
    break;  
	
	 case 'PRODUCT_LIST_SHORT_DESC3':
    $select_column_list .= 'pd.products_short_desc3, ';
    break;  
	 case 'PRODUCT_LIST_SHORT_DESC4':
    $select_column_list .= 'pd.products_short_desc4, ';
    break;  
	  
	  
	  

and what is in my productlisting- at /vermontindexable.com/indexable-tools/includes/modules/modern_blue

$zc_col_count_description = 0;
$lc_align = '';
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  switch ($column_list[$col]) {
    case 'PRODUCT_LIST_MODEL':
    $lc_text = 'Part Name';
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_text = TABLE_HEADING_PRODUCTS;
    $lc_align = '';
    $zc_col_count_description++;
    break;
	case 'PRODUCT_LIST_SHORT_DESC':
    $lc_text = TABLE_HEADING_SHORT_DESC;
    $lc_align = '';
    $zc_col_count_description++;
    break;
	case 'PRODUCT_LIST_SHORT_DESCC':
    $lc_text = TABLE_HEADING_SHORT_DESCC;
    $lc_align = '';
    $zc_col_count_description++;
    break;
	
	case 'PRODUCT_LIST_SHORT_DESC4':
    $lc_text = TABLE_HEADING_SHORT_DESC4;
    $lc_align = '';
    $zc_col_count_description++;
    break;case 'PRODUCT_LIST_SHORT_DESC3':
    $lc_text = TABLE_HEADING_SHORT_DESC3;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_MANUFACTURER':
    $lc_text = TABLE_HEADING_MANUFACTURER;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_PRICE':
    $lc_text = TABLE_HEADING_PRICE;
    $lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : '');
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_text = TABLE_HEADING_QUANTITY;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $lc_text = TABLE_HEADING_WEIGHT;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_IMAGE':
    $lc_text = TABLE_HEADING_IMAGE;
    $lc_align = 'center';
    $zc_col_count_description++;
    break;
  }

  if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
    $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text);
  }



  $list_box_contents[0][$col] = array('align' => $lc_align,
                                      'params' => 'class="productListing-heading"',
                                      'text' => $lc_text );
}

if ($listing_split->number_of_rows > 0) {
  $rows = 0;
  $listing = $db->Execute($listing_split->sql_query);
  $extra_row = 0;
  while (!$listing->EOF) {
    $rows++;

    if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
      $list_box_contents[$rows] = array('params' => 'class="productListing-even"');
    } else {
      $list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
    }

    $cur_row = sizeof($list_box_contents) - 1;

    for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
      $lc_align = '';

      switch ($column_list[$col]) {
      case 'PRODUCT_LIST_SHORT_DESC':
        $lc_align = '';
        $lc_text = $listing->fields['products_short_desc'] . ' ';
        break;
		case 'PRODUCT_LIST_SHORT_DESCC':
        $lc_align = '';
        $lc_text = $listing->fields['products_short_descc'] . ' ';
        break;
		case 'PRODUCT_LIST_SHORT_DESC3':
        $lc_align = '';
        $lc_text = $listing->fields['products_short_desc3'] . ' ';
        break;
		case 'PRODUCT_LIST_SHORT_DESC4':
        $lc_align = '';
        $lc_text = $listing->fields['products_short_desc4'] . ' ';
        break;
        case 'PRODUCT_LIST_NAME':
        $lc_align = '';
29 Jul 2014, 12:50 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Customizing Product Listing Page

Tim Hershberger:

Hello,

Need help, I've spent over 10 hours and reviewed all the threads but cant' figure this out.

I have been on this forum for 5 years under 'timhersh' but can't get the system to reset my password.

anyways,

I have edited the product info page to include extra fields, example

http://vermontindexable.com/indexable-tools/end-milling-c-3/weldon-shank-coolant-style-c-3_39/12-34-c-3_39_40/v12000-weldon-shank-coolant-style-p-38.html?cPath=3_39_40

But I can't get a couple of those fields to show up on the product listing page
example http://vermontindexable.com/indexable-tools/index.php?main_page=index&cPath=3_39_40

I'm lost and can't figure it out. Something I'm missing

Here is what is on my product listing page and my template vars page, located at /includes/modules/pages/index

The field I'm trying to add is in the products_description table and called, products_short_desc5

thanks

product listing

$list_box_contents[0] = array('params' => 'class="productListing-rowheading"');

$zc_col_count_description = 0;
$lc_align = '';
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_text = TABLE_HEADING_MODEL;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_NAME':
$lc_text = TABLE_HEADING_PRODUCTS;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_SHORT_DESC5':
$lc_text = PRODUCT_LIST_SHORT_DESC5;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_PRICE':
$lc_text = TABLE_HEADING_PRICE;
$lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : '');
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_QUANTITY':
$lc_text = TABLE_HEADING_QUANTITY;
$lc_align = 'right';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_WEIGHT':
$lc_text = TABLE_HEADING_WEIGHT;
$lc_align = 'right';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_IMAGE':
$lc_text = TABLE_HEADING_IMAGE;
$lc_align = 'center';
$zc_col_count_description++;
break;
}

> 
> main template vars----
> 
> ```php
  // create column list
 } else {
    // do not set the category
  }
  // create column list
  $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
  'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
  'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
  'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
  'PRODUCT_LIST_SHORT_desc5' => PRODUCT_LIST_SHORT_desc5,
  
  
 
  'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

  /*                         ,
  'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
  */
  asort($define_list);
  reset($define_list);
  $column_list = array();
  foreach ($define_list as $key => $value)
  {
    if ($value > 0) $column_list[] = $key;
  }

  $select_column_list = '';

  for ($i=0, $n=sizeof($column_list); $i<$n; $i++)
  {
    switch ($column_list[$i])
    {
      case 'PRODUCT_LIST_MODEL':
      $select_column_list .= 'p.products_model, ';
      break;
      case 'PRODUCT_LIST_NAME':
      $select_column_list .= 'pd.products_name, ';
      break;
	   case 'PRODUCT_LIST_SHORT_DESC5':
      $select_column_list .= 'pd.products_short_desc5, ';
      break;
      case 'PRODUCT_LIST_MANUFACTURER':
      $select_column_list .= 'm.manufacturers_name, ';
      break;
	  
	  case 'PRODUCT_LIST_SHORT_desc5':
      $select_column_list .= 'pd.products_short_desc5, ';
      break;
	  
  

Haven't pieced all of the code together, but if you look above at the use of desc5, you have it used in two different cases. PRODUCT_LIST_SHORT_desc5 and PRODUCT_LIST_SHORT_DESC5. This needs to be consistent and if planning for this to be a constant then should be in all caps.##

30 Jul 2014, 3:26 AM
#5
tim_hershberger avatar

tim_hershberger

New Zenner

Join Date:
Jul 2014
Location:
Ozark, Missouri, United States
Posts:
5
Plugin Contributions:
0

Re: Customizing Product Listing Page

thank you, I did notice that. Please see the last post, any ideas? or here is where I'm at. Produces this http://vermontindexable.com/indexable-tools/index.php?main_page=index&cPath=3_27_46

still working on this

here is what is in my english.php

PHP Code:
// specials box text in sideboxes/specials.php
define('BOX_HEADING_SPECIALS', 'Specials');
define('CATEGORIES_BOX_HEADING_SPECIALS','Specials ...');
define('TABLE_HEADING_SHORT_DESC','Specials ...');

define('TABLE_HEADING_SHORT_DESCC','Specials ...');

define('TABLE_HEADING_SHORT_DESC3','Specials ...');
define('TABLE_HEADING_SHORT_DESC4','Specials ...');

here is what is in my main_template_vars @ /vermontindexable.com/indexable-tools/includes/modules/pages/index

PHP Code:
// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
'TABLE_HEADING_SHORT_DESC' => TABLE_HEADING_SHORT_DESC,
'TABLE_HEADING_SHORT_DESCC' => TABLE_HEADING_SHORT_DESCC,
'TABLE_HEADING_SHORT_DESC3' => TABLE_HEADING_SHORT_DESC3,
'TABLE_HEADING_SHORT_DESC4' => TABLE_HEADING_SHORT_DESC4,

'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

/* ,
'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
*/
asort($define_list);
reset($define_list);
$column_list = array();
foreach ($define_list as $key => $value)
{
if ($value > 0) $column_list[] = $key;
}

$select_column_list = '';

for ($i=0, $n=sizeof($column_list); $i<$n; $i++)
{
switch ($column_list[$i])
{
case 'PRODUCT_LIST_MODEL':
$select_column_list .= 'p.products_model, ';
break;
case 'PRODUCT_LIST_NAME':
$select_column_list .= 'pd.products_name, ';
break;

  case 'PRODUCT_LIST_MANUFACTURER':
  $select_column_list .= 'm.manufacturers_name, ';
  break;
  
   case 'PRODUCT_LIST_SHORT_DESC':
$select_column_list .= 'pd.products_short_desc, ';
break;  

 case 'PRODUCT_LIST_SHORT_DESCC':
$select_column_list .= 'pd.products_short_descc, ';
break;  

 case 'PRODUCT_LIST_SHORT_DESC3':
$select_column_list .= 'pd.products_short_desc3, ';
break;  
 case 'PRODUCT_LIST_SHORT_DESC4':
$select_column_list .= 'pd.products_short_desc4, ';
break;  

and what is in my productlisting- at /vermontindexable.com/indexable-tools/includes/modules/modern_blue

PHP Code:
$zc_col_count_description = 0;
$lc_align = '';
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_text = 'Part Name';
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_NAME':
$lc_text = TABLE_HEADING_PRODUCTS;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_SHORT_DESC':
$lc_text = TABLE_HEADING_SHORT_DESC;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_SHORT_DESCC':
$lc_text = TABLE_HEADING_SHORT_DESCC;
$lc_align = '';
$zc_col_count_description++;
break;

case 'PRODUCT_LIST_SHORT_DESC4':
$lc_text = TABLE_HEADING_SHORT_DESC4;
$lc_align = '';
$zc_col_count_description++;
break;case 'PRODUCT_LIST_SHORT_DESC3':
$lc_text = TABLE_HEADING_SHORT_DESC3;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_text = TABLE_HEADING_MANUFACTURER;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_PRICE':
$lc_text = TABLE_HEADING_PRICE;
$lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : '');
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_QUANTITY':
$lc_text = TABLE_HEADING_QUANTITY;
$lc_align = 'right';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_WEIGHT':
$lc_text = TABLE_HEADING_WEIGHT;
$lc_align = 'right';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_IMAGE':
$lc_text = TABLE_HEADING_IMAGE;
$lc_align = 'center';
$zc_col_count_description++;
break;

}

if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
$lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text);
}

$list_box_contents[0][$col] = array('align' => $lc_align,
'params' => 'class="productListing-heading"',
'text' => $lc_text );
}

if ($listing_split->number_of_rows > 0) {
$rows = 0;
$listing = $db->Execute($listing_split->sql_query);
$extra_row = 0;
while (!$listing->EOF) {
$rows++;

if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
  $list_box_contents[$rows] = array('params' => 'class="productListing-even"');
} else {
  $list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
}

$cur_row = sizeof($list_box_contents) - 1;

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  $lc_align = '';

  switch ($column_list[$col]) {
  case 'PRODUCT_LIST_SHORT_DESC':
    $lc_align = '';
    $lc_text = $listing->fields['products_short_desc'] . ' ';
    break;
    case 'PRODUCT_LIST_SHORT_DESCC':
    $lc_align = '';
    $lc_text = $listing->fields['products_short_descc'] . ' ';
    break;
    case 'PRODUCT_LIST_SHORT_DESC3':
    $lc_align = '';
    $lc_text = $listing->fields['products_short_desc3'] . ' ';
    break;
    case 'PRODUCT_LIST_SHORT_DESC4':
    $lc_align = '';
    $lc_text = $listing->fields['products_short_desc4'] . ' ';
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_align = '';
30 Jul 2014, 4:25 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Customizing Product Listing Page

Tim Hershberger:

thank you, I did notice that. Please see the last post, any ideas? or here is where I'm at. Produces this http://vermontindexable.com/indexable-tools/index.php?main_page=index&cPath=3_27_46

still working on this

here is what is in my english.php

PHP Code:
// specials box text in sideboxes/specials.php
define('BOX_HEADING_SPECIALS', 'Specials');
define('CATEGORIES_BOX_HEADING_SPECIALS','Specials ...');
define('TABLE_HEADING_SHORT_DESC','Specials ...');

define('TABLE_HEADING_SHORT_DESCC','Specials ...');

define('TABLE_HEADING_SHORT_DESC3','Specials ...');
define('TABLE_HEADING_SHORT_DESC4','Specials ...');

here is what is in my main_template_vars @ /vermontindexable.com/indexable-tools/includes/modules/pages/index

PHP Code:
// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
'TABLE_HEADING_SHORT_DESC' => TABLE_HEADING_SHORT_DESC,
'TABLE_HEADING_SHORT_DESCC' => TABLE_HEADING_SHORT_DESCC,
'TABLE_HEADING_SHORT_DESC3' => TABLE_HEADING_SHORT_DESC3,
'TABLE_HEADING_SHORT_DESC4' => TABLE_HEADING_SHORT_DESC4,

'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

/* ,
'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
*/
asort($define_list);
reset($define_list);
$column_list = array();
foreach ($define_list as $key => $value)
{
if ($value > 0) $column_list[] = $key;
}

$select_column_list = '';

for ($i=0, $n=sizeof($column_list); $i<$n; $i++)
{
switch ($column_list[$i])
{
case 'PRODUCT_LIST_MODEL':
$select_column_list .= 'p.products_model, ';
break;
case 'PRODUCT_LIST_NAME':
$select_column_list .= 'pd.products_name, ';
break;

  case 'PRODUCT_LIST_MANUFACTURER':
  $select_column_list .= 'm.manufacturers_name, ';
  break;
  
   case 'PRODUCT_LIST_SHORT_DESC':
$select_column_list .= 'pd.products_short_desc, ';
break;  

 case 'PRODUCT_LIST_SHORT_DESCC':
$select_column_list .= 'pd.products_short_descc, ';
break;  

 case 'PRODUCT_LIST_SHORT_DESC3':
$select_column_list .= 'pd.products_short_desc3, ';
break;  
 case 'PRODUCT_LIST_SHORT_DESC4':
$select_column_list .= 'pd.products_short_desc4, ';
break;  

and what is in my productlisting- at /vermontindexable.com/indexable-tools/includes/modules/modern_blue

PHP Code:
$zc_col_count_description = 0;
$lc_align = '';
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_text = 'Part Name';
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_NAME':
$lc_text = TABLE_HEADING_PRODUCTS;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_SHORT_DESC':
$lc_text = TABLE_HEADING_SHORT_DESC;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_SHORT_DESCC':
$lc_text = TABLE_HEADING_SHORT_DESCC;
$lc_align = '';
$zc_col_count_description++;
break;

case 'PRODUCT_LIST_SHORT_DESC4':
$lc_text = TABLE_HEADING_SHORT_DESC4;
$lc_align = '';
$zc_col_count_description++;
break;case 'PRODUCT_LIST_SHORT_DESC3':
$lc_text = TABLE_HEADING_SHORT_DESC3;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_text = TABLE_HEADING_MANUFACTURER;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_PRICE':
$lc_text = TABLE_HEADING_PRICE;
$lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : '');
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_QUANTITY':
$lc_text = TABLE_HEADING_QUANTITY;
$lc_align = 'right';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_WEIGHT':
$lc_text = TABLE_HEADING_WEIGHT;
$lc_align = 'right';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_IMAGE':
$lc_text = TABLE_HEADING_IMAGE;
$lc_align = 'center';
$zc_col_count_description++;
break;

}

if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
$lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text);
}

$list_box_contents[0][$col] = array('align' => $lc_align,
'params' => 'class="productListing-heading"',
'text' => $lc_text );
}

if ($listing_split->number_of_rows > 0) {
$rows = 0;
$listing = $db->Execute($listing_split->sql_query);
$extra_row = 0;
while (!$listing->EOF) {
$rows++;

if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
  $list_box_contents[$rows] = array('params' => 'class="productListing-even"');
} else {
  $list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
}

$cur_row = sizeof($list_box_contents) - 1;

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  $lc_align = '';

  switch ($column_list[$col]) {
  case 'PRODUCT_LIST_SHORT_DESC':
    $lc_align = '';
    $lc_text = $listing->fields['products_short_desc'] . ' ';
    break;
    case 'PRODUCT_LIST_SHORT_DESCC':
    $lc_align = '';
    $lc_text = $listing->fields['products_short_descc'] . ' ';
    break;
    case 'PRODUCT_LIST_SHORT_DESC3':
    $lc_align = '';
    $lc_text = $listing->fields['products_short_desc3'] . ' ';
    break;
    case 'PRODUCT_LIST_SHORT_DESC4':
    $lc_align = '';
    $lc_text = $listing->fields['products_short_desc4'] . ' ';
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_align = '';

I'll be honest, I'm getting a little lost with what it is you're trying to do with what you have. So, right off the bat I can see that there is a problem in /vermontindexable.com/indexable-tools/includes/modules/pages/index

In the define_list, there are these different TABLE... Variables, but then below there is a case select to look for the PRODUCT... Version. Those cases never run, because they are not in the define... Seems to me that the code was closer to running the first time than now. After that error, I pretty much stop looking because even then I don't think that the table defines are what you are looking for there, but perhaps you are...

Need to follow the logic and the assignments from top to bottom and file to file. And to get the result you want you almost have to work backwards.

30 Jul 2014, 5:57 AM
#7
tim_hershberger avatar

tim_hershberger

New Zenner

Join Date:
Jul 2014
Location:
Ozark, Missouri, United States
Posts:
5
Plugin Contributions:
0

Re: Customizing Product Listing Page

got it, this did it. Product listing

<?php
/**
 * product_listing module
 *
 * @package modules
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: product_listing.php 18695 2011-05-04 05:24:19Z drbyte $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
$show_submit = zen_run_normal();
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');
$zco_notifier->notify('NOTIFY_MODULE_PRODUCT_LISTING_RESULTCOUNT', $listing_split->number_of_rows);
$how_many = 0;

$list_box_contents[0] = array('params' => 'class="productListing-rowheading"');

$zc_col_count_description = 0;
$lc_align = '';
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  switch ($column_list[$col]) {
    case 'PRODUCT_LIST_MODEL':
    $lc_text = 'EDP'  ;
   $lc_align = 'center';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_text = TABLE_HEADING_PRODUCTS;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_MANUFACTURER':
    $lc_text = TABLE_HEADING_MANUFACTURER;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_PRICE':
    $lc_text = TABLE_HEADING_PRICE;
    $lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : '');
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_text = TABLE_HEADING_QUANTITY;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $lc_text = TABLE_HEADING_WEIGHT;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_IMAGE':
    $lc_text = TABLE_HEADING_IMAGE;
    $lc_align = 'center';
    $zc_col_count_description++;
    break; case 'PRODUCT_LIST_SHORT_DESC':
    $lc_text = 'Diameter' ;
$lc_align = 'left';
    $zc_col_count_description++;
    break;    
    case 'PRODUCT_LIST_SHORT_DESC4':
    $lc_text = 'Shank' ;
$lc_align = 'center';
    $zc_col_count_description++;
    break;case 'PRODUCT_LIST_SHORT_DESC3':
    $lc_text = 'Flutes';
   $lc_align = 'center';
    $zc_col_count_description++;
    break;
  }

  if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
    $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text);
  }



  $list_box_contents[0][$col] = array('align' => $lc_align,
                                      'params' => 'class="productListing-heading"',
                                      'text' => $lc_text );
}

if ($listing_split->number_of_rows > 0) {
  $rows = 0;
  $listing = $db->Execute($listing_split->sql_query);
  $extra_row = 0;
  while (!$listing->EOF) {
    $rows++;

    if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
      $list_box_contents[$rows] = array('params' => 'class="productListing-even"');
    } else {
      $list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
    }

    $cur_row = sizeof($list_box_contents) - 1;

    for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
      $lc_align = '';
      switch ($column_list[$col]) {
        case 'PRODUCT_LIST_MODEL':
        $lc_align = '';
        $lc_text = $listing->fields['products_model'];
        break;
        case 'PRODUCT_LIST_NAME':
        $lc_align = '';
        $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
        break; 

case 'PRODUCT_LIST_SHORT_DESC4':
        $lc_align = '';
        $lc_text = $listing->fields['products_short_desc4'] . ' ';
        break;

case 'PRODUCT_LIST_SHORT_DESC':
        $lc_align = '';
        $lc_text = $listing->fields['products_short_desc'] . ' ';
        break;
        case 'PRODUCT_LIST_SHORT_DESC3':
        $lc_align = '';
        $lc_text = $listing->fields['products_short_desc3'] . ' ';
        break;
        
        case 'PRODUCT_LIST_MANUFACTURER':
        $lc_align = '';
        $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
        break;
        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text =  $lc_price;

        // more info in place of buy now
        $lc_button = '';
        if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
          $lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        } else {
          if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
            if (
                // not a hide qty box product
                $listing->fields['products_qty_box_status'] != 0 &&
                // product type can be added to cart
                zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
                &&
                // product is not call for price
                $listing->fields['product_is_call'] == 0
                &&
                // product is in stock or customers may add it to cart anyway
                ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
              $how_many++;
            }
            // hide quantity box
            if ($listing->fields['products_qty_box_status'] == 0) {
              $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
            } else {
              $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
            }
          } else {
// qty box with add to cart button
            if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
              $lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
            } else {
              $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
            }
          }
        }
        $the_button = $lc_button;
        $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
        $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');

        break;
        case 'PRODUCT_LIST_QUANTITY':
        $lc_align = 'right';
        $lc_text = $listing->fields['products_quantity'];
        break;
        case 'PRODUCT_LIST_WEIGHT':
        $lc_align = 'right';
        $lc_text = $listing->fields['products_weight'];
        break;
        case 'PRODUCT_LIST_IMAGE':
        $lc_align = 'center';
        if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
          $lc_text = '';
        } else {
          if (isset($_GET['manufacturers_id'])) {
            $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
          } else {
            $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
          }
        }
        break;
      }

      $list_box_contents[$rows][$col] = array('align' => $lc_align,
                                              'params' => 'class="productListing-data"',
                                              'text'  => $lc_text);
    }

    // add description and match alternating colors
    //if (PRODUCT_LIST_DESCRIPTION > 0) {
    //  $rows++;
    //  if ($extra_row == 1) {
    //    $list_box_description = "productListing-data-description-even";
    //    $extra_row=0;
    //  } else {
    //    $list_box_description = "productListing-data-description-odd";
    //    $extra_row=1;
    //  }
    //  $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"',
    //  'text' => zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION));
    //}
    $listing->MoveNext();
  }
  $error_categories = false;
} else {
  $list_box_contents = array();

  $list_box_contents[0] = array('params' => 'class="productListing-odd"');
  $list_box_contents[0][] = array('params' => 'class="productListing-data"',
                                              'text' => TEXT_NO_PRODUCTS);

  $error_categories = true;
}

if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or  PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3) ) {
  $show_top_submit_button = true;
} else {
  $show_top_submit_button = false;
}
if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) ) {
  $show_bottom_submit_button = true;
} else {
  $show_bottom_submit_button = false;
}



  if ($how_many > 0 && PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) {
  // bof: multiple products
    echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product', $request_type), 'post', 'enctype="multipart/form-data"');
  }
30 Jul 2014, 9:42 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Customizing Product Listing Page

Tim Hershberger:

got it, this did it. Product listing

<?php /** * product_listing module * * @package modules * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: product_listing.php 18695 2011-05-04 05:24:19Z drbyte $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } $show_submit = zen_run_normal(); $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page'); $zco_notifier->notify('NOTIFY_MODULE_PRODUCT_LISTING_RESULTCOUNT', $listing_split->number_of_rows); $how_many = 0; $list_box_contents[0] = array('params' => 'class="productListing-rowheading"'); $zc_col_count_description = 0; $lc_align = ''; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = 'EDP' ; $lc_align = 'center'; $zc_col_count_description++; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : ''); $zc_col_count_description++; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; $zc_col_count_description++; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; $zc_col_count_description++; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; $zc_col_count_description++; break; case 'PRODUCT_LIST_SHORT_DESC': $lc_text = 'Diameter' ; $lc_align = 'left'; $zc_col_count_description++; break; case 'PRODUCT_LIST_SHORT_DESC4': $lc_text = 'Shank' ; $lc_align = 'center'; $zc_col_count_description++; break;case 'PRODUCT_LIST_SHORT_DESC3': $lc_text = 'Flutes'; $lc_align = 'center'; $zc_col_count_description++; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text); } $list_box_contents[0][$col] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => $lc_text ); } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing = $db->Execute($listing_split->sql_query); $extra_row = 0; while (!$listing->EOF) { $rows++; if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) { $list_box_contents[$rows] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[$rows] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = $listing->fields['products_model']; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'; break; case 'PRODUCT_LIST_SHORT_DESC4': $lc_align = ''; $lc_text = $listing->fields['products_short_desc4'] . ' '; break; case 'PRODUCT_LIST_SHORT_DESC': $lc_align = ''; $lc_text = $listing->fields['products_short_desc'] . ' '; break; case 'PRODUCT_LIST_SHORT_DESC3': $lc_align = ''; $lc_text = $listing->fields['products_short_desc3'] . ' '; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>'; break; case 'PRODUCT_LIST_PRICE': $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />'; $lc_align = 'right'; $lc_text = $lc_price; // more info in place of buy now $lc_button = ''; if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') { $lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; } else { if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) { if ( // not a hide qty box product $listing->fields['products_qty_box_status'] != 0 && // product type can be added to cart zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N' && // product is not call for price $listing->fields['product_is_call'] == 0 && // product is in stock or customers may add it to cart anyway ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) { $how_many++; } // hide quantity box if ($listing->fields['products_qty_box_status'] == 0) { $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; } else { $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />"; } } else { // qty box with add to cart button if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) { $lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>'; } else { $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; } } } $the_button = $lc_button; $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']); $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : ''); break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = $listing->fields['products_quantity']; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = $listing->fields['products_weight']; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) { $lc_text = ''; } else { if (isset($_GET['manufacturers_id'])) { $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; } else { $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; } } break; } $list_box_contents[$rows][$col] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } // add description and match alternating colors //if (PRODUCT_LIST_DESCRIPTION > 0) { // $rows++; // if ($extra_row == 1) { // $list_box_description = "productListing-data-description-even"; // $extra_row=0; // } else { // $list_box_description = "productListing-data-description-odd"; // $extra_row=1; // } // $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"', // 'text' => zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION)); //} $listing->MoveNext(); } $error_categories = false; } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); $error_categories = true; } if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3) ) { $show_top_submit_button = true; } else { $show_top_submit_button = false; } if (($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) ) { $show_bottom_submit_button = true; } else { $show_bottom_submit_button = false; } if ($how_many > 0 && PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) { // bof: multiple products echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product', $request_type), 'post', 'enctype="multipart/form-data"'); } ``` Congrats, now then. There have been numerous files identified for possible changes. Mind summarizing what was changed where, perhaps in relationship to vanilla install?