snubbr.com

Can you use an IFrame when the content is protected by an Verisign SSL?

Get a Verisign SSL certificate for 30 days FREE. Click here to use coupon...

Get a free trial of Verisign SSL certificates. Click here for this special deal...
My 1st question is: Can you use an IFrame when the content is protected by an Verisign SSL? Thanks for any answer or 2. Another quick question... My code for Product_Info.php.

<?php.

/*.

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

OsCommerce, Open Source E-Commerce Solutions.

[url="http://www.oscommerce.com"]http://www.oscommerce.com[/url].

Copyright © 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);.

// begin recently_viewed.

// Creates/updates a session variable a string of products IDs separated by commas.

// IDs are in order newest -> oldest.

$recently_viewed_string = '';.

If ($product_check['total'] > 0) { //We don't want to add products that don't exist/are not available.

If (!tep_session_is_registered('recently_viewed')) {.

Tep_session_register('recently_viewed');.

} else {.

$recently_viewed_string = $_SESSION['recently_viewed'];.

}.

// Deal with sessions created by the previous version.

If (substr_count ($recently_viewed_string, ';') > 0) {.

$_SESSION['recently_viewed'] = '';.

$recently_viewed_string = '';.

}.

// We only want a product to display once, so check that the product is not already in the session variable.

$products_id = (int) $_GET['products_id'];.

If ($recently_viewed_string == '') { // No other products.

$recently_viewed_string = (string) $products_id; // So set the variable to the current products ID.

} else {.

$recently_viewed_array = explode (',', $recently_viewed_string);.

If (!in_array ($products_id, $recently_viewed_array) ) {.

$recently_viewed_string = $products_id','$recently_viewed_string; //Add the products ID to the beginning of the variable.

}.

}.

$_SESSION['recently_viewed'] = $recently_viewed_string;.

} //if ($product_check['total'].

// end recently_viewed.

?>.

<!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; ?>">.

<?php.

Require(DIR_WS_INCLUDES'meta_tags.php');.

?>.

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

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

<?php.

If (!isset($lng) || (isset($lng) && !is_object($lng))) {.

Include(DIR_WS_CLASSES'language.php');.

$lng = new language;.

}.

Reset($lng->catalog_languages);.

While (list($key, $value) = each($lng->catalog_languages)) {.

?>.

<link rel="alternate" type="application/rss+xml" title="<?php echo STORE_NAME' - 'BOX_INFORMATION_RSS; ?>" href="<?php echo FILENAME_RSS, '?language='$key; ?>">.

<?php.

}.

?>.

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

<script type="text/javascript" src="lightbox/prototype.js"></script>.

<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>.

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

<script type="text/javascript" src="lightbox/builder.js"></script>.

<script type="text/javascript" src="lightbox/lightbox.js"></script>.

<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=,height=100,screenX=150,screenY=150,top=150,left=.

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="0" cellpadding="0">.

<tr>.

<td class="col_left">.

<! left_navigation //>.

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

<! left_navigation_eof //>.

</td>.

<! body_text //>.

<td width="100%" class="col_center"><?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>.

<? tep_draw_heading_top(); ?>.

<?php echo tep_draw_title_top();?>.

<?php echo TEXT_PRODUCT_NOT_FOUND;?>.

<?php echo tep_draw_title_bottom();?>.

<? tep_draw_heading_top_1(); ?>.

<!.

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

<tr class="infoBoxContents">.

<td>.

>.

<br style="line-height:1px;"><br style="line-height:12px;">.

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

>.

<? tep_draw_heading_bottom_1(); ?>.

<? tep_draw_heading_bottom(); ?>.

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

<? tep_draw_heading_top(); ?>.

<?php echo tep_draw_title_top();?>.

<?php echo $breadcrumb->trail(' &raquo; ')?>.

<?php echo tep_draw_title_bottom();?> .

<? tep_draw_heading_top_1(); ?>.

<? tep_draw_heading_top_2(); ?>.

<?php.

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

?>.

<table cellspacing="0" cellpadding="0" border="0" class="product">.

<tr><td>.

<table cellspacing="0" cellpadding="0" border="0">.

<tr><td height="100%"><img src="/mypix/newyears2009.jpg" align="right">.

<table cellpadding="0" cellspacing="0" border="0" align="left" class="prod_info" style=" margin-right:15px;">.

<tr><td class="pic" align="center"> <br style="line-height:1px;"><br style="line-height:9px;">.

<?php echo tep_draw_prod_top();?>.

<?php echo '<a href="'tep_href_link(DIR_WS_IMAGES$product_info['products_image'])'" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >'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>'; ?>.

<?php echo tep_draw_prod_bottom();?>.

</td></tr>.

<tr><td align="center">.

</td></tr>.

</table>.

<table cellpadding="0" cellspacing="0" border="0" style="width:170px;">.

<tr><td style="vertical-align:middle; height:38px;"><em><?php echo $products_name; ?></em></td></tr>.

</table>.

<div class="padd3"><?php echo stripslashes($product_info['products_description']); ?><p><font face="Verdana" size="1"><b>This item may take 5 to 10 business days to ship from the warehouse. If you would like to inquire about other shipping methods contact us. Some items can take up to two weeks to ship.</b></font><p><br>.

<font size="2"><b>Our Price:</b></font><br><br style="line-height:11px"><span class="productSpecialPrice"><?=$products_price?></span></div>.

<input type="text" name="quantity" value="1" maxlength="2" size="2"><br><font face="Verdana" size="1"><b>QTY.</b>.

<p><img src="/mypix/cave_man_100.jpg" align="right"><p>.

<br><?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>'; ?><?php echo tep_draw_separator('spacer.gif', '15', '1'); ?><?php echo tep_draw_hidden_field('products_id', $product_info['products_id'])tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?>.

<p><br><p>.

<! AddThis Button BEGIN >.

<script type="text/javascript">var addthis_pub = "lowkey704";</script>.

<a href="https://secure.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="https://secure.addthis.com/static/btn/lg-addthis-en.gif" width="125" height="16" border="0" alt="" /></a><script type="text/javascript" src="https://secure.addthis.com/js/152/addthis_widget.js"></script>.

<! AddThis Button END >.

<br> .

</td></tr>.

</table>.

</td>.

</tr>.

</table>.

<?php.

}.

?>.

<? tep_draw_heading_bottom_2(); ?> .

<table cellspacing="0" cellpadding="0" border="0" align="center" style="margin:15px 0px 15px 0px; height:1px;">.

<tr><td class="bg_gg_1"><?php echo tep_draw_separator('spacer.gif', '1', '1');?></td></tr>.

</table>.

<? tep_draw_heading_top_2();?>.

<?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 cellpadding="0" cellspacing="0" class="box_width_cont product">.

<tr><td height="25" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></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"'");.

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

<tr><td height="10" colspan="2"></td></tr>.

<?php.

}.

?>.

<! denuz products text attributes >.

<tr>.

<td>.

<?php.

$text_attributes_query = tep_db_query("select pta.* from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = "tep_get_prid($HTTP_GET_VARS['products_id']));.

While ($text_attributes = tep_db_fetch_array($text_attributes_query)) {.

?>.

<tr>.

<td class=main><?php echo $text_attributes['products_text_attributes_name']': </td><td>'tep_draw_input_field('products_text_attributes_'$text_attributes['products_text_attributes_id'], ''); ?></td>.

</tr>.

<?php.

}.

?>.

</table></td>.

</tr>.

<! eof denuz products text attributes >.

</td>.

</tr>.

</table>.

<?php.

}.

?>.

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

?>.

<table cellpadding="0" cellspacing="0" class="product box_width_cont">.

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

<tr><td height="17"></td></tr>.

</table>.

<?php.

}.

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

?>.

<table cellpadding="0" cellspacing="0" class="product box_width_cont">.

<tr><td class="line_h"><?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 height="15"></td></tr>.

</table>.

<?php.

}.

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

?>.

<table cellpadding="0" cellspacing="0" class="product box_width_cont">.

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

<tr><td height="15"></td></tr>.

</table>.

<?php.

} else {.

?>.

<table cellpadding="0" cellspacing="0" class="product box_width_cont">.

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

</table>.

<?php.

}.

?>.

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

<tr>.

<td align="center"><?php include(DIR_WS_MODULES'additional_images.php'); ?></td>.

</tr>.

</table>.

<!.

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

<tr class="infoBoxContents"><td>.

>.

<table border="0" width="100%" cellspacing="0" cellpadding="0" class="product box_width_cont">.

<tr>.

<td class="main bg_input"></td>.

</tr>.

</table><br style="line-height:1px;"><br style="line-height:10px;"> .

<!.

</td></tr>.

</table>.

>.

<? tep_draw_heading_bottom_2();?>.

<? tep_draw_heading_bottom_1(); ?>.

<?php tep_draw_heading_bottom();?> .

<tr>.

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

</tr>.

<?php include(DIR_WS_MODULESFILENAME_RELATED_PRODUCTS); ?>.

<tr>.

<td>.

<?php.

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

Echo tep_cache_also_purchased(3600);.

} else {.

Include(DIR_WS_MODULESFILENAME_ALSO_PURCHASED_PRODUCTS);.

}.

}.

?>.

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

<! body_text_eof //>.

<td class="col_right">.

<! right_navigation //>.

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

<! right_navigation_eof //>.

</td>.

</tr>.

</table>.

<! body_eof //>.

<! footer //>.

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

<! footer_eof //></body>.

</html>.

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

The code provided in the set of files:.

<?php.

/*.

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

OsCommerce, Open Source E-Commerce Solutions.

[url="http://www.oscommerce.com"]http://www.oscommerce.com[/url].

Copyright © 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', '563', '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="java script: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>.

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

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

?>.

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

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.

}.

}.

?>.

<! denuz products text attributes >.

<tr>.

<td>.

<?php.

$text_attributes_query = tep_db_query("select pta.* from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = "tep_get_prid($HTTP_GET_VARS['products_id']));.

While ($text_attributes = tep_db_fetch_array($text_attributes_query)) {.

?>.

<tr>.

<td class=main><?php echo $text_attributes['products_text_attributes_name']': </td><td>'tep_draw_input_field('products_text_attributes_'$text_attributes['products_text_attributes_id'], ''); ?></td>.

</tr>.

<?php.

}.

?>.

</table></td>.

</tr>.

<! eof denuz products text attributes >.

</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><?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'); ?>.

Can someone tell me what it is in my original page that is keeping the text box hidden? If I add an attribute then the box will appear. If there is not an attribute already on that page the box will not show up. I pasted the code provided and it appeared. But that code looks horrible so I can't use it. I am not educated enough to know what to take out and what to leave in. So, I need a little help if you have a minute..

Thank you so much.

Lonny..

Comments (9)

You betcha! although you might wanna make sure and wait for another member here to confirm this as I am not quite sure. Better yet, why don't you email the Verisign guys because they can help better...

Comment #1

The Imprint Text Box. It's showing in my admin. I created a text box called choose your color. I applied it to the page that I have linked. The top code box has my code for my product_info.php page the bottom code box is the code that came with the files I download (imprint text).

Everything works... but only if I have an attribute active on the page does the box show up. So, no attribute no box..

I copied and pasted the code from the files I downloaded and saved - the box shows up..

I have taken multiple things off my code to see what's making the box hide... I can't come up with the answer. My product_info page (code) seems to be newer or different than the code that's provided in the files. I am not a guru so I am feeling like a fish out of water.... I am sure it's something simple but since I have tried a few things and had no luck I thought I would ask for a little help...

Comment #2

Those files are very different it will take a bit of reviewing to sort them!..

Comment #3

Thank you so much. That's all I was trying to say is that it works with their coding but not with mine. I do truely appreciate your time...

Comment #4

Anybody? I would really like to have this contrib work... I tried the Option Type and it just won't work - I know this one will atleast work. I just have to figure out the differences in the coding...

Comment #5

Hey I will pay somebody if they can show me this work in my coding.....

Comment #6

I keep trying different things... moving the code to different areas - had luck but my bottom (footer) went out of wack....

Still willing to pay...

Comment #7

I'm using text imprint & I don't recall having an issue with the text box showing up. Our product_info pages are so different I'm not sure where the the problem with code for text imprint might be but here's my page, since the denuz code is marked maybe that will help???.

<?php.

/*.

$Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $.

OsCommerce, Open Source E-Commerce Solutions.

[url="http://www.oscommerce.com"]http://www.oscommerce.com[/url].

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

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

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

// SQL_BIG_SELECTS = 1 - added to solve 1104 MYSQL error message.

Tep_db_query("set sql_big_selects=1");.

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

<?php.

/*** Begin Header Tags SEO ***/.

