Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

Thank you, Jan.

 

The thing is I'm no programmer. I can follow instructions and sometimes improvise to make things work, but I have no idea how to code. :blush:

 

You said it's been discussed before on this thread, right? Do you remember if there was instructions on how to implement it, what needed to be changed? If so, I don't mind searching and trying to implement that on my store.

 

Thank you for your reply and attention. :)

Patty

Link to comment
Share on other sites

G'day All,

 

I have a site modified with master products and i would like to add SPPC as well as 'hide catagories'. After some research and some trial and error it doesnt seem this will be an easy task. Where should i begin?? Would it be better to start fresh and install SPPC first then Master Products?? With my first attempt i lost the product pages when i added SPPC, it just went blank when i clicked on a product. I have restored my site now im looking for the best way to add these contributions.

 

Cheers

 

Christian

Link to comment
Share on other sites

Thank you Jan - but I want to verify that by "No it should be added to this page" - did you mean it should be added to the catalog/admin_login.php page and not be on the catalog/admin.php page - or that it should be on both pages?

 

Thank you! :thumbsup:

 

No it should be added to this page.

 

Yes, but of course sessions can be set on any page, so you could add the sppc ones earlier and the rest on another page. But that doesn't work if you do not pass the page where the sppc session variables are set.

~Tracy
 

Link to comment
Share on other sites

I installed Master Products first I believe, and then added SPPC and then added the Hide Categories contrib for SPPC.

 

Basically, the bugger is the catalog/admin/categories.php file. If you add the Master Products code first, then you can add the SPPC code for both the stock osC code and the Master Products code at the same time.

 

The other thing not to miss is the catalog/includes/modules/master_listing.php and master_products.php files as they will have to be updated with the SPPC code as well.

 

Hope that helps :blush:

 

G'day All,

 

I have a site modified with master products and i would like to add SPPC as well as 'hide catagories'. After some research and some trial and error it doesnt seem this will be an easy task. Where should i begin?? Would it be better to start fresh and install SPPC first then Master Products?? With my first attempt i lost the product pages when i added SPPC, it just went blank when i clicked on a product. I have restored my site now im looking for the best way to add these contributions.

 

Cheers

 

Christian

~Tracy
 

Link to comment
Share on other sites

We're on the right track now - I have the "Create New Account" and "Find Existing Account" features working all the way through the checkout process. YAY!! (turned out that for some reason the admin_create_account.php page had all of the Zone info commented out :huh: - I made them active again and all is working there).

 

The one problem I have left now, is if there are two accounts with the same last name, the results only show one account. If there are no results, it is not showing the message. So it seems to be having problems showing the first row of data is my guess?

 

I am not spotting anything in the code that looks like it would cause this - you see anything?

