chrometweaks.org

Does iPage suport flash websites?

Click Here To View All Answers...


First question I got is Does iPage suport flash websites? Thanks for any comment. My 2nd question... Im trying to add radio select boxes exactly like the one seen in the following link:.

Product Attrib examples.

I have been trying to figure this out for a long time now. if anyone can help please message or email me..

My email address is :.

Chrisstylez.burke@us.army.mil.

Thanx in advance..

Comments (116)

Ye, but you might want to make sure and wait for someone else here to confirm it as I am not sure. Better yet, why don't you email the iPage guys because they can give you help better...

Comment #1

This is an example of the results that I need. if you have even the slightest idea on how to achieve this your help would be great. I saw this done on another iPage site using OSC so I know it is possible, the only question is how..

This post has been edited by.

Chrisstylez.

: 06 February 2004, 18:59..

Comment #2

I know someone knows how to do this. just take some time out and help..

Comment #3

Sorry - not sure how to do this..

Have you emailed the store owner where you saw it in action to see if they can advise?.

I have done this in the past and have been assisted...

Comment #4

Yeah ive tried that, they never responded. ill try it again if it helps...

Comment #5

Yes almost exactly like that, that would be perfect..

Comment #6

Someone else coded that part for m if someone points me in the right direction I would gladly share the code with you..

I did want tick boxes, apparentlly it's not possible, dunno if thats true thou...

Comment #7

Well, the contribution I gave a link to above enables the use of text input fields, radio buttons and tick boxes also, if anyone wa interested. Or even a combination of all three..

If you wanted the option names with the coloured bar, I am sure that's only a matter of making a few calls on the stylesheet..

*shrugs*.

Seems like most of the work is done in the contrib - don't know why you couldn't go the extra few metres and make it do exactly what you wanted...

Comment #8

Thanx for that input JULIECSM, I didnt know it was in the stylesheet, but there still remains a problem of the images. how do I add the images. I'm not the greatest in php editing. I'm mostly a graphics and flash kinda person lol..

Comment #9

I hadn't noticed the images..

I do know that there is also a contrib somewhere that allows you to add an image per attribute. Perhaps the iPage site owner has combined the two contribs to enable both the image and the radio buttons...

Comment #10

Thanx, I have one more question, in the stylesheet what should I change?..

Comment #11

OK this is off the cuff so bear with me if it doesn't work..

In product_info.php find.

Echo '<tr><td class="main">'$products_options_name['products_options_name']':</td><td>'"\n";.

Change it to.

Echo '<tr><td class="productListing-heading" colspan="3"><b>'$products_options_name['products_options_name']':</b><br></td><td>'"\n";.

This.

Should.

Call the coloured bar, make the option name bold and make a line break after the heading before the attribute listing - just as in your example..

This uses a class which is already in the stylesheet. If you want a different colour you will need to create a new class in the stylesheet with the colour you want...

Comment #12

After further consideration, try:.

Echo '<tr><td class="productListing-heading" colspan="3"><b>'$products_options_name['products_options_name']':</b></td></tr>.

<tr><td>'"\n";.

Instead...

Comment #13

Nah that one didnt work, this is the original code.

Echo '<tr><td class="main">'$products_options_name['products_options_name']': </td><td class="main">';.

And this is what I changed it to.

Echo '<tr><td class="productListing-heading" colspan="3"><b>'$products_options_name['products_options_name']':</b></td></tr>.

<tr><td>'"\n";..

Comment #14

What did it do?.

That was the code I used the from view source of the page you gave as an example...

Comment #15

This is the full code of my product_info.php page.

<?php.

/*.

 $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $.

 osCommerce, Open Source E-Commerce Solutions.

 http://www.oscommerce.com.

 Copyright (c) 2003 osCommerce.

 Released under the GNU General Public License.

*/.

 require('includes/application_top.php');.

 require(DIR_WS_LANGUAGES$language'/'FILENAME_PRODUCT_INFO);.

 $product_check_query = tep_db_query("select count(*) as total from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_DESCRIPTION" pd where p.products_status = '1' and p.products_id = '"(int)$HTTP_GET_VARS['products_id']"' and pd.products_id = p.products_id and pd.language_id = '"(int)$languages_id"'");.

 $product_check = tep_db_fetch_array($product_check_query);.

?>.

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">.

<html <?php echo HTML_PARAMS; ?>>.

<head>.

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">.

<title><?php echo TITLE; ?></title>.

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER)DIR_WS_CATALOG; ?>">.