If ( file_exists(DIR_WS_INCLUDES'header_tags.php') ) {.

Require(DIR_WS_INCLUDES'header_tags.php');.

} else {.

?>.

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

<?php.

}.

/*** End Header Tags SEO ***/.

?>.

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

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

<! Light Box J Query Add on BOF >.

<link rel="stylesheet" href="lightbox/prettyPhoto.css" type="text/css" title="prettyPhoto main stylesheet" charset="utf-8" />.

<script src="lightbox/jquery-1.2.3.pack.js" type="text/javascript" charset="utf-8"></script>.

<script src="lightbox/prettyPhoto.js" type="text/javascript" charset="utf-8"></script>.

<! Light Box J Quesry Add on EOF >.

</head>.

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

<?php /*** Begin Header Tags SEO ***/ ?>.

<a name="<?php echo $header_tags_array['title']; ?>"></a>.

<?php /*** End Header Tags SEO ***/ ?>.

<! 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_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">.

<! left_navigation //>.

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

<! left_navigation_eof //>.

</table></td>.

<! body_text //>.

<! CHANGED CODE FOR ATTRIBUTES QUANTITY BOX //>.

<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_mult')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">.

<! ATTRIBUTES QUANTITY BOX_eof //> .

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

// Light Box J Query with ultra Pics 2.08 Add on BOF.

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.minorder, p.products_image, p.products_image_med, p.products_image_lrg, 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_discount, 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"'");.

