Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

special price excludes tax


Guest

Recommended Posts

Hi

 

When I add a product to specials, new price on specials.php excludes tax - how can I set this so that it includes tax as product_info does?

 

Code from specials below

 

<?php echo tep_draw_result_top_1(); ?>		
	<table border="0" width="100%" cellspacing="0" cellpadding="0" class="result box_width_cont">
	  <tr>
		<td><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td>
		<td class="result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
	  </tr>
	</table>
<?php echo tep_draw_result_bottom_1(); ?>		
<?php echo tep_draw_result_top(); ?>

<?php
 }
?>

<?php
$row = 0;
$specials_query = tep_db_query($specials_split->sql_query);

 $row = 0;
 $col = 0;
 $info_box_contents = array();
  while ($specials = tep_db_fetch_array($specials_query)) {
$specials['products_name'] = tep_get_products_name($specials['products_id']);
// ----------	
$product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$specials['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product = tep_db_fetch_array($product_query);
$p_desc = substr($product['products_description'], 0, MAX_DESCR_1);
$p_id = $product['products_id'];

$p_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

$p_name = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' .substr($specials['products_name'],0,MAX_DESCR_NAME) . '</a>';

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

// ----------	
$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => ' style="width:33%;"',
									   'text' => '
<table cellpadding="0" cellspacing="0" border="0" style="width:139px">
	<tr>
		<td style="background:#425054;height:139px;" class="pic">'.$p_pic.'</td>
	</tr>
	<tr>
		<td><img alt="" src="images/spacer.gif" width="1" height="2"></td>
	</tr>
	<tr>
		<td style="height:28px; background:#131E22 " class="vam" align="center">'.$p_name.'</td>
	</tr>
	<tr>
		<td style="height:33px " class="vam" align="center">'.$p_price.'</td>
	</tr>
	<tr>
		<td style="height:53px" align="center">
			<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a><br style="line-height:1px;"><br style="line-height:1px;"><a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a><br>
		</td>
	</tr>
</table>
');

$col ++;
if ($col > 2) {
  $col = 0;
  $row ++;
}
 }

 new contentBox($info_box_contents);

?>

<?php echo tep_draw_result_bottom(); ?>

<?php
 if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>
<?php echo tep_draw_result_top_2(); ?>		
 	<table border="0" cellspacing="0" cellpadding="0" class="result box_width_cont">
	  <tr>
		<td><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td>
		<td class="result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
	  </tr>
	</table>

 

 

Thanks in advance

 

Nick

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...