<link rel="stylesheet" type="text/css" href="stylesheet.css">.

<script language="javascript"><!.

Function popupWindow(url) {.

 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res.

Izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le.

Ft=150').

}.

//></script>.

</head>.

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">.

<! header //>.

<?php require(DIR_WS_INCLUDES'header.php'); ?>.

<! header_eof //>.

<! body //>.

<table border="0" width="100%" cellspacing="3" cellpadding="3">.

 <tr>.

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! left_navigation //>.

<?php require(DIR_WS_INCLUDES'column_left.php'); ?>.

<! left_navigation_eof //>.

   </table></td>.

<! body_text //>.

   <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action'))'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">.

<?php.

 if ($product_check['total'] < 1) {.

?>.

     <tr>.

       <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">.

         <tr class="infoBoxContents">.

           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">.

             <tr>.

               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>.

               <td align="right"><?php echo '<a href="'tep_href_link(FILENAME_DEFAULT)'">'tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE)'</a>'; ?></td>.

               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>.

             </tr>.

           </table></td>.

         </tr>.

       </table></td>.

     </tr>.

<?php.

 } else {.

   $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 = '"(int)$HTTP_GET_VARS['products_id']"' and pd.products_id = p.products_id and pd.language_id = '"(int)$languages_id"'");.

   $product_info = tep_db_fetch_array($product_info_query);.

   tep_db_query("update "TABLE_PRODUCTS_DESCRIPTION" set products_viewed = products_viewed+1 where products_id = '"(int)$HTTP_GET_VARS['products_id']"' and language_id = '"(int)$languages_id"'");.

   if ($new_price = tep_get_products_special_price($product_info['products_id'])) {.

     $products_price = '<s>'$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))'</s> <span class="productSpecialPrice">'$currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']))'</span>';.

   } else {.

     $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));.

   }.

   if (tep_not_null($product_info['products_model'])) {.

     $products_name = $product_info['products_name']'<br><span class="smallText">['$product_info['products_model']']</span>';.

   } else {.

     $products_name = $product_info['products_name'];.

   }.

?>.

     <tr>.

       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">.

         <tr>.

           <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>.

           <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>.

         </tr>.

       </table></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td class="main">.

