Jump to content
hozone

[contribution] Total B2B

Recommended Posts

I have istalled TotalB2B and it works...but in the admin you can change:

 

Number Of Prices Per Products (Ok, This works No proplem)

Allow Guest To See Prices (Nothing happend)

Guest Discount (Nothing happend)

Special price (products price hiding) (Nothing happend)

 

The question is, when I change something nothing happend?

 

I suppose that "Allow Guest To See Prices" that it is not neccesary to log in to see the "basic prices" and that is exactly what I want.


A friendship founded on business is better than a business founded on friendship

Share this post


Link to post
Share on other sites

I also get the error:

Warning: Missing argument 3 for display_price() in /var/www/html/catalog/includes/classes/currencies.php on line 72

 

BUT, this does not occur on every page, just in certain categories. Is there a reason for this?


Need Hosting? Just ask!

Share this post


Link to post
Share on other sites

hozone, thanks for your replies.

 

If it was clear on this thread what the solution was, then there would not be so many questions about it.

 

It appears that I have to add,

$product_info['products_id']

but in what file or files do I need to do this in?


Need Hosting? Just ask!

Share this post


Link to post
Share on other sites

When I swith between false or true

 

Allow Guest To See Prices

 

Nothing happend, and want to allow guest to see prices! Maybe I can changed it hard coded no problem if someone point me in the right direction (read the whole topic, no info about his point)

Edited by John2b

A friendship founded on business is better than a business founded on friendship

Share this post


Link to post
Share on other sites

are there specific, clearly identified steps to resolve the currencies.php errors, cause I don't understand the resolutions posted throughout the forum?


Need Hosting? Just ask!

Share this post


Link to post
Share on other sites

Well same here i am afraid. I tried some solutions but well one or the other screws up something else i see.

ALL has to do with the display of the prices... so if someone could please make a sticky-READ ME FIRST DUMMY post on how to solve this i would be happy to answer 100 questions coming after that and politely point the users to the right solution!

Share this post


Link to post
Share on other sites
Well same here i am afraid. I tried some solutions but well one or the other screws up something else i see.

ALL has to do with the display of the prices... so if someone could please make a sticky-READ ME FIRST DUMMY post on how to solve this i would be happy to answer 100 questions coming after that and politely point the users to the right solution!

 

 

Well i found step1..... http://forums.oscommerce.com/index.php?sho...t%20error&st=20 somewhere below////

 

