Guest Posted January 9, 2007 Share Posted January 9, 2007 I asked before, got answers but none of them were what i meant. So i made visual images of what I want. This is what I have This is the one that I want: I will paypal someone $20 to take care of this for me. yea yea, i know its not much, but it may be easy for someone. Here is my options as images file, which i assume that I could just add a quantity box somewhere in the code. <?php /* $Id: options_images.php,v 1.0 2003/08/18 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ $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> <?php echo '<td class="main" colspan="2">' . TEXT_PRODUCT_OPTIONS . ''; ?> <?php if (OPTIONS_IMAGES_CLICK_ENLARGE == 'true') echo '<br>Click the images to enlarge';?> </td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_images_enabled 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, pov.products_options_values_thumbnail, 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'], 'thumbnail' => $products_options['products_options_values_thumbnail']); 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" valign="top"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <?php if ($products_options_name['products_options_images_enabled'] == 'false'){ echo '<td class="main">' . tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . '</td></tr>'; } else { $count=0; echo '<td class="main"><table><tr>'; foreach ($products_options_array as $opti_array){ echo '<td><table cellspacing="1" cellpadding="0" border="0">'; if (OPTIONS_IMAGES_CLICK_ENLARGE == 'true') echo '<tr><td width="971" height="27" align="center" valign="top"><a href="java script:popupWindow(\'' . tep_href_link(FILENAME_OPTIONS_IMAGES_POPUP, 'oID=' . $opti_array['id']) .'\')">' . tep_image(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail'], $opti_array['text'], OPTIONS_IMAGES_WIDTH, OPTIONS_IMAGES_HEIGHT) . '</a></td> <td width="38" rowspan="2" align="center" valign="top"><img src="images/spacer.gif" width="1" height="30"></td> </tr>'; else echo '<tr><td height="22" align="center" valign="top">' . tep_image(DIR_WS_IMAGES . 'options/' . $opti_array['thumbnail'], $opti_array['text'], OPTIONS_IMAGES_WIDTH, OPTIONS_IMAGES_HEIGHT) . '</td> </tr>'; echo '<tr><td align="center" valign="top" class="main">' . $opti_array['text'] . '</td> <td align="center" valign="bottom" class="main"><img src="images/spacer.gif" alt="space" width="1" height="25"></td> </tr>'; echo '<tr><td height="22" align="center" valign="top"><input type="radio" name ="id[' . $products_options_name['products_options_id'] . ']" value="' . $opti_array['id'] . '" checked></td> <td align="center"><img src="images/spacer.gif" alt="space" width="1" height="15"></td> </tr></table></td>'; $count++; if ($count%OPTIONS_IMAGES_NUMBER_PER_ROW == 0) { echo '</tr><tr>'; $count = 0; } } echo '</table>'; } ?> </td></tr> <?php } ?> </table> <br> <?php } ?> Link to comment Share on other sites More sharing options...
supernoc Posted January 9, 2007 Share Posted January 9, 2007 Greetings, I do not know which answers you have received so far.. but just wanted to provide the following link just in case you haven't seen it before. If you have and are just looking for formatting assistance - just ignore me. :D http://www.oscommerce.com/community/contri...tity+attributes Link to comment Share on other sites More sharing options...
Guest Posted January 10, 2007 Share Posted January 10, 2007 Greetings, I do not know which answers you have received so far.. but just wanted to provide the following link just in case you haven't seen it before. If you have and are just looking for formatting assistance - just ignore me. :D http://www.oscommerce.com/community/contri...tity+attributes thanks, i have seen that, unfortunately because i have installed options as images contrib, and already a contrib for a quantity box, none of the intructions for file edits match. also because this is to be done only when there is a thumbnail as a selection, i have to edit the options_as_images.php file not the product info. Now I have figured out how to add the quantity box, buut it doesnt send any attribute info when added to the cart. any help?? Link to comment Share on other sites More sharing options...
Guest Posted January 11, 2007 Share Posted January 11, 2007 thanks, i have seen that, unfortunately because i have installed options as images contrib, and already a contrib for a quantity box, none of the intructions for file edits match. also because this is to be done only when there is a thumbnail as a selection, i have to edit the options_as_images.php file not the product info. Now I have figured out how to add the quantity box, buut it doesnt send any attribute info when added to the cart. any help?? Seriously, bump. anyone? Link to comment Share on other sites More sharing options...
chrisjat Posted January 11, 2007 Share Posted January 11, 2007 scriptlance.com go there and post your project. I posted simular one and I got 3 people willing to do mine for $20 within 5 minutes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.