<?php.

   if (tep_not_null($product_info['products_image'])) {.

?>.

         <table border="0" cellspacing="0" cellpadding="2" align="right">.

           <tr>.

             <td align="center" class="smallText">.

<script language="javascript"><!.

Document.write('<?php echo '<a href="javascript:popupWindow(\\\''tep_href_link(FILENAME_POPUP_IMAGE, 'pID='$product_info['products_id'])'\\\')">'tep_image(DIR_WS_IMAGES$product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"')'<br>'TEXT_CLICK_TO_ENLARGE'</a>'; ?>');.

//></script>.

<noscript>.

<?php echo '<a href="'tep_href_link(DIR_WS_IMAGES$product_info['products_image'])'" target="_blank">'tep_image(DIR_WS_IMAGES$product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"')'<br>'TEXT_CLICK_TO_ENLARGE'</a>'; ?>.

</noscript>.

             </td>.

           </tr>.

         </table>.

<?php.

   }.

?>.

         <p><?php echo stripslashes($product_info['products_description']); ?></p>.

<?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.

 //clr 030714 update query to pull option_type.

     $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_type, popt.products_options_length, popt.products_options_comment 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)) {.

   //clr 030714 add case statement to check option type.

       switch ($products_options_name['products_options_type']) {.

         case PRODUCTS_OPTIONS_TYPE_TEXT:.

           //CLR 030714 Add logic for text option.

           $products_attribs_query = tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from "TABLE_PRODUCTS_ATTRIBUTES" patrib where patrib.products_id='"(int)$HTTP_GET_VARS['products_id']"' and patrib.options_id = '"$products_options_name['products_options_id']"'");.

           $products_attribs_array = tep_db_fetch_array($products_attribs_query);.

           $tmp_html = '<input type="text" name ="id['TEXT_PREFIX$products_options_name['products_options_id']']" size="'$products_options_name['products_options_length'] .'" maxlength="'$products_options_name['products_options_length']'" value="'$cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'">  '$products_options_name['products_options_comment'];.

           if ($products_attribs_array['options_values_price'] != '0') {.

             $tmp_html .= '('$products_attribs_array['price_prefix']$currencies->display_price($products_attribs_array['options_values_price'], $product_info_values['products_tax_class_id']) .')';.

           }.

?>.

           <tr>.

             <td class="main"><?php echo $products_options_name['products_options_name']':'; ?></td>.

             <td class="main"><?php echo $tmp_html;  ?></td>.

           </tr>.

<?php.

           break;.

         case PRODUCTS_OPTIONS_TYPE_RADIO:.

           //CLR 030714 Add logic for radio buttons.

           $tmp_html = '<table>';.

           $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 = '"(int)$HTTP_GET_VARS['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"'");.

           $checked = true;.

           while ($products_options_array = tep_db_fetch_array($products_options_query)) {.

             $tmp_html .= '<tr><td class="main">';.

             $tmp_html .= tep_draw_radio_field('id['$products_options_name['products_options_id']']', $products_options_array['products_options_values_id'], $checked);.

             $checked = false;.

             $tmp_html .= $products_options_array['products_options_values_name'];.

             $tmp_html .=$products_options_name['products_options_comment'];.

             if ($products_options_array['options_values_price'] != '0') {.

               $tmp_html .= '('$products_options_array['price_prefix']$currencies->display_price($products_options_array['options_values_price'], $product_info_values['products_tax_class_id']) .')&nbsp';.

             }.

             $tmp_html .= '</tr></td>';.

           }.

           $tmp_html .= '</table>';.

?>.

           <tr>.

             <td class="main"><?php echo $products_options_name['products_options_name']':'; ?></td>.

             <td class="main"><?php echo $tmp_html;  ?></td>.

           </tr>.

<?php.

           break;.

         case PRODUCTS_OPTIONS_TYPE_CHECKBOX:.

           //CLR 030714 Add logic for checkboxes.

           $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix from "TABLE_PRODUCTS_ATTRIBUTES" patrib where patrib.products_id='"(int)$HTTP_GET_VARS['products_id']"' and patrib.options_id = '"$products_options_name['products_options_id']"'");.

           $products_attribs_array = tep_db_fetch_array($products_attribs_query);.

           echo '<tr><td class="productListing-heading" colspan="3"><b>'$products_options_name['products_options_name']':</b></td></tr>.

<tr><td>'"\n";.

           echo tep_draw_checkbox_field('id['$products_options_name['products_options_id']']', $products_attribs_array['options_values_id']);.

           echo $products_options_name['products_options_comment'];.

           if ($products_attribs_array['options_values_price'] != '0') {.

             echo '('$products_attribs_array['price_prefix']$currencies->display_price($products_attribs_array['options_values_price'], $product_info_values['products_tax_class_id']) .')&nbsp';.

           }.

           echo '</td></tr>';.

           break;.

         default:.

           //clr 030714 default is select list.

           //clr 030714 reset selected_attribute variable.

           $selected_attribute = false;.

         $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 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"'");.

         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)$products_options_name['products_options_comment'];  ?></td>.

           </tr>.

<?php.

       }  //clr 030714 end switch.

     } //clr 030714 end while.

?>.

         </table>.

<?php.

   } //clr 030714 end if.

?>.

       </td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

<?php.

   $reviews_query = tep_db_query("select count(*) as count from "TABLE_REVIEWS" where products_id = '"(int)$HTTP_GET_VARS['products_id']"'");.

   $reviews = tep_db_fetch_array($reviews_query);.

   if ($reviews['count'] > 0) {.

?>.

     <tr>.

       <td class="main"><?php echo TEXT_CURRENT_REVIEWS' '$reviews['count']; ?></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

<?php.

   }.

   if (tep_not_null($product_info['products_url'])) {.

?>.

     <tr>.

       <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto='urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

<?php.

   }.

   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {.

?>.

     <tr>.

       <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>.

     </tr>.

<?php.

   } else {.

?>.

     <tr>.

       <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>.

     </tr>.

<?php.

   }.

