Inside every <TR> </TR> on our table we hold 2 <TD>
The first <TD> holds the drop down list with products and products information link and the second <TD> holds the price of selected product.
Well in this module, we use 28 fields ( <TR> ) to show the customer the Options.
PC Configurator table will be constructed automatically, based on what product groups we have activated.
I tested the following and it is working good.
Bellow it is not all the code I describe but only one query to SHOW or NOT the first <TR>
<?php
/*
Here we query to find IF the FIRST product group is ACTIVATED and what products should be listed in this drop down list, based on our selection in Admin->Pc Configurator. IF this product group is not activated, and has the value "off" we do not present the first <TR> at all. Also with this way, we assocciate the value of products group name we have selected to the SELECTED item in the drop down list. So if we have selected "Computer Cases" for the first product group, the first OPTION will have SELECTED the name "Computer Cases" and the drop down list will contain all products inside the category "Computer Cases" we have created before.
*/
$check_configuration_value_1 =
$db->Execute
("
select configuration_value
from " . TABLE_CONFIGURATION . "
where configuration_key= 'PRODUCTS_GROUP_PC_CONFIGURATOR_1'
");
$configuration_value_1 =
$check_configuration_value_1->fields['configuration_value'];
if( $configuration_value_1 != "off" ) {
?>
HERE IS THE FIRST <TR> which actualy holds 2 <TD>
In the first <TD> we show our drop down list and products link.
The second <TD> holds the selected product's price.
If we have not activated the first product group , content in this area will not be presented at all.
This way our PC Configurator Table in shop is constructed automatically, based on our selections.
<?php } ?>
Bookmarks