// Light Box J Query with ultra Pics 2.08 Add on EOF.

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

}.

//DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED.

If(tep_session_is_registered('wishlist_id')) { ?> <tr> <td class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td> </tr> <?php tep_session_unregister('wishlist_id'); }.

//Minimum quantity code.

If (tep_not_null($product_info['minorder']) && MINIMUM_ORDERS == 'true') {.

$products_name .= '<br></span>';.

}.

//End: Minimum quantity code.

?>.

<tr>.

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

<tr>.

<?php /*** Begin Header Tags SEO NOTE: In any page in which you make the change to the title for Header Tags, you should also locate the line containing HEADING_TITLE, remove the pageHeading class and add the h1 tags as above.***/.

?>.

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

<td align="right" valign="top"><h1>.

<?php.

If ($product_info['products_price'] < 0.01){.

} else {.

Echo $products_price;.

}.

?>.

</h1></td>.

<?php /*** End Header Tags SEO ***/ ?>.

</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" span class="h1">.

<! Light Box J Query with ultra Pics 2.08 Add on BOF >.

<?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="prettyOverlay[gallery]" title="'$product_info['products_name']'">'tep_image(DIR_WS_IMAGES$small_image, $product_info['products_name'], '250', '', 'hspace="1" vspace="1" class="fotgal"')'<br/>'tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE)'</a>';.