i have no idea why ooooooooooh why i did not see it before :( pfffffff

 

It solves my problem in product_listing but not in product_info .... there the price displayed stays my tax rate...... AND i get the currencies error again.... SO! somewhere there must be more lines of solutions??

 

As you can see in the link: i was looking for another fix having a javscript error in admin/categories : the price with tax is not updated automatically with the javascript provided....somehow..

 

pff now i cannot Edit my own posts?????

 

in product_info.php there are 2 lines that need to be replaced with the lines provided in the link/post i mentioned....

NOW i seem to only have too fix the problem=price=showing my tax rate + tax!.....

Edited by nathanwheeler

Share this post


Link to post
Share on other sites

Really i hate to be sounding like a child but here it goes ...

 

Problem with displaying the correct price ( instead of 0,0 EUR or a TAX rate where the TAX was added to)

i got problem solved on most pages except 2 ..

- shopping cart: on the right column totalprice is correct, the subtotal is correct.

BUT: there is no number in the Qty. box and the price next to it is still my taxt rate*my tax rate

 

- same is in checkout_confirmation.php: totals, subtotals and tax rate and the tax itself are correct except the productprice above...

 

- something else but as i see it caused by the TotalB2B module is that there is a javascript error in the backend when i want to add/edit a product. Normally in osc when you put in net price the bruto price is calculated... that is not working anymore.. somehow...

 

I have no other modules installed except the HTC, headertagscontrol and a SEF implementation but i do not see them interfere with the TotalB2b1.d contribution.

 

Any help would be really really appreciated!!!

Share this post


Link to post
Share on other sites
hozone, thanks for your replies.

 

If it was clear on this thread what the solution was, then there would not be so many questions about it.

 

It appears that I have to add,

$product_info['products_id']

but in what file or files do I need to do this in?

 

 

it's not $product_info['products_id'] for ALL files, maibe the query result should be contained in variables with other names... $special['products_id'], etc...

 

 

 

When I swith between false or true

 

Allow Guest To See Prices

 

Nothing happend, and want to allow guest to see prices! Maybe I can changed it hard coded no problem if someone point me in the right direction (read the whole topic, no info about his point)

 

hi,

i suppose tehere is an error in your code changing, cause i'm shure the contribution works in this point.

check code in classes/currencties and classes/shopping_chart.php

 

 

 

Really i hate to be sounding like a child but here it goes ...

 

Problem with displaying the correct price ( instead of 0,0 EUR or a TAX rate where the TAX was added to)

i got problem solved on most pages except 2 ..

- shopping cart: on the right column totalprice is correct, the subtotal is correct.

BUT: there is no number in the Qty. box and the price next to it is still my taxt rate*my tax rate

 

- same is in checkout_confirmation.php: totals, subtotals and tax rate and the tax itself are correct except the productprice above...

 

- something else but as i see it caused by the TotalB2B module is that there is a javascript error in the backend when i want to add/edit a product. Normally in osc when you put in net price the bruto price is calculated... that is not working anymore.. somehow...

 

I have no other modules installed except the HTC, headertagscontrol and a SEF implementation but i do not see them interfere with the TotalB2b1.d contribution.

 

Any help would be really really appreciated!!!

 

try checink code in classes/currencies and classes/shopping_cahrt.php

 

regards,

hOZONE


osCommerce Italia support: http://www.oscommerceitalia.com

Share this post


Link to post
Share on other sites
it's not $product_info['products_id'] for ALL files, maibe the query result should be contained in variables with other names... $special['products_id'], etc...

 

I don't understand this?

 

I can search for some products on my site and get no error, but when I search for other products I do get an error. Does this mean I need to fix advanced_searh_results.php?

 

Why would it happen to some but not all?

 

Examples

NO SEARCH ERROR

 

 

ERROR ON SEARCH


Need Hosting? Just ask!

Share this post


Link to post
Share on other sites

this is one of the the best modules.. sweet, well documented, easy to install and easy to play with.

 

thanks a lot

Share this post


Link to post
Share on other sites

any thought on why I am getting this and what I need to do to resolve it? If the answer is to change something, then I need to know what the "SOMETHING" is.


Need Hosting? Just ask!

Share this post


Link to post
Share on other sites
any thought on why I am getting this and what I need to do to resolve it? If the answer is to change something, then I need to know what the "SOMETHING" is.

 

Matt,

 

The error depends on what is being queried through the advanced search which in the end calls your (catalog)/includes/modules/product_listing.php.

The bottom line is you have to make sure that all calls to the display_price function in any page you use have to be altered.

So for your (catalog)/includes/modules/product_listing.php you open it in your editor and search for display_price. The problem is that the installation directions for TotalB2B does not show all changes to be made so you can miss one or two places. For the product_listing.php take this part:

			  if ($query_special_prices_hide_result['configuration_value'] == 'true') {
			$lc_text = '  <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		  } else {
			$lc_text = '<s>' .  $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <br><span class="productSpecialPrice">' . $currencies->display_price_nodiscount($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		  }
		//TotalB2B end
		} else {
		  $lc_text = ' ' . $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
		}
		break;

The "//TotalB2B end" shows before the " } else { " but should have been behind the else branch as there is another display_price call in there which should be changed but isn't if you follow the installation to the letter.

As you see you should change

			  $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

to

			  $lc_text = ' ' . $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

 

So whenever you see the error telling you that you miss the third parameter you know you have a display_price used somewhere which isn't updated yet to be used with TotalB2B.

 

HTH

Howard

Share this post


Link to post
Share on other sites

Hi,

 

I'm still getting the error:

 

Warning: Missing argument 3 for display_price() in /home/httpd/vhosts/vermoolen.com/httpdocs/catalog/includes/classes/currencies.php on line 72

 

I searched this B2B thread several times but I still stuck with the problem :( I tried some answers from other members (Jogoto etc...) But I still can't fix it.

I tried to install B2B on a clean OSC, but still the same error. Now I'm using Simple Template System, has this mod something to do with. If so, I can post the code here if necessary.

 

Thanks in advance

Share this post


Link to post
Share on other sites
Hi,

 

I'm still getting the error:

 

Warning: Missing argument 3 for display_price() in /home/httpd/vhosts/vermoolen.com/httpdocs/catalog/includes/classes/currencies.php on line 72

 

I searched this B2B thread several times but I still stuck with the problem :( I tried some answers from other members (Jogoto etc...) But I still can't fix it.

I tried to install B2B on a clean OSC, but still the same error. Now I'm using Simple Template System, has this mod something to do with. If so, I can post the code here if necessary.

 

Thanks in advance

 

I have struggled with that one too for a while.... and got it fixed with the codes provided in this thread except in products_new.php so i skipp that page in this oscommerce implementation...

 

You get this error on "all" pages?

 

You can send me one of the pages private and i can have a look.....

(( note: it has nothing to do with your currencies.php , the changes are in all the other files that use the display price. ))

Share this post


Link to post
Share on other sites
Hi,

 

I'm still getting the error:

 

Warning: Missing argument 3 for display_price() in /home/httpd/vhosts/vermoolen.com/httpdocs/catalog/includes/classes/currencies.php on line 72

 

I searched this B2B thread several times but I still stuck with the problem :( I tried some answers from other members (Jogoto etc...) But I still can't fix it.

I tried to install B2B on a clean OSC, but still the same error. Now I'm using Simple Template System, has this mod something to do with. If so, I can post the code here if necessary.

 

Thanks in advance

 

The answer is just above you :-"

Look in your URL bar to see which page you are on, find that page in your osC installation directories, find the bleeding display_price function used there and adjust it as is mentioned many times already.

Share this post


Link to post
Share on other sites
The answer is just above you :-"

Look in your URL bar to see which page you are on, find that page in your osC installation directories, find the bleeding display_price function used there and adjust it as is mentioned many times already.

 

Thought of that before, but I really don't know what to change.

Share this post


Link to post
Share on other sites
I have struggled with that one too for a while.... and got it fixed with the codes provided in this thread except in products_new.php so i skipp that page in this oscommerce implementation...

 

You get this error on "all" pages?

 

You can send me one of the pages private and i can have a look.....

(( note: it has nothing to do with your currencies.php , the changes are in all the other files that use the display price. ))

 

Thanks for your reply. I get this error only on my product_info.php pages. I'm using the STS mod, which is using a product_info.php.html file. That page is heavingly (??) modified. So I don't know what to edit. Do I need to adit the "normal" product_info.php file or the one from the STS mod?

 

Please help

Share this post


Link to post
Share on other sites
Thanks for your reply. I get this error only on my product_info.php pages. I'm using the STS mod, which is using a product_info.php.html file. That page is heavingly (??) modified. So I don't know what to edit. Do I need to adit the "normal" product_info.php file or the one from the STS mod?

 

Please help

 

Sorry forgot to post the code

 

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
 http://www.oscommerce.com

 Copyright (c) 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', '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 {
$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 . "'");

//TotalB2B start
$product_info['products_price'] = tep_xppp_getproductprice($product_info['products_id']);
//TotalB2B end

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

  //TotalB2B start
  $query_special_prices_hide = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'SPECIAL_PRICES_HIDE'");
  $query_special_prices_hide_result = tep_db_fetch_array($query_special_prices_hide); 
  if ($query_special_prices_hide_result['configuration_value'] == 'true') {
 	$products_price = '<span class="productSpecialPrice">' . $currencies->display_price_nodiscount($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; 
  } else {
	$products_price = '<s>' . $currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
  }
  //TotalB2B end

} else {
  $products_price = $currencies->display_price($product_info['products_id'], $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="javascript: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>
<?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" 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)) {
	$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($product_info['products_id'], $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
  }
?>
	  </table>
<?php
}
?>
	</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><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_MODULES . FILENAME_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'); ?>

 

PRODUCTS_INFO.PHP.HTML (THE ONE FROM THE STS MOD)

<?php
/*
$Id: sts_product_info.php,v 1.1 2005/07/25 18:19:27 stsdsea Exp stsdsea $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

/* 

 Simple Template System (STS) - Copyright (c) 2004 Brian Gallagher - brian@diamondsea.com

*/

// This program is designed to build template variables for the product_info.php page template
// This code was modified from product_info.php

$template['productid'] = $product_info['products_id'];
$template['productsid'] = $product_info['products_id']; // Just for consistende with osC names

// Start the "Add to Cart" form
$template['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));
// Add the hidden form variable for the Product_ID
$template['startform'] .= tep_draw_hidden_field('products_id', $product_info['products_id']);
$template['endform'] = "</form>";

// Get product information from products_id parameter
$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);

$template['regularprice'] = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));


if ($new_price = tep_get_products_special_price($product_info['products_id'])) {


 $template['regularpricestrike'] = "<s>" . $template['regularprice'] . "</s>";
 $template['specialprice'] = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));
} else {
 $template['specialprice'] = '';
 $template['regularpricestrike'] = $template['regularprice'];
}

$template['productname'] = $product_info['products_name'];
if (tep_not_null($product_info['products_model'])) {
 $template['productmodel'] =  $product_info['products_model'];
} 

if (tep_not_null($product_info['products_image'])) {
 $template['imagesmall'] = tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"');
 $template['imagelarge'] = tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), '','','');
 // $template['imagelarge'] = tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']);
}

