shu keat Posted June 1, 2009 Posted June 1, 2009 now i can change the drop down list to radio button on custom computer creator. but the problem is, after i select the products, the information cannot be display out and the price of the product also cannot sum up and display out. can anyone pls help me solve this problem. i really need help because i had spent a lot of time on this part. thanks. regard. <_<
steve_s Posted June 1, 2009 Posted June 1, 2009 now i can change the drop down list to radio button on custom computer creator. but the problem is, after i select the products, the information cannot be display out and the price of the product also cannot sum up and display out. can anyone pls help me solve this problem. i really need help because i had spent a lot of time on this part. thanks. regard. <_< Did you move the </form> when you made mods? also a link to your product page would be good
shu keat Posted June 2, 2009 Author Posted June 2, 2009 thanks for ur example, but can u pls give me an example? thanks.
steve_s Posted June 2, 2009 Posted June 2, 2009 thanks for ur example, but can u pls give me an example? thanks. As you can see the </form> is well below any attributes is also heavily modified with addons <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="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" > <tr> <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 { // BOF MaxiDVD: Modified For Ultimate Images Pack! $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, p.products_image_med, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_bundle 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 . "'"); // EOF MaxiDVD: Modified For Ultimate Images Pack! $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 . "'"); count_store_products_viewed((int)$HTTP_GET_VARS['products_id']); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { // BEGIN Discount $specialprice = true; // END Discount $products_price = '<s><span class="main">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s></span> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span></font>'; } 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">['. TEXT_PRODUCT_CODE . ' ' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr> <td> <?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="25%"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="main"> <!-- // BOF MaxiDVD: Modified For Ultimate Images Pack! //--> </td> </tr> </table> <?php } $small_image = $product_info['products_image']; $popup_image = $product_info['products_image_med']; if ($popup_image == '') $popup_image = $small_image; echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $popup_image) . '" target="_blank" rel="lightbox[product]" title=\'' . $product_info['products_name'] . '\'>' . tep_image(DIR_WS_IMAGES . $small_image, $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?> <!-- // EOF MaxiDVD: Modified For Ultimate Images Pack! //--> </td> </tr> </table></td> <td width="35%" align="left"> <?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 width="46" border="0" cellpadding="2" cellspacing="0"> <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 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.attribute_sort"); 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 width="50" class="main"><?php echo ' ' . $products_options_name['products_options_name'] . ':'; ?></td> <td width="17" 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 } ?> </td> <td width="40%"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td> <table border="0" cellspacing="0" cellpadding="0" align="right"> <tr> <td> <?php echo $pre_button; ?> <?php echo $next_button; ?> </td> </tr> </table></td> </tr> <tr valign="top"> <td><font size="2" color="#779d03"><?php echo '<B>' . $products_name . '</b>'; // Display out of stock message if ((STOCK_CHECK == 'true')&&($product_info['products_quantity'] < 1)) { echo '<br><span class="outofStock">' . TEXT_OUT_STOCK . '</span>'; } ?> </font><br> </td> </tr> <tr> <td class="smalltextgray"> <?php echo sprintf(TEXT_DATE_ADDED, tep_date_short($product_info['products_date_added'])); ?></td> </tr> <tr> <td > </td> </tr> <tr> <td class="productPrice"> <?php echo $products_price; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><table width="100%"> <tr><td width="30%"> </td> <td align="right"> <?php if (((STOCK_CHECK == "true")&&($product_info['products_quantity'] > 0)) or (STOCK_ALLOW_CHECKOUT == "true")) { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart1.gif', IMAGE_BUTTON_IN_CART); } else { echo tep_draw_separator('pixel_trans.gif', '1', '22'); } ?> </td> <td class="main" align="right"> <?php ///// SID-KILLER ( ex-change ) //////////////////////////// // Step X ( ADDITIONALLY & OPTIONALLY but has nothin to do with SID-KILLING ... it's just intelligent ... and was in the manual too ...) ) // NEW: $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) { echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; } ///// SID-KILLER ( ex-change ) //////////////////////////// // ORG: // echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ///// SID-KILLER ( ex-change ) eof //////////////////////// ?> </td> <td align="right"> <?php echo '<a target="_blank" href="' . tep_href_link(FILENAME_PRODUCT_PRINT, tep_get_all_get_params()) . '">' . tep_image_button('button_product_print.gif', IMAGE_BUTTON_PRODUCT_PRINT) . '</A>'; ?> </td> </tr></table></td> <tr> <td class="main" > <table width="98%" border="0" align="center" cellpadding="3" cellspacing="2"> <tr> <td class="main"><br> <?php echo '<B>' . HEADER_TITLE_PRODUCTS_DESC . '</B>'; ?></td> </tr> </table> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="2"> <tr> <td class="productDesc"><?php // start Get 1 Free // Display promotional text if this product qualifies for free product(s) $get_1_free_query = tep_db_query("select pd.products_name, g1f.products_free_quantity, g1f.products_qualify_quantity, g1f.products_multiple from " . TABLE_GET_1_FREE . " g1f, " . TABLE_PRODUCTS_DESCRIPTION . " pd where g1f.products_id = '" . (int)$product_info['products_id'] . "' and pd.products_id = g1f. products_free_id and pd.language_id = '" . (int)$languages_id . "' and status = '1'" ); if (tep_db_num_rows($get_1_free_query) > 0) { $free_product = tep_db_fetch_array($get_1_free_query); echo '<p class="productDesc">' . sprintf (TEXT_GET_1_FREE_PROMOTION, $free_product['products_qualify_quantity'], $product_info['products_name'], $free_product['products_free_quantity'], $free_product['products_name'], $free_product['products_multiple']) . '</p>'; } // end Get 1 Free ?> <?php echo stripslashes($product_info['products_description']); ?><br> <!-- BOF Bundled Products--> <?php if (tep_not_null($product_info['products_bundle'])) { ?> <table border="0" width="65%" cellspacing="1" cellpadding="2" class="infoBox"> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="3"> <?php if ($product_info['products_bundle'] == "yes") { $products_bundle = $product_info['products_bundle']; echo TEXT_PRODUCTS_BY_BUNDLE . "</td></tr>"; $bundle_query = tep_db_query(" SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price, p.products_image FROM products p INNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id=pd.products_id INNER JOIN " . TABLE_PRODUCTS_BUNDLES . " pb ON pb.subproduct_id=pd.products_id WHERE pb.bundle_id = " . $HTTP_GET_VARS['products_id'] . " and language_id = '" . (int)$languages_id . "'"); while ($bundle_data = tep_db_fetch_array($bundle_query)) { if ($bundle_data['products_bundle'] == "yes") { // uncomment the following line to display subproduct qty echo "<br>» <b>" . $bundle_data['subproduct_qty'] . " x " . $bundle_data['products_name'] . "</b>"; echo "<br>» <b> " . $bundle_data['products_name'] . "</b>"; $bundle_query_nested = tep_db_query("SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price FROM products p INNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id=pd.products_id INNER JOIN " . TABLE_PRODUCTS_BUNDLES . " pb ON pb.subproduct_id=pd.products_id WHERE pb.bundle_id = " . $bundle_data['products_id'] . " and language_id = '" . (int)$languages_id . "'"); /* $bundle_query_nested = tep_db_query("select pb.subproduct_id, pb.subproduct_qty, p.products_model, p.products_quantity, p.products_bundle, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS_BUNDLES . " pb LEFT JOIN " . TABLE_PRODUCTS . " p ON p.products_id=pb.subproduct_id where pb.bundle_id = '" . $bundle_data['subproduct_id'] . "'"); */ while ($bundle_data_nested = tep_db_fetch_array($bundle_query_nested)) { // uncomment the following line to display subproduct qty echo "<br><i> " . $bundle_data_nested['subproduct_qty'] . " x " . $bundle_data_nested['products_name'] . "</i>"; echo "<br><i> " . $bundle_data_nested['products_name'] . "</i>"; $bundle_sum += $bundle_data_nested['products_price']*$bundle_data_nested['subproduct_qty']; } } else { // uncomment the following line to display subproduct qty echo "<tr><td class=main valign='top'>"; echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $bundle_data['products_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $bundle_data['products_image'], $bundle_data['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '</a>'; echo "</td><td class=main >» <b>" . $bundle_data['subproduct_qty'] . " x " . $bundle_data['products_name'] . '</b> </td><td align = right class=main><b> ' . $currencies->display_price($bundle_data['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . "</b></td></tr>"; // echo "<br>» <b> " . $bundle_data['products_name'] . "</b>"; $bundle_sum += $bundle_data['products_price']*$bundle_data['subproduct_qty']; } } $bundle_saving = $bundle_sum - $product_info['products_price']; $bundle_sum = $currencies->display_price($bundle_sum, tep_get_tax_rate($product_info['products_tax_class_id'])); $bundle_saving = $currencies->display_price($bundle_saving, tep_get_tax_rate($product_info['products_tax_class_id'])); // comment out the following line to hide the "saving" text echo "<tr><td colspan=3 class=main><p><b>" . TEXT_RATE_COSTS . ' ' . $bundle_sum . '</b></td></tr><tr><td class=main colspan=3><font color="red"><b>' . TEXT_IT_SAVE . ' ' . $bundle_saving . '</font></b>'; } ?> </td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table> <?php } ?> <!-- EOF Bundled Products--> <?php // BEGIN Discount if (DISCOUNTPLUS_number > 0 && !$specialprice){ $discountplus_query = tep_db_query("select quantity, value, valuetyp from " . TABLE_DISCOUNTPLUS . " where products_id = '" . $product_info['products_id'] . "' order by quantity "); if (tep_db_num_rows($discountplus_query) > 0) { ?> <?php echo TEXT_DISCOUNTPLUS_DISCOUNTS; ?><br> <table border="0"> <tr> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15'); ?></td> <td class="main" valign="top"><?php echo TEXT_DISCOUNTPLUS_NUMBER;?> </td> <td class="main" align="right" valign="top"> <?php echo TEXT_DISCOUNTPLUS_DISCOUNT;?></td> <td class="main" align="right" valign="top"> <?php echo TEXT_DISCOUNTPLUS_UNITPRICE;?></td> </tr> <?php $s=1; for ($i=0; $i<DISCOUNTPLUS_number; $i++) { $discountplus_data = tep_db_fetch_array($discountplus_query); if ($discountplus_data['quantity'] > 0) { ?> <tr> <td class="main" valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15'); ?></td> <td class="main" valign="top"><?php echo TEXT_DISCOUNTPLUS_FROM." ". $discountplus_data['quantity']?> </td> <td class="main" align="right" valign="top"> <?php if ($discountplus_data['valuetyp'] == "price") $discountplus_rabatt = $currencies->display_price($discountplus_data['value'], tep_get_tax_rate($product_info['products_tax_class_id'])); elseif ($discountplus_data['valuetyp'] == "endprice") $discountplus_rabatt = "->"; else $discountplus_rabatt = ($discountplus_data['value']+0)."%"; echo $discountplus_rabatt; ?> </td> <td class="main" align="right" valign="top"> <b><?php if ($discountplus_data['valuetyp'] == "price") $discountplus_price = $product_info['products_price']-$discountplus_data['value']; elseif ($discountplus_data['valuetyp'] == "endprice") $discountplus_price = $discountplus_data['value']; else $discountplus_price = $product_info['products_price']-(($product_info['products_price']/100)*$discountplus_data['value']); $discountplus_price_output = $currencies->display_price($discountplus_price, tep_get_tax_rate($product_info['products_tax_class_id'])); echo $discountplus_price_output; ?></b></td> </tr> <?php } $s++; } ?> </table> <?php } } // END Discount ?> </td> </tr> </table></td> </tr> <?php // BOF MaxiDVD: Modified For Ultimate Images Pack! if (SHOW_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); } // EOF MaxiDVD: Modified For Ultimate Images Pack! ; ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><table width="100%" border="0" cellspacing="3" cellpadding="3"> <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> </table></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td height="22" align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } ?> <tr> <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <?php // show manfacturer box if (isset($HTTP_GET_VARS['products_id'])) { if (MANUFACTURER_ON == "true"){ include (DIR_WS_BOXES . 'manufacturer_box.php'); } } ?> </td> </tr> </table> </td> </tr> <tr><td> <?php //*** <Cross-Sell Mod> if ( (USE_CACHE == 'true') && !SID) { echo tep_cache_xsell_products(3600); echo '<br>'; //*** </Cross-Sell Mod> echo tep_cache_also_purchased(3600); } else { //*** <Cross-Sell Mod> include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); echo '<br>'; include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); //*** </Cross-Sell Mod> } ?> </td></tr> <?php // Begin recently_viewed if (RECENTLY_VIEWED_BOTTOM_BOX == "True") { include_once (DIR_WS_MODULES . FILENAME_RECENTLY_VIEWED); } // End recently_viewed } ?> </table></td> </tr> </table></td> </tr> </table></form>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.