?>.

<! Light Box J Query with ultra Pics 2.08 Add on BOF >.

</td>.

</tr>.

</table>.

<?php.

}.

?>.

<br>.

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

<p><br><span class="medText"><?php echo '<b><a href="'tep_href_link(FILENAME_CONTACT_US, 'products_name='.

$product_info['products_name']'&products_model='.

$product_info['products_model'])'">'TEXT_ASK_A_QUESTION'</a></b>';?>.

<br><br><br>.

<?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" width="50%" cellspacing="0" cellpadding="2">.

<tr>.

<td class="productListing-heading" align="left"><?php echo TEXT_PRODUCT_OPTION; ?></td>.

<td class="productListing-heading" align="left"><?php /* uncomment if you want to show the model number echo TEXT_PRODUCT_MODEL; */ ?></td>.

<td class="productListing-heading" align="center"><?php echo TEXT_PRODUCT_PRICE; ?></td>.

<td class="productListing-heading" align="right"><?php echo TEXT_PRODUCT_QUANTITY; ?></td>.

</tr>.

<?php.

$X=0;.

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

// BOF Linkmatics attributes sets plus.

$products_options_query = tep_db_query("SELECT pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix , pase.sort_order FROM "TABLE_PRODUCTS_ATTRIBUTES" pa, ".

TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS" pas2pa, ".

TABLE_PRODUCTS_ATTRIBUTES_SETS" pas, " ..

TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS" pase, " ..

TABLE_PRODUCTS_OPTIONS_VALUES" pov.

WHERE pa.products_id = '"(int)$_GET['products_id']"'.

AND pa.options_id = '"$products_options_name['products_options_id']"'.

AND pas2pa.products_id = pa.products_id.

AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id.

AND pas.products_options_id = pa.options_id.

AND pase.products_attributes_sets_id = pas.products_attributes_sets_id.

AND pase.options_values_id = pa.options_values_id.

AND pov.products_options_values_id = pa.options_values_id.

AND pov.language_id = '"$languages_id"'.

ORDER BY pase.sort_order, pa.options_values_id");.

// >>>>> BOF Linkmatics attributes sets plus patch v1.01.

If (tep_db_num_rows($products_options_query)== 0 ) {.

$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.options_values_id.

FROM "TABLE_PRODUCTS_ATTRIBUTES" pa, " ..

TABLE_PRODUCTS_OPTIONS_VALUES" pov.

WHERE pa.products_id = '"(int)$_GET['products_id']"'.

AND pa.options_id = '"$products_options_name['products_options_id']"'.

AND pov.products_options_values_id = pa.options_values_id.

AND pov.language_id = '"$languages_id"'.

ORDER BY pa.options_values_id");.

}.

// <<<<< EOF Linkmatics attributes sets plus patch v1.01.

// EOF Linkmatics attributes sets plus .

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 ($products_options['price_prefix'] == '+') {.

$price_with_attribute = ($product_info['products_price'] + $products_options['options_values_price']);.

} else {.

$price_with_attribute = ($product_info['products_price'] - $products_options['options_values_price']);.

}.

?>.

<tr>.

<td class="infoBoxNotice" align="left"><b>.

<?php echo $products_options['products_options_values_name'];.

Echo tep_draw_hidden_field('a[]', $products_options['products_options_values_id']);.

Echo tep_draw_hidden_field('b[]',$products_options_name['products_options_id']); ?></b> </td>.

<td class="infoBoxNotice" align="left">.

<?php /* uncomment if you want to show the model number.

Echo $product_info['products_model']; */.

?>.

</td>.

<td class="infoBoxNotice" align="center"><b><?php echo $currencies->display_price($price_with_attribute, tep_get_tax_rate($product_info['products_tax_class_id'])); ?></b></td>.

<td class="infoBoxNotice" align="right"><b><?php echo tep_draw_input_field('quantity[]',$value = '0',"size=4");?></b></td>.

</tr>.

<?php.

$x++;.

}.

}.

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

}.