$template['productdesc'] = stripslashes($product_info['products_description']); 

// Get the number of product attributes (the select list options)
$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 there are attributes (options), then...
if ($products_attributes['total'] > 0) {
 // Print the options header
 $template['optionheader'] = TEXT_PRODUCT_OPTIONS;

 // Select the list of attribute (option) names
 $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 . "'");

// For each option name, get the individual attribute (option) choices
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 the attribute (option) has a price modifier, include it
  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 we should select a default attribute (option), do it here
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;
}

$template['optionnames'] .= $products_options_name['products_options_name'] . ':<br>'; 
$template['optionchoices'] .=  tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . "<br>"; 
 }
} else {
 // No options, blank out the template variables for them
 $template['optionheader'] = '';
 $template['optionnames'] = '';
 $template['optionchoices'] = '';
}

// See if there are any reviews
$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) {
 $template['reviews'] = TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; 
} else {
 $template['reviews'] = '';
}

// See if there is a product URL
if (tep_not_null($product_info['products_url'])) {
 $template['moreinfolabel'] = TEXT_MORE_INFORMATION;
 $template['moreinfourl'] = tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false); 
} else {
 $template['moreinfolabel'] = '';
 $template['moreinfourl'] = '';
}

$template['moreinfolabel'] = str_replace('%s', $template['moreinfourl'], $template['moreinfolabel']);