<? 

		$info_box_contents = array();
		$info_box_contents[] = array('text' => TEXT_ADMIN_SEARCH_ACCOUNT);

		new infoBoxHeading($info_box_contents, true, false);

		unset($info_box_contents);

		$info_box_contents[] = array('align' => 'center',
					 'text'  => tep_draw_form('search_customers', tep_href_link(FILENAME_ADMIN,'','SSL'), 'get').TEXT_ADMIN_SEARCH_EMAIL.'<br>'.tep_draw_input_field('search_email').'<br>'.TEXT_ADMIN_SEARCH_LASTNAME.'<br>'.tep_draw_input_field('search_lastname').'<br>'.TEXT_ADMIN_SEARCH_PHONE.'<br>'.tep_draw_input_field('search_phone'));
		$info_box_contents[] = array('align' => 'center',
					 'text'  => tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH).tep_hide_session_id().'</form>');

		if ($HTTP_GET_VARS['search_email']) {
			$search_email = tep_db_prepare_input($HTTP_GET_VARS['search_email']);
			$where_clause = "customers_email_address RLIKE '".tep_db_input($search_email)."'";
		}

		if ($HTTP_GET_VARS['search_phone']) {
			$search_phone = tep_db_prepare_input($HTTP_GET_VARS['search_phone']);
			$where_clause .= ($where_clause ? ' or ' : '')."customers_telephone RLIKE '".tep_db_input($search_phone)."'";
		}

		if ($HTTP_GET_VARS['search_lastname']) {
			$search_lastname = tep_db_prepare_input($HTTP_GET_VARS['search_lastname']);
			$where_clause .= ($where_clause ? ' or ' : '')." customers_lastname RLIKE '".tep_db_input($search_lastname)."'";
		}


		if ($where_clause) {

			$search_sql = "select * from ".TABLE_CUSTOMERS." where ".$where_clause;
			$search_query = tep_db_query($search_sql);
			$search_query_result = tep_db_fetch_array($search_query);

if (tep_db_num_rows($search_query)) {
//BOF SPPC
	$sppc_customer_group_id = $search_query_result['customers_group_id'];
	$check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$check_customer['customers_group_id'] . "'");
	$customer_group_tax = tep_db_fetch_array($check_customer_group_tax);
	$sppc_customer_group_show_tax = (int)$customer_group_tax['customers_group_show_tax'];
	$sppc_customer_group_tax_exempt = (int)$customer_group_tax['customers_group_tax_exempt'];

		tep_session_register('sppc_customer_group_id');
		tep_session_register('sppc_customer_group_show_tax');
		tep_session_register('sppc_customer_group_tax_exempt');

	$customer_group_id = $sppc_customer_group_id;

//EOF SPPC			

			//if (tep_db_num_rows($search_query)) {

			$info_box_contents[] = array('align' => 'center',
						 'text'  => TEXT_ADMIN_MATCHES);


			$search_display = '<table border="1" width="100%" cellspacing="0" cellpadding="2">';
			$search_display .= '<tr><td class="tableHeading">'.TEXT_ADMIN_SEARCH_EMAIL.'</td><td class="tableHeading">'.TEXT_ADMIN_SEARCH_NAME.'</td><td class="tableHeading">'.TEXT_ADMIN_SEARCH_PHONE.'</td></tr>';	
			while ($search_result = tep_db_fetch_array($search_query)) {
				$search_display .= '<tr><td class="smallText"><a href="'.tep_href_link(FILENAME_ADMIN_LOGIN,'email_address='.$search_result['customers_email_address'],'SSL').'">'.$search_result['customers_email_address'].'</a></td><td class="smallText">'.$search_result['customers_firstname'].' '.$search_result['customers_lastname'].'</td><td class="smallText">'.$search_result['customers_telephone'].'</td></tr>';	
			}
			$search_display .= '</table>';

			$info_box_contents[] = array('align' => 'left',
						 'text'  => $search_display);

		} else {
				$info_box_contents[] = array('align' => 'center',
							 'text'  => TEXT_ADMIN_NO_MATCHES);
		}
		}

		new infoBox($info_box_contents);

	 ?>

 

I know before I added the SPPC Code to get their Customer Group ID it wasn't doing this - so I'm thinking maybe I need to tweak something there? Dunno though - I could've messed something else up when I added the code :huh:

 

 

I installed Master Products first I believe, and then added SPPC and then added the Hide Categories contrib for SPPC.

 

Basically, the bugger is the catalog/admin/categories.php file. If you add the Master Products code first, then you can add the SPPC code for both the stock osC code and the Master Products code at the same time.

 

The other thing not to miss is the catalog/includes/modules/master_listing.php and master_products.php files as they will have to be updated with the SPPC code as well.

 

Hope that helps :blush:

~Tracy
 

Link to comment
Share on other sites

Thank you Jan - but I want to verify that by "No it should be added to this page" - did you mean it should be added to the catalog/admin_login.php page and not be on the catalog/admin.php page - or that it should be on both pages?

Just catalog/admin_login.php should do, otherwise you duplicate code (might give errors too) and you need it on catalog/admin_login.php anyway so it is best to keep it on that page.

Link to comment
Share on other sites

The one problem I have left now, is if there are two accounts with the same last name, the results only show one account. If there are no results, it is not showing the message. So it seems to be having problems showing the first row of data is my guess?

I'm not sure, but I think when you do a query (like for SPPC) in between, the results of that search_query are no longer available.

Link to comment
Share on other sites

