Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Total B2B


hozone

Recommended Posts

  • Replies 411
  • Created
  • Last Reply

Top Posters In This Topic

OK...I am back with another site.....

 

The display price problem is back.... Click here to see it

Click Here To See It

it is showing on product_info.php?products_id=53, when items are on sale.

 

 

I have spent close to 6 hours retracing my steps of adding in the contribution, comparing it to my other site that no longer has the errors, comparing it to the base install, even comparing it to this thread.

 

I am at a loss for where I need to correct the display_price() call at.

 

here is my product_info.php file, I presume this is where the issue would be...

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

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

Need Hosting? Just ask!

Link to comment
Share on other sites

OK...I am back with another site.....

 

The display price problem is back.... Click here to see it

Click Here To See It

it is showing on product_info.php?products_id=53, when items are on sale.

I have spent close to 6 hours retracing my steps of adding in the contribution, comparing it to my other site that no longer has the errors, comparing it to the base install, even comparing it to this thread.

 

I am at a loss for where I need to correct the display_price() call at.

Matt,

 

Looking at the product_info.php file you provide there seems nothing wrong with that. The site does use STS so something/some file else must be involved. As you say the error only occurs for a product on special.

What you could do is a search within all the oscommerce files (on the catalog side anyway) for display_price to find the occurences and check where the missing product_id is involved.

 

regards,

Howard

Link to comment
Share on other sites

Thanks for the tip again...we were able to fix it.

 

For those who have STS Template System....

 

Here is my sts_product_info.php file with the changes to resolve the display_price error.

This may not be all the changes to resolve your issue, but I thought if I posted the file, those looking with STS would understand what needs to be changed.

 

<?php
/*
$Id: sts_product_info.php,v 1.3 2004/02/05 09:36:00 jhtalk Exp jhtalk $

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 - [email protected]

*/

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

// 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_id'], $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['specialprice'] = $currencies->display_price($product_info['products_id'], $new_price, tep_get_tax_rate($product_info['products_tax_class_id']));
} else {
 $template['specialprice'] = '';
}

$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);
}

?>

Need Hosting? Just ask!

Link to comment
Share on other sites

I am doing some editing of files to hide the product_price if price=0

In most of the files it is clear how to do it but i was wondering how to do it in the pages where

the this TotalB2B contribution is installed???

 

I am afraid i might break totalb2b again and mess things up badly...

 

Thanks!!

Link to comment
Share on other sites

QUOTE(John2b @ Nov 13 2005, 04:50 PM)

 

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)

 

 

Reply hozone:

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

 

I Checked al files 5 times, even I replaced our files for your currencies and shopping_cart but for some strange reason as soon I set Allow Guest To See Prices on true and guest account on 1, the text Must be logged in for prices disarpeared and NO prices or tekst show op at all...??

 

If there is a way to remove hardcoded the "Allow Guest To See Prices" Settings in the script please tell me how and I will remove it, every things works accept this little part ??

 

thanks in advance.

Edited by John2b
Link to comment
Share on other sites

:blush:

I downloaded one from caneblu, which one of these should I download? or should I download all of them dated 30 May? Sorry about this I did not mean to waste your time!

I won't ask how you got there but that is not an official osCommerce contribution as it is not on our site.

 

I refered you to this one made by Hozone (take the latest one from him if you still want to go through with this).

You probably best start with a clean osCommerce installation or make sure you get completely rid of that B2B Suite .....

Link to comment
Share on other sites

Okay one more error:

This is my config:

Action

 

Fatal error: Call to undefined function: tep_array_merge() in /usr/www/users/webassi/catalog/admin/configuration.php on line 93

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

Okay one more error:

This is my config:

Action

 

Fatal error: Call to undefined function: tep_array_merge() in /usr/www/users/webassi/catalog/admin/configuration.php on line 93

 

Check your (catalog)/admin/configuration.php for that tep_array_merge string and change it in array_merge.

Link to comment
Share on other sites

Okay I replaced that and now I have this error:

 

Warning: Missing argument 2 for tep_get_zone_name() in /usr/www/users/webassi/catalog/admin/includes/functions/general.php on line 270

 

Warning: Missing argument 3 for tep_get_zone_name() in /usr/www/users/webassi/catalog/admin/includes/functions/general.php on line 270

 