// See if product is not yet available
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
 $template['productdatelabel'] = TEXT_DATE_AVAILABLE;
 $template['productdate'] = tep_date_long($product_info['products_date_available']);
} else {
 $template['productdatelabel'] = TEXT_DATE_ADDED;
 $template['productdate'] = tep_date_long($product_info['products_date_added']); 
}

// Strip out %s values
$template['productdatelabel'] = str_replace('%s.', '', $template['productdatelabel']);

// See if any product reviews
$template['reviewsurl'] = tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params());
$template['reviewsbutton'] = tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS);
$template['addtocartbutton'] = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

// See if any "Also Purchased" items
// I suspect that this won't work yet
// if ((USE_CACHE == 'true') && empty($SID)) {
//   $template['alsopurchased'] = tep_cache_also_purchased(3600);
// } else {
//   $template['alsopurchased'] = include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
// }

?>

 

Hope you can help

Share this post


Link to post
Share on other sites
PRODUCTS_INFO.PHP.HTML (THE ONE FROM THE STS MOD)

<?php
/*
$Id: sts_product_info.php,v 1.1 2005/07/25 18:19:27 stsdsea Exp stsdsea $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

/* 

 Simple Template System (STS) - Copyright (c) 2004 Brian Gallagher - brian@diamondsea.com

*/