Ok - I have removed the code from catalog/admin.php and edited catalog/admin_login.php to have the same SPPC code as the catalog/login.php file. I also kept the SPPC edits on the catalog/admin_create_account.php page as that page doesn't access the admin_login.php page.

 

This seems to be working. It turned out to be this bit of code causing the search results to not display the first listing:

$search_query_result = tep_db_fetch_array($search_query);

 

I removed the other code, just happened to forget that piece and I still had the problem. Once I removed that piece from catalog/admin.php then the search results were correct again :thumbsup:

 

Thank you very very very much!!! It all appears to be functioning properly now!! WOOHOO :thumbsup:

 

 

I'm not sure, but I think when you do a query (like for SPPC) in between, the results of that search_query are no longer available.

~Tracy
 

Link to comment
Share on other sites

I installed Master Products first I believe, and then added SPPC and then added the Hide Categories contrib for SPPC.

 

Basically, the bugger is the catalog/admin/categories.php file. If you add the Master Products code first, then you can add the SPPC code for both the stock osC code and the Master Products code at the same time.

 

The other thing not to miss is the catalog/includes/modules/master_listing.php and master_products.php files as they will have to be updated with the SPPC code as well.

 

Hope that helps :blush:

 

Thankyou so so much for your advice. Now with my limited PHP knowledge i assume the best way to modify would be to use a comparing program to modify each file. However im not too sure how to modify master_listing.php and master_products.php forr the other two contributions. I sthere some documentation that would help me out with this.

 

Thankyou again,

 

Christian

Link to comment
Share on other sites

And just as an aside, the other thing i would like to do (not critical) is to set a minimum quantity limit on the total of slave products.

 

For example - Master 1 has 5 slaves and a customer needs to order a minimum mix of 12 slaves for that master product however master two might only require a minimum of 5 of each slave ie not a mix of the slaves but 5 of each slave.

 

Is this possible to achieve? or am i looking at something near impossible?

 

Cheers,

 

Christian

Link to comment
Share on other sites

Go through the manual install instructions for SPPC - I believe it's product_listing.php that is quite similar to master_listing.php - so you may be able to follow the directions with only slight modifications for the master_listing code vs the product_listing code. I don't remember if there was a page similar to the master_products.php page or not - if you get stuck I am willing to email you my master_listing and master_products pages. Just keep in mind I have several other contrib's too so you may not need all of the adjustments that I have made :thumbsup:

 

You might also do a google search for

site:www.oscommerce.com/forums SPPC +master +products

 

and change +products to +listing for another search

 

This may yield some posts on how to incorporate SPPC with those two pages as I believe I was posting here and receiving help from Jan when I was going through the process ;)

 

 

 

Thankyou so so much for your advice. Now with my limited PHP knowledge i assume the best way to modify would be to use a comparing program to modify each file. However im not too sure how to modify master_listing.php and master_products.php forr the other two contributions. I sthere some documentation that would help me out with this.

 

Thankyou again,

 

Christian

~Tracy
 

Link to comment
Share on other sites

I'm not sure on how to do this, but I'll bet there is a way and someone has probably done it. I would post this one in the Master Products forum if I'm understanding correctly that you want an individual minimum purchase quantity for each slave product.

 

And just as an aside, the other thing i would like to do (not critical) is to set a minimum quantity limit on the total of slave products.

 

For example - Master 1 has 5 slaves and a customer needs to order a minimum mix of 12 slaves for that master product however master two might only require a minimum of 5 of each slave ie not a mix of the slaves but 5 of each slave.

 

Is this possible to achieve? or am i looking at something near impossible?

 

Cheers,

 

Christian

~Tracy
 

Link to comment
Share on other sites

Go through the manual install instructions for SPPC - I believe it's product_listing.php that is quite similar to master_listing.php - so you may be able to follow the directions with only slight modifications for the master_listing code vs the product_listing code. I don't remember if there was a page similar to the master_products.php page or not - if you get stuck I am willing to email you my master_listing and master_products pages. Just keep in mind I have several other contrib's too so you may not need all of the adjustments that I have made :thumbsup:

 

You might also do a google search for