?>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">.

         <tr class="infoBoxContents">.

           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">.

             <tr>.

               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>.

               <td class="main"><?php echo '<a href="'tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())'">'tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS)'</a>'; ?></td>.

               <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id'])tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>.

               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>.

             </tr>.

           </table></td>.

         </tr>.

       </table></td>.

     </tr>.

     <tr>.

       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

     </tr>.

     <tr>.

       <td>.

<?php.

   if ((USE_CACHE == 'true') && empty($SID)) {.

     echo tep_cache_also_purchased(3600);.

   } else {.

     include(DIR_WS_MODULESFILENAME_ALSO_PURCHASED_PRODUCTS);.

   }.

 }.

?>.

       </td>.

     </tr>.

   </table></form></td>.

<! body_text_eof //>.

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! right_navigation //>.

<?php require(DIR_WS_INCLUDES'column_right.php'); ?>.

<! right_navigation_eof //>.

   </table></td>.

 </tr>.

</table>.

<! body_eof //>.

<! footer //>.

<?php require(DIR_WS_INCLUDES'footer.php'); ?>.

<! footer_eof //>.

<br>.

</body>.

</html>.

<?php require(DIR_WS_INCLUDES'application_bottom.php'); ?>.

This post has been edited by.

Chrisstylez.

: 08 February 2004, 04:58..

Comment #16

Does anyone else think this is possible. lol. ive been tryin for days now...

Comment #17

Well, I'm out of options..

I would have thought that should work - it's only HTML after all..

Anyone got any ideas what else might work?..

Comment #18

Hi, well mine works and here is my product_info code for Radio Buttons:.

Of course it's a shot in the dark, since my cart is heavily modded too and I can't remember exactly which files I modifed apart from this, but I guess it's better than nothing. It would take me hours to try to remember exactly what I did months ago. Try it and see what happens. You can of course disregard some of the cosmetic differences that I included. Good luck!.

         case PRODUCTS_OPTIONS_TYPE_RADIO:.

           //CLR 030714 Add logic for radio buttons.

           $tmp_html = '<table>';.

           $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 = '"(int)$HTTP_GET_VARS['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"'");.

$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from "TABLE_PRODUCTS" where products_id='"tep_get_prid($products_id)"'");.

           $checked = true;.

           while ($products_options_array = tep_db_fetch_array($products_options_query)) {.

             $tmp_html .= '<tr><td class="main">';.

             $tmp_html .= tep_draw_radio_field('id['$products_options_name['products_options_id']']', $products_options_array['products_options_values_id'], $checked);.

             $checked = false;.

             $tmp_html .= $products_options_array['products_options_values_name'];.

             $tmp_html .=$products_options_name['products_options_comment'];.

$specials_query = tep_db_query("select specials_new_products_price from "TABLE_SPECIALS" where products_id = '"(int)$prid"' and status = '1'");.

             if ($new_price != '') {.

$products_display_total =$products_options_array['options_values_price'] * $new_price;.

$tmp_html .= '<font size="2"><b>('$currencies->display_price($products_display_total,tep_get_tax_rate($product_info_values['products_tax_class_id'])) .')&nbsp</b></font>';.

         }.

Else {.

$products_display_total =$products_options_array['options_values_price'] * $product_info['products_price'];.

$tmp_html .= '<b><font size="2">('$currencies->display_price($products_display_total,tep_get_tax_rate($product_info_values['products_tax_class_id'])) .')&nbsp</font></b>';.

             }.

             $tmp_html .= '</tr></td>';.

           }.

           $tmp_html .= '</table>';.

?>.

           <tr>.

             <td class="infoboxheader" colspan="2" valign="top"><hr color="#67888D" size="1"></td>.

           </tr>.

           <tr>.

             <td class="main" valign="top" align="right"><?php echo $products_options_name['products_options_name']':'; ?></td>.

             <td class="main"><?php echo $tmp_html;  ?></td>.

           </tr>.

<?php.

           break;..

Comment #19

Thanx kepa ive been getting real close I think the code you gave me might help alot more, ill let you and anyone who's having the same problem know..

Comment #20

Ok I feel ive made some progress , the code that julieCSM gave me lead me in the right direction, she had it right but just in the wrong place now I'm still left with 2 problems.