// This program is designed to build template variables for the product_info.php page template
// This code was modified from product_info.php

$template['productid'] = $product_info['products_id'];
$template['productsid'] = $product_info['products_id']; // Just for consistende with osC names

// Start the "Add to Cart" form
$template['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));
// Add the hidden form variable for the Product_ID
$template['startform'] .= tep_draw_hidden_field('products_id', $product_info['products_id']);
$template['endform'] = "</form>";

// Get product information from products_id parameter
$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);

$template['regularprice'] = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
 $template['regularpricestrike'] = "<s>" . $template['regularprice'] . "</s>";
 $template['specialprice'] = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));
} else {
 $template['specialprice'] = '';
 $template['regularpricestrike'] = $template['regularprice'];
}

$template['productname'] = $product_info['products_name'];
if (tep_not_null($product_info['products_model'])) {
 $template['productmodel'] =  $product_info['products_model'];
} 

if (tep_not_null($product_info['products_image'])) {
 $template['imagesmall'] = tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"');
 $template['imagelarge'] = tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), '','','');
 // $template['imagelarge'] = tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']);
}

$template['productdesc'] = stripslashes($product_info['products_description']); 

// Get the number of product attributes (the select list options)
$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 there are attributes (options), then...
if ($products_attributes['total'] > 0) {
 // Print the options header
 $template['optionheader'] = TEXT_PRODUCT_OPTIONS;

 // Select the list of attribute (option) names
 $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 . "'");

// For each option name, get the individual attribute (option) choices
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 the attribute (option) has a price modifier, include it
  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 we should select a default attribute (option), do it here
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;
}

$template['optionnames'] .= $products_options_name['products_options_name'] . ':<br>'; 
$template['optionchoices'] .=  tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . "<br>"; 
 }
} else {
 // No options, blank out the template variables for them
 $template['optionheader'] = '';
 $template['optionnames'] = '';
 $template['optionchoices'] = '';
}

// See if there are any reviews
$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) {
 $template['reviews'] = TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; 
} else {
 $template['reviews'] = '';
}

// See if there is a product URL
if (tep_not_null($product_info['products_url'])) {
 $template['moreinfolabel'] = TEXT_MORE_INFORMATION;
 $template['moreinfourl'] = tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false); 
} else {
 $template['moreinfolabel'] = '';
 $template['moreinfourl'] = '';
}

$template['moreinfolabel'] = str_replace('%s', $template['moreinfourl'], $template['moreinfolabel']);

// See if product is not yet available
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
 $template['productdatelabel'] = TEXT_DATE_AVAILABLE;
 $template['productdate'] = tep_date_long($product_info['products_date_available']);
} else {
 $template['productdatelabel'] = TEXT_DATE_ADDED;
 $template['productdate'] = tep_date_long($product_info['products_date_added']); 
}

// Strip out %s values
$template['productdatelabel'] = str_replace('%s.', '', $template['productdatelabel']);

// See if any product reviews
$template['reviewsurl'] = tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params());
$template['reviewsbutton'] = tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS);
$template['addtocartbutton'] = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

// See if any "Also Purchased" items
// I suspect that this won't work yet
// if ((USE_CACHE == 'true') && empty($SID)) {
//   $template['alsopurchased'] = tep_cache_also_purchased(3600);
// } else {
//   $template['alsopurchased'] = include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
// }

