Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Two Options Per Product


Recommended Posts

Posted

I need to have two options per product, ie size & colour. I see plenty of 'product extra fields' items but even though I have followed this:-

 

AS PER ANY MOD TO OSC PLEASE BACK UP

 

includes/modules/product_listings.php

 

FIND

 

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

}

break;

 

 

 

 

REPLACE WITH

//PRODUCT EXTRA FIELDS IN PRODUCT LISTING - BEGINING

 

//PRODUCT EXTRA FIELDS IN PRODUCT LISTING - BEGINING

 

//$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . //$listing['products_name'] . '</a> ';

 

// }

// break;

 

$extra_fields_text = '';

$extra_fields_query = tep_db_query("

SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value

FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef

LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf

ON ptf.products_extra_fields_id=pef.products_extra_fields_id

WHERE ptf.products_id=". (int) $listing['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."')

ORDER BY products_extra_fields_order");

 

while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {

if (! $extra_fields['status'])

continue;

$extra_fields_text = $extra_fields_text.

'<font color="#000000">'.$extra_fields['name'].': </font>' .

'<font color="#006600">' .$extra_fields['value'].'<BR></font>';

 

}

 

$lc_text = '<b><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $fldname . '</a></b> <br>' . $extra_fields_text . '<br>';

 

}

break;

 

// PRODUCT EXTRA FIELDS IN PRODUCT LISTING - END

 

I still don't appear to have multiple choices in the product options section, am I barking up the wrong .php?

Archived

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

×
×
  • Create New...