The length of the tables.

And the images (minor problem).

This is an example of what ive been able to do so far :.

[ I really need that whole attribute heading to fill the entire width of the product info area..

Comment #21

Have you got a col span and if so, what is it set to? Try increasing it one by one until it fills the page..

The code on the original example was col span = 3..

Comment #22

Yup right now it's set to 3.

Last time I tried it nothing happened, but ill try again...

Comment #23

Didnt work maybe it's something else I have to edit?..

Comment #24

Try setting the table width to 100%..

Edit: Also, set the table border to 1 temporarily so you can actually see on your page where the table and the trs and tds are..

This post has been edited by.

JulieCSM.

: 09 February 2004, 00:34..

Comment #25

From what I can gather this is the part of code that needs to be edited..

<?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="5"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>.

           </tr>.

<?php.

 //clr 030714 update query to pull option_type.

     $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_type, popt.products_options_length, popt.products_options_comment 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)) {.

   //clr 030714 add case statement to check option type.

       switch ($products_options_name['products_options_type']) {.

         case PRODUCTS_OPTIONS_TYPE_TEXT:.

           //CLR 030714 Add logic for text option.

           $products_attribs_query = tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from "TABLE_PRODUCTS_ATTRIBUTES" patrib where patrib.products_id='"(int)$HTTP_GET_VARS['products_id']"' and patrib.options_id = '"$products_options_name['products_options_id']"'");.

           $products_attribs_array = tep_db_fetch_array($products_attribs_query);.

           $tmp_html = '<input type="text" name ="id['TEXT_PREFIX$products_options_name['products_options_id']']" size="'$products_options_name['products_options_length'] .'" maxlength="'$products_options_name['products_options_length']'" value="'$cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'">  '$products_options_name['products_options_comment'];.

           if ($products_attribs_array['options_values_price'] != '0') {.

             $tmp_html .= '('$products_attribs_array['price_prefix']$currencies->display_price($products_attribs_array['options_values_price'], $product_info_values['products_tax_class_id']) .')';.

           }.

?>.

           <tr>.

             <td class="productListing-heading" colspan="5" border="1"><?php echo $products_options_name['products_options_name']':'; ?></td>.

             <tr><td>.

             <td class="main"><?php echo $tmp_html;  ?></td>.

           </tr>.

<?php.

           break;.

         case PRODUCTS_OPTIONS_TYPE_RADIO:.

           //CLR 030714 Add logic for radio buttons.

           $tmp_html = '<table>';.

           $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 = '"(int)$HTTP_GET_VARS['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"'");.

           $checked = true;.

           while ($products_options_array = tep_db_fetch_array($products_options_query)) {.

             $tmp_html .= '<tr><td class="main" colspan="5">';.

             $tmp_html .= tep_draw_radio_field('id['$products_options_name['products_options_id']']', $products_options_array['products_options_values_id'], $checked);.

             $checked = false;.

             $tmp_html .= $products_options_array['products_options_values_name'];.

             $tmp_html .=$products_options_name['products_options_comment'];.

             if ($products_options_array['options_values_price'] != '0') {.

               $tmp_html .= '('$products_options_array['price_prefix']$currencies->display_price($products_options_array['options_values_price'], $product_info_values['products_tax_class_id']) .')&nbsp';.

             }.

             $tmp_html .= '</tr></td>';.

           }.

           $tmp_html .= '</table>';.

?>.

           <tr>.

             <td class="productListing-heading" colspan="5"><?php echo $products_options_name['products_options_name']':'; ?></td>.

             <tr><td>.

             <td class="main"><?php echo $tmp_html;  ?></td>.

           </tr>.

<?php.

           break;.

         case PRODUCTS_OPTIONS_TYPE_CHECKBOX:.

           //CLR 030714 Add logic for checkboxes.

           $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix from "TABLE_PRODUCTS_ATTRIBUTES" patrib where patrib.products_id='"(int)$HTTP_GET_VARS['products_id']"' and patrib.options_id = '"$products_options_name['products_options_id']"'");.

           $products_attribs_array = tep_db_fetch_array($products_attribs_query);.

           echo '<tr><td class="productListing-heading" colspan="5"><b>'$products_options_name['products_options_name']':</b></td></tr>.

<tr><td>'"\n";.

           echo tep_draw_checkbox_field('id['$products_options_name['products_options_id']']', $products_attribs_array['options_values_id']);.

           echo $products_options_name['products_options_comment'];.

           if ($products_attribs_array['options_values_price'] != '0') {.

             echo '('$products_attribs_array['price_prefix']$currencies->display_price($products_attribs_array['options_values_price'], $product_info_values['products_tax_class_id']) .')&nbsp';.

           }.

           echo '</td></tr>';.

           break;.

         default:.

           //clr 030714 default is select list.

           //clr 030714 reset selected_attribute variable.

           $selected_attribute = false;.

         $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 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"'");.

         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="productListing-heading" colspan="5"><?php echo $products_options_name['products_options_name']':'; ?></td>.

             <tr><td>.

             <td class="main"><?php echo tep_draw_pull_down_menu('id['$products_options_name['products_options_id']']', $products_options_array, $selected_attribute)$products_options_name['products_options_comment'];  ?></td>.

           </tr>.