?>

 

Hope you can help

 

I am unfamiliar with STS but if the STS mod for product_info.php has to replace some parts of the original product_info.php you see an unpatched display_price call

 $template['specialprice'] = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));

This will not work with TotalB2B so you should go through this STS modded file also and change the display_price calls like you did with the original product_info.php

Share this post


Link to post
Share on other sites

Hi, I might have overlooked but I searched through the forum and found no answer for this. How can I resolve the problem:

 

Warning: call_user_func(tep_update_prices): First argument is expected to be a valid callback in /*******/admin/includes/functions/general.php on line 1199

Share this post


Link to post
Share on other sites

Here are 2 probs im having right now. If someone knows the fix please let me know:

 

 

Fatal error: Call to undefined function: tep_cfg_pull_down_prices() in //shopathomenow.com/admin/configuration.php(125) : eval()'d code on line 1

 

configuration.php

 

 

Warning: call_user_func(tep_update_prices): First argument is expected to be a valid callback in //shopathomenow.com/admin/includes/functions/general.php on line 1199

 

 

general.php

 

Hope help comes my way! Thanks a bunch. :rolleyes:

Share this post


Link to post
Share on other sites
Matt,

 

The error depends on what is being queried through the advanced search which in the end calls your (catalog)/includes/modules/product_listing.php.

The bottom line is you have to make sure that all calls to the display_price function in any page you use have to be altered.

So for your (catalog)/includes/modules/product_listing.php you open it in your editor and search for display_price. The problem is that the installation directions for TotalB2B does not show all changes to be made so you can miss one or two places. For the product_listing.php take this part:

			  if ($query_special_prices_hide_result['configuration_value'] == 'true') {
			$lc_text = '  <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		  } else {
			$lc_text = '<s>' .  $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <br><span class="productSpecialPrice">' . $currencies->display_price_nodiscount($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		  }
		//TotalB2B end
		} else {
		  $lc_text = ' ' . $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
		}
		break;

The "//TotalB2B end" shows before the " } else { " but should have been behind the else branch as there is another display_price call in there which should be changed but isn't if you follow the installation to the letter.

As you see you should change

			  $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

to

			  $lc_text = ' ' . $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

 

So whenever you see the error telling you that you miss the third parameter you know you have a display_price used somewhere which isn't updated yet to be used with TotalB2B.

 

HTH

Howard

Howard...thanks for trying to help me....I continue to struggle with this error and cannot locate the specific error. I have attached the code from product_info.php below....am I missing something here?

 