?>.

</table></td>.

</tr>.

<?php.

}.

}.

// <! denuz products text attributes >.

?>.

<tr>.

<td>.

<?php.

$text_attributes_query = tep_db_query("select pta.* from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = "tep_get_prid($HTTP_GET_VARS['products_id']));.

While ($text_attributes = tep_db_fetch_array($text_attributes_query)) {.

?>.

<table border="0" width="50%" cellspacing="0" cellpadding="2" background="#D0C6A9">.

<tr>.

<td class="productListing-heading" align="left"><?php echo $text_attributes['products_text_attributes_name']': </td>.

<td class="productListing-heading" align="center"></td><td class="productListing-heading" align="right">'tep_draw_input_field('products_text_attributes_'$text_attributes['products_text_attributes_id'], ''); ?></td>.

</tr></table>.

<?php.

}.

?>.

<?php.

// <! eof denuz products text attributes >.

?>.

</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_discount'])) {.

If( isset($product_info['products_discount']) && strlen($product_info['products_discount'])>2 ) {.

$first = true;.

$last = false;.

$tab_aff = array();.

$tab_percent = array();.

Echo '<tr><td><table><tr><td>';.

$info_box_contents = array();.

$info_box_contents[] = array('text' => '<span class="productSpecialPrice">'TEXT_HEAD_REDUC_QTY'</span>' );.

If( $tranche = explode( ',', $product_info['products_discount'] ) ) {.

$index = 0;.

Foreach( $tranche as $cle => $trn ).

If( $qty_px = explode( ':', $trn ) ) {.

$tab_aff[$index][0] = $qty_px[0];.

$tab_aff[$index][1] = $qty_px[1];.

$tab_percent[$index]['discount'] = 1;.

$tab_percent[$index]['percent'] = '';.

If( strstr($qty_px[1],'%') ) {.

$tab_percent[$index]['discount'] = (1-($qty_px[1]/100));.

$tab_percent[$index]['percent'] = '%';.

}.

$index++;.

}.

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

For( $i=0; $i<$index; $i++) {.

If( $tab_percent[$i]['percent'] != '%' ) {.

If( $new_price > $tab_aff[$i][1] || $new_price==0 ) $products_price = $currencies->display_price($tab_aff[$i][1], tep_get_tax_rate($product_info['products_tax_class_id']));.

Else $products_price = '<s>'$currencies->display_price($tab_aff[$i][1], 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 {.

If( $new_price > ($product_info['products_price']*$tab_percent[$i]['discount']) || $new_price==0 ) $products_price = '-'$tab_aff[$i][1];.

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

}.

If( $i==0 ) {.

If ( $new_price ) $products_price_1 = '<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_1 = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));.

$info_box_contents[] = array('align' => 'center', 'text' => sprintf( TEXT_QTY_PRIX_FIRST, $tab_aff[$i][0]-1 )'</td><td class="boxText">'$products_price_1 );.

If( isset($tab_aff[$i+1][0]) ) $info_box_contents[] = array('align' => 'center', 'text' => sprintf( TEXT_QTY_PRIX, $tab_aff[$i][0], $tab_aff[$i+1][0]-1 )'</td><td class="boxText">'$products_price );.

Else $info_box_contents[] = array('align' => 'center', 'text' => sprintf( TEXT_QTY_PRIX_LAST, $tab_aff[$i][0] )'</td><td class="boxText">'$products_price );.

}.

Elseif ( $i == ($index-1) ) $info_box_contents[] = array('align' => 'center', 'text' => sprintf( TEXT_QTY_PRIX_LAST, $tab_aff[$i][0] )'</td><td class="boxText">'$products_price );.

Else $info_box_contents[] = array('align' => 'center', 'text' => sprintf( TEXT_QTY_PRIX, $tab_aff[$i][0], $tab_aff[$i+1][0]-1 )'</td><td class="boxText">'$products_price );.

}.

}.

New infoBox($info_box_contents);.

Echo '</td></tr></table></td></tr>';.

}.

?>.

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

<?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 align="left"><table border="0" width="100%" cellspacing="1" cellpadding="5" class="infoBoxbuynow">.

<tr class="infoBoxbuynowContents">.

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

<tr>.

<?php.

If ($products_attributes['total'] < 1) {.

?>.

<td class="main" align="left"><B>ENTER QUANTITY</B>&nbsp;&nbsp;&nbsp;&nbsp;.

<?php echo tep_draw_input_field('cart_quantity','1','size="3"'); ?></td><?php.

}.

?></tr><td class="main" align="left" width="60%"><?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 class="main" align="left"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id'])tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td>.

<td width="10">&nbsp;&nbsp;&nbsp;&nbsp;</td>.

</tr>.

</table></td>.

</tr>.

</table></td>.

</tr>.

<tr>.

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

</tr> .

<?php.

// BOF MaxiDVD: Modified For Ultimate Images Pack!.

If (ULTIMATE_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>.

<! BEGIN Header Tags SEO Social Bookmarks >.

<?php if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true').

Include(DIR_WS_MODULES'header_tags_social_bookmarks.php');.

?>.

<! END Header Tags SEO Social Bookmarks >.

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

</tr>.

<?php include(DIR_WS_MODULESFILENAME_RELATED_PRODUCTS); ?>.

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

<?php /*** Begin Header Tags SEO NOTE: The placement of this is not critical. Anywhere neat the bottom of the page is fine. You can also change or remove the TEXT_VIEWING text to fit your site.***/.

?>.

<tr>.

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

</tr>.

<tr>.

<td class="smallText" align="center"><?php echo TEXT_VIEWING; ?>&nbsp;.

<?php echo '<a title="'$header_tags_array['title']'" href="'tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$product_info['products_id'], 'NONSSL')'"/# '$header_tags_array['title']'">'$header_tags_array['title']; ?></a></td>.

</tr>.

<?php /*** End Header Tags SEO ***/.

?>.

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

<! body_text_eof //>.

<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" 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 //>.

</body>.

</html>.

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

Comment #8

Thank You charinlasvegas,.

But that didn't work... I don't know why I am having this issue but it's busting my brain into pieces... I tried to copy and paste your code at the start and end points of the text box but it's still hidden.....

Comment #9

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

<tr><td height="10" colspan="2"></td></tr>.

<?php.

}.

?>.

<! denuz products text attributes >.

<tr>.

<td>.

<?php.

$text_attributes_query = tep_db_query("select pta.* from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = "tep_get_prid($HTTP_GET_VARS['products_id']));.

While ($text_attributes = tep_db_fetch_array($text_attributes_query)) {.

?>.

<tr>.

<td class="main"><?php echo $text_attributes['products_text_attributes_name']': </td><td>'tep_draw_input_field('products_text_attributes_'$text_attributes['products_text_attributes_id'], ''); ?></td>.

</tr>.

<?php.

}.

?>.

</td>.

</tr>.

<! eof denuz products text attributes >.

</td>.

</tr>.

</table>.

<?php.

}.