site:www.oscommerce.com/forums SPPC +master +products

 

and change +products to +listing for another search

 

This may yield some posts on how to incorporate SPPC with those two pages as I believe I was posting here and receiving help from Jan when I was going through the process ;)

 

 

Thanks for your patience, i am almost there, i would appreciate very much for you to email you master_products and master_listing files. i have almost got master_listing i think but im not sure bout master_products.

 

Thanks again,

 

Christian

Link to comment
Share on other sites

I'm trying to install the "Display One Category Index Box" contribution (http://www.oscommerce.com/community/contributions,2127), but it's not showing on the main page as it should. I used this contribution before on a plain store and it works fine, so I'm guessing maybe it needs to be tweaked to work with SPPC.

 

Here's the file. It's based on the new_products.php, so maybe it's an easy change for a programmer (which unfortunately I'm not :blush: ).

Can someone help me with this?

 

TIA for any help.

 

<?php
/*
 $Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- Comming Soon Start //-->
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_COMMING_SOON, strftime('%B')));

 new contentBoxHeading($info_box_contents);

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

$new_products_query = tep_db_query(
	"select p.products_id, p.products_image, p.products_tax_class_id, " .
		"if(s.status, s.specials_new_products_price, p.products_price) as products_price " .
	"from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id " .
	", ". TABLE_PRODUCTS_TO_CATEGORIES . " p2c " .
	"where p.products_id = p2c.products_id and products_status = '1' and p2c.categories_id = 30 " .
	"order by rand() limit " . MAX_DISPLAY_NEW_PRODUCTS);
 } else {
$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by rand() limit " . MAX_DISPLAY_NEW_PRODUCTS);
 }

 $row = 0;
 $col = 0;
 $info_box_contents = array();
 while ($new_products = tep_db_fetch_array($new_products_query)) {
$new_products['products_name'] = tep_get_products_name($new_products['products_id']);
$info_box_contents[$row][$col] = array('align' => 'center',
									   'params' => 'class="smallText" width="33%" valign="top"',
									   'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>');

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

 new contentBox($info_box_contents);
?>
<!-- new_products_eof //-->

Patty

Link to comment
Share on other sites

I will be happy to email them to you - PM me with your email addy ;)

 

Tracy

 

Thanks for your patience, i am almost there, i would appreciate very much for you to email you master_products and master_listing files. i have almost got master_listing i think but im not sure bout master_products.

 

Thanks again,

 

Christian

~Tracy
 

Link to comment
Share on other sites

this is my login file

 

<?php
/*
 $Id: login.php,v 1.80 2003/06/05 23:28:24 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');

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
 if ($session_started == false) {
tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

// Check if email exists
// BOF Separate Pricing per Customer
$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_group_id, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
// EOF Separate Pricing Per Customer

if (!tep_db_num_rows($check_customer_query)) {
  $error = true;
} else {
  $check_customer = tep_db_fetch_array($check_customer_query);
// Check that password is good
  if (!tep_validate_password($password, $check_customer['customers_password'])) {
	$error = true;
  } else {
	if (SESSION_RECREATE == 'True') {
	  tep_session_recreate();
	}
	// BOF Separate Pricing Per Customer: choice for logging in under any customer_group_id
// note that tax rates depend on your registered address!
if ($_POST['skip'] != 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD ) {
  $existing_customers_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id ");
echo '<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">';
print ("\n<html ");
echo HTML_PARAMS;
print (">\n<head>\n<title>Choose a Customer Group</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
echo CHARSET;
print ("\"\n<base href=\"");
echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;
print ("\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\">\n");
echo '<body bgcolor="#ffffff" style="margin:0">';
print ("\n<table border=\"0\" width=\"100%\" height=\"100%\">\n<tr>\n<td style=\"vertical-align: middle\" align=\"middle\">\n");
echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));
print ("\n<table border=\"0\" bgcolor=\"#f1f9fe\" cellspacing=\"10\" style=\"border: 1px solid #7b9ebd;\">\n<tr>\n<td class=\"main\">\n");
 $index = 0;
 while ($existing_customers =  tep_db_fetch_array($existing_customers_query)) {
$existing_customers_array[] = array("id" => $existing_customers['customers_group_id'], "text" => " ".$existing_customers['customers_group_name']." ");
++$index;
 }
print ("<h1>Choose a Customer Group</h1>\n</td>\n</tr>\n<tr>\n<td align=\"center\">\n");
echo tep_draw_pull_down_menu('new_customers_group_id', $existing_customers_array, $check_customer['customers_group_id']);
print ("\n<tr>\n<td class=\"main\"> <br />\n ");
print ("<input type=\"hidden\" name=\"email_address\" value=\"".$_POST['email_address']."\">");
print ("<input type=\"hidden\" name=\"skip\" value=\"true\">");
print ("<input type=\"hidden\" name=\"password\" value=\"".$_POST['password']."\">\n</td>\n</tr>\n<tr>\n<td align=\"right\">\n");
echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);
print ("</td>\n</tr>\n</table>\n</form>\n</td>\n</tr>\n</table>\n</body>\n</html>\n");
exit;
}
// EOF Separate Pricing Per Customer: choice for logging in under any customer_group_id

	$check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");
	$check_country = tep_db_fetch_array($check_country_query);

	$customer_id = $check_customer['customers_id'];
	$customer_default_address_id = $check_customer['customers_default_address_id'];
	$customer_first_name = $check_customer['customers_firstname'];
	// BOF Separate Pricing Per Customer
if ($_POST['skip'] == 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD && isset($_POST['new_customers_group_id']))  {
  $sppc_customer_group_id = $_POST['new_customers_group_id'];
  $check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt, group_specific_taxes_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$_POST['new_customers_group_id'] . "'");
} else {
  $sppc_customer_group_id = $check_customer['customers_group_id'];
  $customers_specific_taxes_exempt = $check_customer['customers_specific_taxes_exempt'];
  $check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt, group_specific_taxes_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$check_customer['customers_group_id'] . "'");
}
$customer_group_tax = tep_db_fetch_array($check_customer_group_tax);
$sppc_customer_group_show_tax = (int)$customer_group_tax['customers_group_show_tax'];
$sppc_customer_group_tax_exempt = (int)$customer_group_tax['customers_group_tax_exempt'];
	$sppc_customer_group_tax_exempt = (int)$customer_group_tax['customers_group_tax_exempt'];
$group_specific_taxes_exempt = $customer_group_tax['group_specific_taxes_exempt'];
if (tep_not_null($customers_specific_taxes_exempt)) {
	$sppc_customer_specific_taxes_exempt = $customers_specific_taxes_exempt;
} elseif (tep_not_null($group_specific_taxes_exempt)) {
	$sppc_customer_specific_taxes_exempt = $group_specific_taxes_exempt;
} else {
	$sppc_customer_specific_taxes_exempt = '';
}
// EOF Separate Pricing Per Customer

	$customer_country_id = $check_country['entry_country_id'];
	$customer_zone_id = $check_country['entry_zone_id'];
	tep_session_register('customer_id');
	tep_session_register('customer_default_address_id');
	tep_session_register('customer_first_name');
	// BOF Separate Pricing per Customer
tep_session_register('sppc_customer_group_id');
tep_session_register('sppc_customer_group_show_tax');
tep_session_register('sppc_customer_group_tax_exempt');
if (tep_not_null($sppc_customer_specific_taxes_exempt)) {
	tep_session_register('sppc_customer_specific_taxes_exempt');
}
// EOF Separate Pricing per Customer

	tep_session_register('customer_country_id');
	tep_session_register('customer_zone_id');

	tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

// restore cart contents
	$cart->restore_contents();

	if (sizeof($navigation->snapshot) > 0) {
	  $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
	  $navigation->clear_snapshot();
	  tep_redirect($origin_href);
	} else {
	  tep_redirect(tep_href_link(FILENAME_DEFAULT));
	}
  }
}
 }

 if ($error == true) {
$messageStack->add('login', TEXT_LOGIN_ERROR);
 }

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', 'SSL'));
?>
<!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 session_win() {
 window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();
}
//--></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 width="983" border="0" align="center" cellpadding="3" cellspacing="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('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?><table width="633" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if ($messageStack->size('login') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('login'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }

 if ($cart->count_contents() > 0) {
?>
  <tr>
	<td class="smallText"><?php echo TEXT_VISITORS_CART; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_CUSTOMER; ?></b></td>
		<td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_CUSTOMER; ?></b></td>
	  </tr>
	  <tr>
		<td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">
		  <tr class="infoBoxContents">
			<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main" valign="top"><?php echo TEXT_NEW_CUSTOMER . '<br><br>' . TEXT_NEW_CUSTOMER_INTRODUCTION; ?></td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<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_CREATE_ACCOUNT, '', 'SSL') . '">' . 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>
		</table></td>
		<td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">
		  <tr class="infoBoxContents">
			<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main" colspan="2"><?php echo TEXT_RETURNING_CUSTOMER; ?></td>
			  </tr>
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><b><?php echo ENTRY_EMAIL_ADDRESS; ?></b></td>
				<td class="main"><?php echo tep_draw_input_field('email_address'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td>
				<td class="main"><?php echo tep_draw_password_field('password'); ?></td>
			  </tr>
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></td>
			  </tr>
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td colspan="2"><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 tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				  </tr>
				</table></td>
			  </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table></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'); ?>

Link to comment
Share on other sites

Hello all, I have been reading this thread for a while and didn't find my particular quandry, so hopefully this has not already been answered! I am running QT Pro 4.25 as well as trying to install Seperate Pricing Per Customer 4.2.0. I have everything installed correctly, I think. I am able to create groups and set group pricing in the products section of the admin. The QT Pro features also seem to be working well.

 

The problem I get is when I login on the actual store. I get this error:

 

1146 - Table 'ellsworthbikes.TABLE_CUSTOMERS_GROUPS' doesn't exist

 

select customers_group_id, customers_group_name from TABLE_CUSTOMERS_GROUPS order by customers_group_id

 

[TEP STOP]

 

I checked the database and these tables do in fact exist. Below is my login page:

 

<?php
/*
 $Id: login.php,v 1.80 2003/06/05 23:28:24 hpdl Exp $
 adapted for Separate Price Per Customer v4.2 2006/06/25

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

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
 if ($session_started == false) {
tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

// Check if email exists
// BOF Separate Pricing per Customer
$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_group_id, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
// EOF Separate Pricing Per Customer
if (!tep_db_num_rows($check_customer_query)) {
  $error = true;
} else {
  $check_customer = tep_db_fetch_array($check_customer_query);
// Check that password is good
  if (!tep_validate_password($password, $check_customer['customers_password'])) {
	$error = true;
  } else {
	if (SESSION_RECREATE == 'True') {
	  tep_session_recreate();
	}
// BOF Separate Pricing Per Customer: choice for logging in under any customer_group_id
// note that tax rates depend on your registered address!
if ($_POST['skip'] != 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD ) {
  $existing_customers_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id ");
echo '<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">';
print ("\n<html ");
echo HTML_PARAMS;
print (">\n<head>\n<title>Choose a Customer Group</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
echo CHARSET;
print ("\"\n<base href=\"");
echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;
print ("\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\">\n");
echo '<body bgcolor="#ffffff" style="margin:0">';
print ("\n<table border=\"0\" width=\"100%\" height=\"100%\">\n<tr>\n<td style=\"vertical-align: middle\" align=\"middle\">\n");
echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));
print ("\n<table border=\"0\" bgcolor=\"#f1f9fe\" cellspacing=\"10\" style=\"border: 1px solid #7b9ebd;\">\n<tr>\n<td class=\"main\">\n");
 $index = 0;
 while ($existing_customers =  tep_db_fetch_array($existing_customers_query)) {
$existing_customers_array[] = array("id" => $existing_customers['customers_group_id'], "text" => " ".$existing_customers['customers_group_name']." ");
++$index;
 }
print ("<h1>Choose a Customer Group</h1>\n</td>\n</tr>\n<tr>\n<td align=\"center\">\n");
echo tep_draw_pull_down_menu('new_customers_group_id', $existing_customers_array, $check_customer['customers_group_id']);
print ("\n<tr>\n<td class=\"main\"> <br />\n ");
print ("<input type=\"hidden\" name=\"email_address\" value=\"".$_POST['email_address']."\">");
print ("<input type=\"hidden\" name=\"skip\" value=\"true\">");
print ("<input type=\"hidden\" name=\"password\" value=\"".$_POST['password']."\">\n</td>\n</tr>\n<tr>\n<td align=\"right\">\n");
echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);
print ("</td>\n</tr>\n</table>\n</form>\n</td>\n</tr>\n</table>\n</body>\n</html>\n");
exit;
}
// EOF Separate Pricing Per Customer: choice for logging in under any customer_group_id

	$check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");
	$check_country = tep_db_fetch_array($check_country_query);

	$customer_id = $check_customer['customers_id'];
	$customer_default_address_id = $check_customer['customers_default_address_id'];
	$customer_first_name = $check_customer['customers_firstname'];
// BOF Separate Pricing Per Customer
if ($_POST['skip'] == 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD && isset($_POST['new_customers_group_id']))  {
  $sppc_customer_group_id = $_POST['new_customers_group_id'];
  $check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt, group_specific_taxes_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$_POST['new_customers_group_id'] . "'");
} else {
  $sppc_customer_group_id = $check_customer['customers_group_id'];
  $customers_specific_taxes_exempt = $check_customer['customers_specific_taxes_exempt'];
  $check_customer_group_tax = tep_db_query("select customers_group_show_tax, customers_group_tax_exempt, group_specific_taxes_exempt from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$check_customer['customers_group_id'] . "'");
}
$customer_group_tax = tep_db_fetch_array($check_customer_group_tax);
$sppc_customer_group_show_tax = (int)$customer_group_tax['customers_group_show_tax'];
$sppc_customer_group_tax_exempt = (int)$customer_group_tax['customers_group_tax_exempt'];
	$sppc_customer_group_tax_exempt = (int)$customer_group_tax['customers_group_tax_exempt'];
$group_specific_taxes_exempt = $customer_group_tax['group_specific_taxes_exempt'];
if (tep_not_null($customers_specific_taxes_exempt)) {
	$sppc_customer_specific_taxes_exempt = $customers_specific_taxes_exempt;
} elseif (tep_not_null($group_specific_taxes_exempt)) {
	$sppc_customer_specific_taxes_exempt = $group_specific_taxes_exempt;
} else {
	$sppc_customer_specific_taxes_exempt = '';
}
// EOF Separate Pricing Per Customer
	$customer_country_id = $check_country['entry_country_id'];
	$customer_zone_id = $check_country['entry_zone_id'];
	tep_session_register('customer_id');
	tep_session_register('customer_default_address_id');
	tep_session_register('customer_first_name');
// BOF Separate Pricing per Customer
tep_session_register('sppc_customer_group_id');
tep_session_register('sppc_customer_group_show_tax');
tep_session_register('sppc_customer_group_tax_exempt');
if (tep_not_null($sppc_customer_specific_taxes_exempt)) {
	tep_session_register('sppc_customer_specific_taxes_exempt');
}
// EOF Separate Pricing per Customer
	tep_session_register('customer_country_id');
	tep_session_register('customer_zone_id');

	tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

// restore cart contents
	$cart->restore_contents();

	if (sizeof($navigation->snapshot) > 0) {
	  $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
	  $navigation->clear_snapshot();
	  tep_redirect($origin_href);
	} else {
	  tep_redirect(tep_href_link(FILENAME_DEFAULT));
	}
  }
}
 }

 if ($error == true) {
$messageStack->add('login', TEXT_LOGIN_ERROR);
 }

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', 'SSL'));
?>
<!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">
<link href="../styles/EBStyle.css" rel="stylesheet" type="text/css" />
<script src="../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript"><!--
function session_win() {
 window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();
}
//--></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="700" cellspacing="3" cellpadding="3" align="center" bgcolor="#000000">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" cellspacing="0" cellpadding="2" class="leftSide" bgcolor="#000000">
<!-- 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('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if ($messageStack->size('login') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('login'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }

 if ($cart->count_contents() > 0) {
?>
  <tr>
	<td class="smallText"><?php echo TEXT_VISITORS_CART; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_CUSTOMER; ?></b></td>
		<td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_CUSTOMER; ?></b></td>
	  </tr>
	  <tr>
		<td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">
		  <tr class="infoBoxContents">
			<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main" valign="top"><?php echo TEXT_NEW_CUSTOMER . '<br><br>' . TEXT_NEW_CUSTOMER_INTRODUCTION; ?></td>
			  </tr>
			  <tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<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_CREATE_ACCOUNT, '', 'SSL') . '">' . 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>
		</table></td>
		<td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">
		  <tr class="infoBoxContents">
			<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main" colspan="2"><?php echo TEXT_RETURNING_CUSTOMER; ?></td>
			  </tr>
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><b><?php echo ENTRY_EMAIL_ADDRESS; ?></b></td>
				<td class="main"><?php echo tep_draw_input_field('email_address'); ?></td>
			  </tr>
			  <tr>
				<td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td>
				<td class="main"><?php echo tep_draw_password_field('password'); ?></td>
			  </tr>
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></td>
			  </tr>
			  <tr>
				<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			  </tr>
			  <tr>
				<td colspan="2"><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 tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				  </tr>
				</table></td>
			  </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table></form></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'); ?>

 

I am at a little bit of a loss here. I have assigned that login ID to a certain group as well. Please let me know if you need any more information or how I can make this easier for you guys!

 

Thanks in advance -

Link to comment
Share on other sites

The problem I get is when I login on the actual store. I get this error:

I checked the database and these tables do in fact exist.

Yes, but the define for that table has not been added to the relevant file catalog/includes/database_tables.php.

 

Edit: not in the admin section, in the catalog section (and you are the only one getting that error, not your customers).

Edited by Jan Zonjee
Link to comment
Share on other sites

I install separate_price_420. when i go to login page, and click login , it will redirect to advance page.

 

i make a new login page to replace it, but it still redirect to advance_search.php page!

Nothing SPPC can do about that. Here is the code that does that (if you login coming from advanced_search.php it will send you back to that page after the login):

		if (sizeof($navigation->snapshot) > 0) {
	  $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
	  $navigation->clear_snapshot();
	  tep_redirect($origin_href);
	} else {
	  tep_redirect(tep_href_link(FILENAME_DEFAULT));
	}

Link to comment
Share on other sites

Thank you so much for your help! I totally missed that file!

 

I was able to get past that error, but I have two other questions.

 

1. When I went through the process agian, logged in, it asked me for my distribution level. I had already set my distribution level for that account, so why this step? Does the user get to select any value?

 

2. When I selected my group, I get the following error:

 

Fatal error: Call to undefined function: get_customer_group_id() in /home/ellsworthbikes.com/public_html/catalog/includes/classes/shopping_cart.php on line 31

 

Thanks again for such a quick response!

Link to comment
Share on other sites

1. When I went through the process agian, logged in, it asked me for my distribution level. I had already set my distribution level for that account, so why this step? Does the user get to select any value?

See the page separate_price_420/documentation/login.htm in the download.

 

2. When I selected my group, I get the following error:

That function is new in version 4.2.0 and has to be added to includes/classes/shopping_cart.php before the last curly brace (end of class) and PHP end tag:

// added for Separate Pricing Per Customer, returns customer_group_id
function get_customer_group_id() {
  if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {
	$_cg_id = $_SESSION['sppc_customer_group_id'];
  } else {
	 $_cg_id = 0;
  }
  return $_cg_id;
}

 }
?>

Link to comment
Share on other sites

Thank you so much for your quick response! These hints have been invaluable. I now am running into a new problems. All of the above fixes have worked perfectly, but I am now getting this error:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/ellsworthbikes.com/public_html/catalog/includes/classes/shopping_cart.php:500) in /home/ellsworthbikes.com/public_html/catalog/includes/functions/general.php on line 34

 

I get this after logging in with both my normal login and a test one.

 

Thanks so much again and sorry I am such a pain!

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