Kes Posted January 19, 2007 Share Posted January 19, 2007 Please help i am trying to align products with attibutes. I am using multi list multi col module I believe this is the part of the code where the adjustment needs to take place // Begin Add Multiple with attributes Contrib case 'PRODUCT_LIST_MULTIPLE': $lc_align = 'right'; $lc_valign = 'top'; $lc_text = (TABLE_HEADING_MULTIPLE . tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '0', 'size="4"')); $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $listing[$x]['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { $lc_text .= ''; $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing[$x]['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $selected = 0; $products_options_array = array(); $lc_text .= '' . $products_options_name['products_options_name'] . ':' . "\n"; $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing[$x]['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } Pic of Products trying to align Thanks for your help. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.