Guest Posted May 21, 2007 Share Posted May 21, 2007 Alright, so I got my custom form almost created through EP. I have about 12 columns that I need up there. But I also have WAYYYY too many colums devoted simply to Attributes, which as of yet, I don't even use. I have been going through the code and I know where the attributes section is, but I don't know what to do with it. 1. I would like to cut out the attributes entirely at the moment. I really don't need to send a file with hundreds of cells of empty space! or (and posisbly the better idea) 2. Cut down the amount of attributes used to maybe one or two in case I decide to use them later. This would be nice, since that way I could make it work myself when I needed more attributes. The only thing that I can't figure out about this all though, is why am I getting so many attribute colums? I can't seem to find where exactly it gets the number of attributes from and I am pretty sure I never told it to have any. Any thoughts? Here is the area that deals with adding the attributes to the custom layout. if I need to work elsewhere in the code, tell me. The file is easypopulate.php found in the latest version of EP. // VJ product attributes begin case 'attrib': $iii = 0; $filelayout = array( 'v_products_model' => $iii++ ); $header_array = array(); $languages = tep_get_languages(); global $attribute_options_array; $attribute_options_count = 1; foreach ($attribute_options_array as $attribute_options_values) { $key1 = 'v_attribute_options_id_' . $attribute_options_count; $header_array[$key1] = $iii++; for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $l_id = $languages[$i]['id']; $key2 = 'v_attribute_options_name_' . $attribute_options_count . '_' . $l_id; $header_array[$key2] = $iii++; } $attribute_values_query = "select products_options_values_id from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$attribute_options_values['products_options_id'] . "' order by products_options_values_id"; $attribute_values_values = tep_db_query($attribute_values_query); $attribute_values_count = 1; while ($attribute_values = tep_db_fetch_array($attribute_values_values)) { $key3 = 'v_attribute_values_id_' . $attribute_options_count . '_' . $attribute_values_count; $header_array[$key3] = $iii++; $key4 = 'v_attribute_values_price_' . $attribute_options_count . '_' . $attribute_values_count; $header_array[$key4] = $iii++; for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $l_id = $languages[$i]['id']; $key5 = 'v_attribute_values_name_' . $attribute_options_count . '_' . $attribute_values_count . '_' . $l_id; $header_array[$key5] = $iii++; } $attribute_values_count++; } $attribute_options_count++; } $filelayout = array_merge($filelayout, $header_array); $filelayout_sql = "SELECT p.products_id as v_products_id, p.products_model as v_products_model FROM ".TABLE_PRODUCTS." as p "; break; // VJ product attributes end } $filelayout_count = count($filelayout); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.