this is what is on line 270 - 278

function tep_get_zone_name($country_id, $zone_id, $default_zone) {

$zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country_id . "' and zone_id = '" . (int)$zone_id . "'");

if (tep_db_num_rows($zone_query)) {

$zone = tep_db_fetch_array($zone_query);

return $zone['zone_name'];

} else {

return $default_zone;

}

}

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

Okay I replaced that and now I have this error:

 

Warning: Missing argument 2 for tep_get_zone_name() in /usr/www/users/webassi/catalog/admin/includes/functions/general.php on line 270

 

Warning: Missing argument 3 for tep_get_zone_name() in /usr/www/users/webassi/catalog/admin/includes/functions/general.php on line 270

 

this is what is on line 270 - 278

function tep_get_zone_name($country_id, $zone_id, $default_zone) {

$zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country_id . "' and zone_id = '" . (int)$zone_id . "'");

if (tep_db_num_rows($zone_query)) {

$zone = tep_db_fetch_array($zone_query);

return $zone['zone_name'];

} else {

return $default_zone;

}

}

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

Okay I replaced that and now I have this error:

 

Warning: Missing argument 2 for tep_get_zone_name() in /usr/www/users/webassi/catalog/admin/includes/functions/general.php on line 270

 

Warning: Missing argument 3 for tep_get_zone_name() in /usr/www/users/webassi/catalog/admin/includes/functions/general.php on line 270

 

this is what is on line 270 - 278

function tep_get_zone_name($country_id, $zone_id, $default_zone) {

$zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country_id . "' and zone_id = '" . (int)$zone_id . "'");

if (tep_db_num_rows($zone_query)) {

$zone = tep_db_fetch_array($zone_query);

return $zone['zone_name'];

} else {

return $default_zone;

}

}

Natasja,

 

Reverse the tep_array_merge to array_merge change which however brings you back to the error on configuration.php.

Then add the following to your (catalog)/admin/includes/functions/general.php

function tep_array_merge($array1, $array2, $array3 = '') {
if ($array3 == '') $array3 = array();
if (function_exists('array_merge')) {
$array_merged = array_merge($array1, $array2, $array3);
} else {
while (list($key, $val) = each($array1)) $array_merged[$key] = $val;
while (list($key, $val) = each($array2)) $array_merged[$key] = $val;
if (sizeof($array3) > 0) while (list($key, $val) = each($array3)) $array_merged[$key] = $val;
}

return (array) $array_merged;
}

 

And tell us what all you have running from osCommerce: which osCommerce package, which contributions from where etc.

Link to comment
Share on other sites

And tell us what all you have running from osCommerce: which osCommerce package, which contributions from where etc.

 

I only have Os Commerce running I deleted everything and re-loaded the new one from here the 2.2 Milestone.

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

Okay I made the recommened changes and I get this error:

Warning: Missing argument 2 for tep_get_zone_name() in /usr/www/users/webassi/catalog/admin/includes/functions/general.php on line 283

 

Warning: Missing argument 3 for tep_get_zone_name() in /usr/www/users/webassi/catalog/admin/includes/functions/general.php on line 283

That is in my config

And if I go to the online shop it gives me this:

 

Fatal error: Cannot redeclare tep_parse_input_field_data() (previously declared in /usr/www/users/webassi/catalog/includes/functions/general.php:36) in /usr/www/users/webassi/catalog/includes/functions/html_output.php on line 15

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

  • 2 weeks later...

Hi

I have "New Customer Enable" set to True.

My understanding is that when a customer sets up a new account, then the account becomes active with the "default" Group when set to True.

 

In the normal operation of osCommerce, if a customer sets up a new account, then they go back to the home page where they are already logged in.

 

However, with B2B, when the account is created the user returns to the home page and is not logged on.

 

Is there any way to change this so that the user is automatically logged on after created the account?

 

Thanks for your help.

Link to comment
Share on other sites

Hi,

I have 4 groups set up for customers.

I have set up a different percent discount on each group.

So as a general rule, a product will have a percentage discount on all products for a particular group.

However, I want to override that by having fixed prices on some of the products.

Example, use the percentage discount unless there is a fixed price for the product.

 

Is this how the standard pricing policy works? (at the moment I dont see this happening)