<?php.

       }  //clr 030714 end switch.

     } //clr 030714 end while.

?>.

         </table>.

<?php.

   } //clr 030714 end if.

?>.

       </td>.

     </tr>.

     <tr>..

Comment #26

Come on I know someone's got the answer lol. hmmmmm...

Comment #27

Good morning - sorry I wasn't around but I tend to sleep at nights.

Did you try what I said?.

Seems to me if you can't see where the table is, you can't see what to do..

Also a link might be useful - working in the dark is never much fun...

Comment #28

Did any one try to do the exact same thing with checkboxes?.

Ie. grouping checkboxes together just like radio buttons?.

Something like this :..

Comment #29

From what iv'e seen the checkboxes can be done easily. all you need is that contribution..

Comment #30

Its easy for a single checkbox option but not for a multiple one like in my exemple....

(working on it now)..

Comment #31

I stopped working on it for a while, but now I'm back on it. and I really need some help..

Ive managed to get the tables the way I want them.

With one exception,.

The options dont show up underneath the header, instead they are at the site.

Heres the link to view it..

Comment #32

Someone take my name in vain?.

A quick view source reveals a typo in your code:.

<td class="productListing-heading" colpan="3" width="400">Color:</td>.

Colpan.

Instead of colspan..

Also after that, you have a couple of <tr><td> which don't seem to close and then you open up another td with a table inside it..

Also your table rows containing your radio buttons look like this:.

<td class="main"><table ><tr><td class="main" colspan="3" width="400"><input type="radio" name="id[1]" value="14" CHECKED>black</tr></td>.

<tr><td class="main" colspan="3" width="400"><input type="radio" name="id[1]" value="15">blue</tr></td>.

The correct HTML should look like this, to get the results you need:.

<tr><td class="main" colspan="3" width="400"><input type="radio" name="id[1]" value="16">silver</tr></td>.

If you notice, you close off your tr before you close your td. It should be:.

<tr> <td>content</td></tr>.

This won't be the same as your code in your files obviously, this is just the generated HTML, but it looks like if you sort out your html then you should get your table looking like you want it..

<tr>.

<td class="main" colspan="5">Available Options:</td>.

</tr>.

<tr>.

<td class="productListing-heading" colpan="3" width="400">Color:</td></tr>.

<tr>.

 <td class="main" colspan="3" width="400"><input type="radio" name="id[1]" value="14" CHECKED>black</td></tr>.

<tr><td class="main" colspan="3" width="400"><input type="radio" name="id[1]" value="15">blue</td></tr>.

<tr><td class="main" colspan="3" width="400"><input type="radio" name="id[1]" value="16">silver</td></tr>.

HTH.

This post has been edited by.

JulieCSM.

: 06 March 2004, 20:52..

Comment #33

Im trying to add radio select boxes exactly like the one seen in the following link:.

Product Attrib examples.

I have been trying to figure this out for a long time now. if anyone can help please message or email me..

My email address is :.

Chrisstylez.burke@us.army.mil.

Thanx in advance..

Comment #34

I tried that contrib' but I'm still not getting the results that I want. if anyone knows how to do this please contact me...

Comment #35


This question was taken from a support group/message board and re-posted here so others can learn from it.