bakerballs Posted February 14, 2006 Posted February 14, 2006 I have product attributes installed correctly I just need to know how to move them to the center of my page under my graphic. Here is the example below, you help is kindly appreciated. jeffb
Guest Posted February 14, 2006 Posted February 14, 2006 Wrap your product attributes in a table and align it to the centre. From the look fo the screenshot you posted, you have also closed the table containing your graphic. Pop the attributes into the same table, open a new row <tr> and cell <td align="center"> Hope that helps.
bakerballs Posted February 15, 2006 Author Posted February 15, 2006 Wrap your product attributes in a table and align it to the centre. From the look fo the screenshot you posted, you have also closed the table containing your graphic. Pop the attributes into the same table, open a new row <tr> and cell <td align="center"> Hope that helps. cool... I see what you are saying. BUT i don't know where to edit the product attributes ?? the graphic and tables above the product attributes are written in html, you are right. ... OK here is what i did 1. made the tables and graphics in html and uploaded them on admin/categories and insert the html 2. for the product attributes i went to admin/products_attributes.php set that up and then it defaulted below the html i inserted above 3. now i need to know how edit and move the default placement of the product attributes to the center... ...it might be in a style sheet ?? thanks again :) jeffb
Guest Posted February 15, 2006 Posted February 15, 2006 catalog/product_info.php. Big block of code, between these two bits: ?php $products_attributes_query = tep_db_query("select count(*) as total from " and $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } ?> </td> </tr> You can see the table layout within that, so cut and paste it to inside the same table as your image, being careful to preserve table integrity (i.e. that all <table><tr> and <td>'s have been closed properly and also to ensure that you aren't messing up any if statements - i.e. wherever you find an { make sure you dont go moving the } without it!
bakerballs Posted February 15, 2006 Author Posted February 15, 2006 humm,... I see the code you are talking about, i tryied to paste it into the html section admin/categories.php it just read the code as text... is that what you were talking about ?? any other ideas ?? --i must have done it wrong
Guest Posted February 15, 2006 Posted February 15, 2006 sorry m8, when i copied and pasted it missed one charachter out - where it says ?php, it needs to say <?php, and you need to copy the whole segment INCLUDING those two lines.
bakerballs Posted February 17, 2006 Author Posted February 17, 2006 humm... this is the code i copied below: and I am just pasting it in the html cell under admin/categories to add a discription about a product... <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $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='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.options_values_price, pa.products_attributes_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'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php }
bakerballs Posted February 22, 2006 Author Posted February 22, 2006 Can anyone help with this? Also I would like to know how to make the product attributes links too... I have searched the formus and there are not any topics on this
Recommended Posts
Archived
This topic is now archived and is closed to further replies.