?>.

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

?>.

<table cellpadding="0" cellspacing="0" class="product box_width_cont">.

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

<tr><td height="17"></td></tr>.

</table>.

<?php.

}.

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

WHY ME!!!! LOL Can anyone see why this isn't working... I have to have an attribute active in order for the box to show.... anyone know why?..

Comment #10


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

 

Categories: Home | Diet & Weight Management | Vitamins & Supplements | Herbs & Cleansing |

Sexual Health | Medifast Support | Nutrisystem Support | Medifast Questions |

Web Hosting | Web Hosts | Website Hosting | Hosting |

Web Hosting | GoDaddy | Digital Cameras | Best WebHosts |

Web Hosting FAQ | Web Hosts FAQ | Hosting FAQ | Hosting Group |

Hosting Questions | Camera Tips | Best Cameras To Buy | Best Cameras This Year |

Camera Q-A | Digital Cameras Q-A | Camera Forum | Nov 2010 - Cameras |

Oct 2010 - Cameras | Oct 2010 - DSLRs | Oct 2010 - Camera Tips | Sep 2010 - Cameras |

Sep 2010 - DSLRS | Sep 2010 - Camera Tips | Aug 2010 - Cameras | Aug 2010 - DSLR Tips |

Aug 2010 - Camera Tips | July 2010 - Cameras | July 2010 - Nikon Cameras | July 2010 - Canon Cameras |

July 2010 - Pentax Cameras | Medifast Recipes | Medifast Recipes Tips | Medifast Recipes Strategies |

Medifast Recipes Experiences | Medifast Recipes Group | Medifast Recipes Forum | Medifast Support Strategies |

Medifast Support Experiences |

 

(C) Copyright 2010 All rights reserved.