Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

tep_draw_pull_down_menu


MoisesZaragoza

Recommended Posts

Posted

Hey evey one I'm having a small problem with the

 

tep_draw_pull_down_menu I need to change a value of if but I cant find were it's defin

 

 

This is the table I'm editing

 

   <table border="3" cellspacing="0" cellpadding="2">
			  <tr>
				<td class="main" colspan="2"><?php //echo TEXT_PRODUCT_OPTIONS; ?>
				</td>
			  </tr>
			  <?php

  $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");

  while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
	  if ($InSale)
	$products_options_array[0] = array('id'=>'5', 'text' => "Sale price (Save $$savedprice) $".round($newprice, 2));
	//echo ("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.options_values_id")
	$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.options_values_id");

	$teller=0;
	while ($products_options = tep_db_fetch_array($products_options_query)) {

	$g1 = number_format($webpris, 2);
	$g2 = number_format($autoshippng_mo, 2);
	$g3 = number_format($autoshippng_se, 2);
	$g4 = number_format($autoshippng_qu, 2);

$PriceText = array(0=>'Daily Price', 1=>'Daily Sale Price');
	if ($products_options['products_options_values_name']=="Monthly autoship price") {
	$prisen = number_format($autoshippng_mo, 2);
		}elseif  ($products_options['products_options_values_name']=="Semimonthly autoship price") {
		$prisen = number_format($autoshippng_se, 2);
		}elseif  ($products_options['products_options_values_name']=="Quarterly autoship price") {
		$prisen = number_format($autoshippng_qu, 2);
		}elseif  ($products_options['products_options_values_name']=="Daily Sale Price") {
			$products_options['products_options_values_name'] = $PriceText[intval($InSale)];
			$prisen = number_format($dautoshippng_mo, 2);
		}
	$teller++;
	  if ($rabatt=="23.5%") {
		  if ($InSale)
	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => 'SALE:   (Save '.$currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).') ???$'.$prisen);
	  }else {
	  $productsprice = floatval(substr($products_price, 1, strlen($products_price)-1));		  
	  $products_options_array2[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name'].':   (Save '.number_format(100-$prisen*100/$productsprice, 0).'%) ???$'.$prisen);
	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name'].':   (Save $'.number_format($productsprice-$prisen, 2).') ???$'.$prisen);
	  }
	  if ($products_options['options_values_price'] != '0') {
	  $products_options_array[sizeof($products_options_array)-1]['text'];
	  // . $products_options['price_prefix']
	  }
	}
	echo '<td colspan=2 align=right><font size=1 align="right">';
	if (!$InSale)
	for ($i=intval($InSale)+4;$i<count($products_options_array);$i++)
		echo '<font size=1 face=verdana>'.$products_options_array2[$i]['text'].'</font><br>';

	echo '</font></td>';
	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" colspan="2"><?php echo $products_options_name['products_options_name'] . ':'; ?><br>
				<?php //echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?>
				<?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?>

				</td>
			  </tr>

 

it's on the top of

 

http://www.vitaminsofthemonth.com/product_...a3baa45096b3f92

at the end of the day the code will be good

Posted

no idea what you actually asking mate, but tep_draw_menu is defined in includes/functions/general.php

 

Hope that was what you were asking, and that it helps!

Posted

OK I have a image

dd.jpg

 

This is the problem the second price (the Bi-Monthly) is allways the same as the Monthy, but I cant fibd were to change it

at the end of the day the code will be good

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...