Or, do I need to make a modification?

And if I need to make the modification, are there any examples to help me achieve this?

 

Thanks for your help.

Link to comment
Share on other sites

  • 3 weeks later...

*EDITED* I've finally got it finished, nevermind

Edited by Baby Boy

Installed Contributions: AJAX Menu, AJAX Attributed Manager, AP URL ReWriting, Credit Class and Gift Vouchers, CCGV Report, Date of Birth PullDown, FCKEditor for Product Desc., Monthly Installment Payments, More Pictures 6, MSRP Savings, Must Agree to Terms on Checkout, Order Editor, Payment Method Fee, PopUp Promo, Private Messages, Purchase Order, Purchase Order Application, Secure Admin Login-Logout, STS Plus, SugarCRM Integration, Supertracker, Tax Exempt and Organization Discounts, Your Recent History.

 

23 Total Contributions Installed :)

Link to comment
Share on other sites

Hi

I am getting this error:

Warning: reset(): Passed variable is not an array or object in /usr/www/users/paperc/catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /usr/www/users/paperc/catalog/admin/includes/classes/object_info.php on line 18

osCommerce

 

This error only appears when I follow the link that was sent to me via e-mail to look at the clients profile, I looked at all the B2B files that I uploaded and I can not see why this error appears I also compared my object_info.php with a clean one from OsC and it is excactly the same. any ideas?

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

I am going through all my files and I just can not seem to find the link between b2b files and the object_info.php. If anyone can shed some light on this it will be appreciated

Pixy

One day at a time - we all have to learn

Link to comment
Share on other sites

Hi all,

 

I installed the contribution on a plain install and it all works perfectly only i'm not satisfied because of missing the original prices at the product_info, checkout and invoice pages.

 

I wish to see it everywhere as: original price - discount% - final price

 

For buyers it's important they see their discount and/or final price imediatly at the product they wish instead of having another page open which is without being logged in to see the original prices.

 

Please can somebody help/advise, because like it is now i can't use the (very nice) contribution :(

Link to comment
Share on other sites

Hi David, ( please sorry for my english)

 

I like the B2B module, butt we have stil one quiestion.

 

We have started with a clean OSC and have copied al the files in to this the clean OSC.

When we now wanted to put the RMAmod into it we have serious problems.

 

So we started over again with a new OSC, now with RMA in it and manual putt B2B into it.

Again serious problems, could u tell us iff these two modules can work together ??

Link to comment
Share on other sites

Hi David, ( please sorry for my english)

 

I like the B2B module, butt we have stil one quiestion.

 

We have started with a clean OSC and have copied al the files in to this the clean OSC.

When we now wanted to put the RMAmod into it we have serious problems.

 

So we started over again with a new OSC, now with RMA in it and manual putt B2B into it.

Again serious problems, could u tell us iff these two modules can work together ??

 

i don't know differences between my and RMA contrib, i don't know the RMA mod too. :-"

only i can teel that you have to check files again, you can start debug wathing error. check what your site do, and what it is supposed to do.. and then check files engaged in functions.

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

Link to comment
Share on other sites

Hi every body,

 

wel it was a verry difficult search butt I have the admin for 99,9 % working.

in the catalog the mod has many problems, so some of them I have changed.

but there is one I do not understand, this message I get in the shopping_cart.php page

 

//TotalB2B start global $customer_id; $query_price_to_guest = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'ALLOW_GUEST_TO_SEE_PRICES'"); $query_price_to_guest_result = tep_db_fetch_array($query_price_to_guest); if ((($query_price_to_guest_result['configuration_value']=='true') && !(tep_session_is_registered('customer_id'))) || ((tep_session_is_registered('customer_id')))) { echo $currencies->format($cart->show_total()); } else { echo PRICES_LOGGED_IN_TEXT; } //TotalB2B end

 

please can someone tel me what this mean

 

greetings

Link to comment
Share on other sites

  • 2 weeks later...

I have installed contrib_TotalB2B_1.2d.

It doesn't work.

I got this message:

Fatal error: Call to undefined function: tep_admin_check_login() in /admin/includes/application_top.php on line 223

 

Can anybody help me?

 

fosil AT freemail DOT hu

 

thanks,

 

Zsolt

Edited by wheeloftime
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...