<?php
/*
 $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

 if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 </tr>
</table>
<?php
 }

 $list_box_contents = array();

 for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
  case 'PRODUCT_LIST_MODEL':
	$lc_text = ' ' . TABLE_HEADING_MODEL . ' ';
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_NAME':
	$lc_text = ' ' . TABLE_HEADING_PRODUCTS . ' ';
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_MANUFACTURER':
	$lc_text = ' ' . TABLE_HEADING_MANUFACTURER . ' ';
	$lc_align = '';
	break;
  case 'PRODUCT_LIST_PRICE':
	$lc_text = ' ' . TABLE_HEADING_PRICE . ' ';
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_QUANTITY':
	$lc_text = ' ' . TABLE_HEADING_QUANTITY . ' ';
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_WEIGHT':
	$lc_text = ' ' . TABLE_HEADING_WEIGHT . ' ';
	$lc_align = 'right';
	break;
  case 'PRODUCT_LIST_IMAGE':
	$lc_text = ' ' . TABLE_HEADING_IMAGE . ' ';
	$lc_align = 'center';
	break;
  case 'PRODUCT_LIST_BUY_NOW':
	$lc_text = '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td class="productListing-heading" align="right" width="25%">' . ' ' . TABLE_HEADING_QUANTITY  . ' ' . '</td><td class="productListing-heading" align="center" width="75%" valign="absmiddle">' . ' ' . TABLE_HEADING_BUY_NOW . ' ' . '</td></tr></table>';
	$lc_align = 'right';
	break;
}

if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
  $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
}

$list_box_contents[0][] = array('align' => $lc_align,
								'params' => 'class="productListing-heading"',
								'text' => $lc_text);
 }

 if ($listing_split->number_of_rows > 0) {
$rows = 0;
$listing_query = tep_db_query($listing_split->sql_query);
while ($listing = tep_db_fetch_array($listing_query)) {
  $rows++;

  if (($rows/2) == floor($rows/2)) {
	$list_box_contents[] = array('params' => 'class="productListing-even"');
  } else {
	$list_box_contents[] = array('params' => 'class="productListing-odd"');
  }

  $cur_row = sizeof($list_box_contents) - 1;

  for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
	$lc_align = '';

	switch ($column_list[$col]) {
	  case 'PRODUCT_LIST_MODEL':
		$lc_align = '';
		$lc_text = ' ' . $listing['products_model'] . ' ';
		break;
	  case 'PRODUCT_LIST_NAME':
		$lc_align = '';
		if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		  $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
		} else {
		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';
		}
		break;
	  case 'PRODUCT_LIST_MANUFACTURER':
		$lc_align = '';
		$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
		break;
	  case 'PRODUCT_LIST_PRICE':
		$lc_align = 'right';
		if (tep_not_null($listing['specials_new_products_price'])) {

		  $lc_text = ' <s>' .  $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		}
		//TotalB2B start
		$listing['products_price'] = tep_xppp_getproductprice($listing['products_id']);
		//TotalB2B end

		//TotalB2B start
		if ($new_price = tep_get_products_special_price($listing['products_id'])) {
		  $listing['specials_new_products_price'] = $new_price;
		  $query_special_prices_hide = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'SPECIAL_PRICES_HIDE'");
		  $query_special_prices_hide_result = tep_db_fetch_array($query_special_prices_hide); 
		  if ($query_special_prices_hide_result['configuration_value'] == 'true') {
			$lc_text = '  <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		  } else {
			$lc_text = ' <s>' .  $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price_nodiscount($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
		  }
		//TotalB2B end

		} else {
		  $lc_text = ' ' . $currencies->display_price($listing['products_id'], $listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
		}
		break;
	  case 'PRODUCT_LIST_QUANTITY':
		$lc_align = 'right';
		$lc_text = ' ' . $listing['products_quantity'] . ' ';
		break;
	  case 'PRODUCT_LIST_WEIGHT':
		$lc_align = 'right';
		$lc_text = ' ' . $listing['products_weight'] . ' ';
		break;
	  case 'PRODUCT_LIST_IMAGE':
		$lc_align = 'center';
		if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		  $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
		} else {
		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a> ';
		}
		break;
	  case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'right';
		$lc_text = tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=2') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</td></tr></table></form>';
		break;
	}

	$list_box_contents[$cur_row][] = array('align' => $lc_align,
										   'params' => 'class="productListing-data"',
										   'text'  => $lc_text);
  }
}

new productListingBox($list_box_contents);
 } else {
$list_box_contents = array();

$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"',
							   'text' => TEXT_NO_PRODUCTS);

new productListingBox($list_box_contents);
 }

 if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
 </tr>
</table>
<?php
 }
?>


Need Hosting? Just ask!

Share this post


Link to post
Share on other sites
Howard...thanks for trying to help me....I continue to struggle with this error and cannot locate the specific error. I have attached the code from product_info.php below....am I missing something here?

 

Matt,

 

If I look correctly you only forgot to remove/comment out one piece of original code.

Find this part

case 'PRODUCT_LIST_PRICE':
$lc_align = 'right';
if (tep_not_null($listing['specials_new_products_price'])) {

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

and change it to

case 'PRODUCT_LIST_PRICE':
$lc_align = 'right';
//if (tep_not_null($listing['specials_new_products_price'])) {

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

or remove it.

 

Howard

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×