Jump to content
scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

would there be a way to make it so that retail customers do not have to create an account in order to purchase...?

 

Try contribution Purchase Without Account.

Edited by kbking

Share this post


Link to post
Share on other sites

Hey All - I have read through alot of this forum & searched others. I am also wanting to add a minimum quanity. I have the "Quantity Price Breaks for SPPC", which I use the quanity blocks. However I am also needing to set a minimum quanity on some. For example, on my retail I may sell a product in blocks of 25 with a min quanity of 25 - for this the quanity blocks works great. However in my Wholesale group, the price is less but the min quanity must be 150, however after than min quanity is reached they should be able to purchase in blocks(multiples) of 25. Is there a way to do this with the "Quantity Price Breaks for SPPC" that I am missing? Before installing the SPPC/Quantity Price Breaks for SPPC I used a minimum quanity contribution "Minimum Product Quantity with Admin - http://www.oscommerce.com/community/contributions,2953". However it is only on the retail, I need it on the groups also. I am new to php & sql - i did add a column to the 'product_groups' for the min order - and plan on adding the field min quanity in the admin table. However I feel that there is probably a bit more involved. If anyone knows of something already set up for this, it would be great -- or a way to make it work in just the "Quantity Price Breaks for SPPC".

 

Thanks,

Kristine

www.boxgeek.com

 

 

 

 

Hey all,

 

Is there a way to set a customer group so that they must buy a minimum quantity of the products? For example, I want to be able to set in the admin so that the Wholesale group must by at least 50 units, or they will not be able to checkout. Any ideas?

 

Thanks,

DC

 

Quantity Price Breaks for SPPC will do that on a per product basis (it resets the quantity to the minimum if anything lower is added to the cart) but not on a minimum order amount basis (so 50 units made up of several products).

Kristine

Share this post


Link to post
Share on other sites

JanZ wrote:

So there is no need to enable the canadatable.php only for Canadian customers if that is already dealt with in admin using the zones.

 

That is exactly the problem I can't seem to get around; the admin/zones thing is not picking up that the (any) customer needs Canada shipping and thus not grabbing canadatable.php. But when I desgnate it in the individual customer profile under shipping options, it works (I was testing to isolate if there was something wrong with the file/program canadatable.php). Same thing forAlaska/Hawaii/etc. My lowertable.php picks up correctly the lower 48 states + DC. I've set up the zones, and then attached the desired zone to the matching admin/modules/shipping section.


Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Share this post


Link to post
Share on other sites
the admin/zones thing is not picking up that the (any) customer needs Canada shipping and thus not grabbing canadatable.php. But when I desgnate it in the individual customer profile under shipping options, it works
You are sure you enabled these new shipping options in admin/customers_groups.php for retail customers?

Share this post


Link to post
Share on other sites

AH HA ! I'd forgotten about that part. All is well now, and thanks for asking the right question.


Toward Continued Success - - > Carol Hawkey - - > KidsLearnToSew.com - - > Wyoming, USA

Mods Installed - - > Authnet AIM2 - Bundled Products 1.4 - Fancier Invoice 6.1 - Email_HTML_Order_Link_Fixed - Header Tags Controller - Login aLa Amazon - JustOneAttribute - Article Manager - SPPC w/PB - spiders.txt - Dangling Carrot/Olive - Printable Catalog - CCGV(trad)

Planned Mods - - > Purchase Without Account - USPS Label - Ultimate SEO

Share this post


Link to post
Share on other sites
Here is another question related to integrating Ezier New Fields with SPPC. The EZier fields on the product_info.php page do not read properly for separate price customer groups. The "retail price" and "your price" and thus "savings" remain at the default values regardless of whether the customer is in a different group.

 

I've been doing a little more work on the problem I posted above and believe I've isolated it to the include statement on product_info.php that calls ezier_new_fields.php. I've posted this on the EZier New Fields thread but thought I would post here in case someone using SPPC has already encountered this and solved it, or in case I'm wrong about the source of the problem.

 

EZier makes changes on product_info.php to add a call to include ezier_new_fields.php. This is what generates the EZier fields. The code in ezier_new_fields.php includes a section if the "customer discount" contrib is installed to get the discount price. I'm guessing that something similar needs to be written to get it to work with SPPC.

 

If anyone has gotten EZier and SPPC to work together on product_info.php, I would very much appreciate any insights. Am I on the right track? Do I need to make changes to ezier_new_fields.php or is my problem elsewhere?

 

Thanks in advance if you spend any time on this question.

 

Here's the code I think is relevant from ezier_new_fields.php (note the sections about customer discounts):

 

/ Get the retail price & clean up the decimal places
	$retail = osc_ez(($currencies->display_price($product_info['products_retail_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
	$special_flag = false;
	$cust_flag = false;

		if ($new_price = tep_get_products_special_price($product_info['products_id'])) 
			{  // If there is a special ... Special Overrides customer discount...
				$our = osc_ez(($currencies->display_price($product_info['products_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
				$special_price = osc_ez(($currencies->display_price((tep_get_products_special_price($product_info['products_id'])),tep_get_tax_rate($product_info['products_tax_class_id']))),0,$strlen);
				$save2 = osc_ez($currencies->display_price($product_info['products_retail_price'] - (tep_get_products_special_price($product_info['products_id'])), ''));
				$save = (((tep_get_products_special_price($product_info['products_id'])) / ($product_info['products_retail_price'])) * 100);
				$special_flag = true;
			}

			if (((strstr($customer_discount, "-") != 0) && ((tep_get_products_special_price($product_info['products_id'])) == null))) 
			{ // If there isn't a special, but still a customer discount... We'll need those decimals....
				$retail = osc_ez(($currencies->display_price_nodiscount($product_info['products_retail_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
				$our = ($product_info['products_price']);
				$our = $our - $our * abs($customer_discount) / 100;
				$save2 = osc_ez($currencies->display_price_nodiscount(($product_info['products_retail_price'] - $our), ''));
				$save = (($our / ($product_info['products_retail_price'])) * 100); 
				$our = osc_ez($currencies->display_price_nodiscount($product_info['products_price'], ''));
				$cust = osc_ez($currencies->display_price($product_info['products_price'], ''));
				$cust_flag = true;
			} // End cust discount

			if ((strstr($customer_discount, "-") == 0) && ((tep_get_products_special_price($product_info['products_id'])) == null))  
			{ // Just a regular price
				$our = osc_ez(($currencies->display_price($product_info['products_price'],tep_get_tax_rate($product_info['products_tax_class_id']))));
				$save = (($product_info['products_price'] / ($product_info['products_retail_price'])) * 100);
				$save2 = osc_ez($currencies->display_price($product_info['products_retail_price'] - $product_info['products_price'], ''));
			} // End of regular price

	$save = (100 - $save);
	$save = round($save); ?>
			</td>
		   </tr>
		  </table>
	<?php		
		echo TEXT_PRODUCTS_RETAIL_PRICE_INFO . '<s>' . $retail . '</s>'; 

		if ($special_flag == true) 
			{
			echo TEXT_PRODUCTS_PRICE_INFO . '<s>' .  $our . '</s>'; 
			echo TEXT_PRODUCTS_PRICE_SPECIAL_INFO . $special_price . '</font>';
			} else if ($cust_flag == true) { 
			echo TEXT_PRODUCTS_PRICE_INFO_REGULAR . '<s>' .  $our . '</s>'; 
			echo TEXT_PRODUCTS_PRICE_SPECIAL_CUST . $cust . '</font>';
			} else {
			echo TEXT_PRODUCTS_PRICE_INFO . $our; 
			}

// Uncomment the line that you want below, and comment our the default option if you like, description is to the right		
		// echo TEXT_PRODUCTS_SAVE_INFO . $save2 . '</font>';						  //This line is price shown
		// echo TEXT_PRODUCTS_SAVE_INFO . $save . '%</font>';							  //This line is % shown
		echo TEXT_PRODUCTS_SAVE_INFO . $save2 . ' (' . $save . '%)</font>';		  //This line is % and price together

		 	} else { ?>
		  </td>
		</tr> 
	  </table>
	  <?php


----------------------------------------------------

Share this post


Link to post
Share on other sites
I previously had SPPC and Ezier New Fields working perfectly together. Then, I decided I need Quantity Price Break, so I backed up all my SPPC with Ezier files, then shifted to SPPC with Quantity Price Break. I test QPB for SPPC and this was working fine. So, then I went back into these files and re-added the Ezier New Fields code.

 

I'm actually pretty impressed that I was able to do this and get it working 99%, given my lack of PHP expertise. There is only one problem now with the integration. The EZier fields on the product_info.php page do not read properly for special price customer groups anymore. The "retail price" and "your price" and thus "savings" remain at the default values regardless of whether the customer is in a different group. This was working fine before I tried to include QPB. Fortunately, all of the cart functionality and the QPB price break prices in the heading are the right prices for each customer group, it's just the part of the product listing that is generated by ezier_new_fields.php that are messed up.

 

Hi,

 

You tell you have installed SPPC with Quantity Price Break but you speak about The "retail price" and "your price". So I think you have the contribution "Show your price" installed too ? If you want to be able all these contribution working well together, try to follow this SOLUTION, maybe it will help you, let us know... And check the contribution Show Price list for SPPC 4.1 v1.0 which contain all the things you need to be compatible with SPPC 4.1.1 with "Quantity Price Break" and even SPPC 4.1.1 with "Quantity Price Breaks" and "Hide Price if 0$ for Quantity Price Breaks". Good luck. :)

Edited by Jeep_ice

John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites

This post is regarding the code that allows automatic group assignment based on specific criteria that has to be met on the creat_account.php page... (post pages 131-135 i think)

 

 

I am having a HUGE problem... the customer can leave the drop down menu on the default setting (yes) and NOT enter a company name OR a tax id and they automatically get wholesale prices... its supposed to only let them be wholesalers if they enter company name AND tax id... (and leave the checkbox at yes of course).

 

Please help!

 

here is my create_account.php file:

<?php
/*
$Id: create_account.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $
adapted for Separate Pricing Per customers 2005/02/14

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

Copyright ? 2003 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

// needs to be included earlier to set the success message in the messageStack
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

$process = false;
if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
$process = true;

if (ACCOUNT_GENDER == 'true') {
if (isset($HTTP_POST_VARS['gender'])) {
$gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
} else {
$gender = false;
}
}
$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
$lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);

if ($_POST['request_cg'] == 'Wholesale') {
$customers_group_id = '1'; // assuming wholesale has that id
} else { // everything else is retail
$customers_group_id = '0';
}

// BOF Separate Pricing Per customers, added: field for tax id number
if (ACCOUNT_COMPANY == 'true') {
$company = tep_db_prepare_input($HTTP_POST_VARS['company']);
$company_tax_id = tep_db_prepare_input($HTTP_POST_VARS['company_tax_id']);
}
// EOF Separate Pricing Per customers, added: field for tax id number
$street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']);
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['suburb']);
$postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);
$city = tep_db_prepare_input($HTTP_POST_VARS['city']);
if (ACCOUNT_STATE == 'true') {
$state = tep_db_prepare_input($HTTP_POST_VARS['state']);
if (isset($HTTP_POST_VARS['zone_id'])) {
$zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);
} else {
$zone_id = false;
}
}
$country = tep_db_prepare_input($HTTP_POST_VARS['country']);
$telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']);
$fax = tep_db_prepare_input($HTTP_POST_VARS['fax']);
if (isset($HTTP_POST_VARS['newsletter'])) {
$newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);
} else {
$newsletter = false;
}
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
$confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

$error = false;

if (ACCOUNT_GENDER == 'true') {
if ( ($gender != 'm') && ($gender != 'f') ) {
$error = true;

$messageStack->add('create_account', ENTRY_GENDER_ERROR);
}
}

if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);
}

if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);
}

if (ACCOUNT_DOB == 'true') {
if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {
$error = true;

$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);
}
}

if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
} elseif (tep_validate_email($email_address) == false) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
} else {
$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
$check_email = tep_db_fetch_array($check_email_query);
if ($check_email['total'] > 0) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
}
}

if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR);
}

if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_POST_CODE_ERROR);
}

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_CITY_ERROR);
}

if (is_numeric($country) == false) {
$error = true;

$messageStack->add('create_account', ENTRY_COUNTRY_ERROR);
}

if (ACCOUNT_STATE == 'true') {
$zone_id = 0;
$check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");
$check = tep_db_fetch_array($check_query);
$entry_state_has_zones = ($check['total'] > 0);
if ($entry_state_has_zones == true) {
$zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')");
if (tep_db_num_rows($zone_query) == 1) {
$zone = tep_db_fetch_array($zone_query);
$zone_id = $zone['zone_id'];
} else {
$error = true;

$messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT);
}
} else {
if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_STATE_ERROR);
}
}
}

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
}


if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
} elseif ($password != $confirmation) {
$error = true;

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
}

if ($error == false) {
$sql_data_array = array('customers_firstname' => $firstname,
'customers_lastname' => $lastname,
'customers_email_address' => $email_address,
'customers_telephone' => $telephone,
'customers_fax' => $fax,
'customers_group_id' => $customers_group_id,
'customers_newsletter' => $newsletter,
'customers_password' => tep_encrypt_password($password));
if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);


// BOF Separate Pricing Per customers: alert shop owner of account created by a company
// if you would like to have an email when either a company name has been entered in
// the appropriate field or a tax id number, or both then uncomment the next line and comment the default
// setting: only email when a tax_id number has been given
// if ( (ACCOUNT_COMPANY == 'true' && tep_not_null($company) ) || (ACCOUNT_COMPANY == 'true' && tep_not_null($company_tax_id) ) ) {
//start uncommenting on this line.AJG /* if ( ACCOUNT_COMPANY == 'true' && tep_not_null($company_tax_id) ) {
//$alert_email_text = "Please note that " . $firstname . " " . $lastname . " of the company: " . $company . " has created an account.";
//tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'Company account created', $alert_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
//} */
//if ( $_POST['request_cg'] != 'retail' ) {
//$alert_email_text = "Please note that " . $firstname . " " . $lastname . "of the company: " . $company . " has created an account and applied for a " . tep_db_prepare_input($_POST['request_cg']). " account.";
//$request_subject = tep_db_prepare_input($_POST['request_cg']). " account created";
//tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $request_subject, $alert_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
//}
// EOF Separate Pricing Per customers: alert shop owner of account created by a company

if (ACCOUNT_COMPANY == 'true') { // BOF adapted for Separate Pricing Per Customer
  $sql_data_array['entry_company_tax_id'] = $company_tax_id;
  } // EOF adapted for Separate Pricing Per Customer

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

$customers_id = tep_db_insert_id();

$sql_data_array = array('customers_id' => $customers_id,
'entry_firstname' => $firstname,
'entry_lastname' => $lastname,
'entry_street_address' => $street_address,
'entry_postcode' => $postcode,
'entry_city' => $city,
'entry_country_id' => $country);

if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
if (ACCOUNT_COMPANY == 'true') { // BOF adapted for Separate Pricing Per Customer
$sql_data_array['entry_company'] = $company;
} // EOF adapted for Separate Pricing Per Customer
if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
if (ACCOUNT_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $zone_id;
$sql_data_array['entry_state'] = '';
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
}

tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

$address_id = tep_db_insert_id();

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customers_id . "'");

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customers_id . "', '0', now())");

if (SESSION_RECREATE == 'True') {
tep_session_recreate();
}

// BOF Separate Pricing Per customers
// register SPPC session variables for the new customers
// if there is code above that puts new customers directly into another customers group (default is retail)
// then the below code need not be changed, it uses the newly inserted customers group
$check_customers_group_info = tep_db_query("select c.customers_group_id, cg.customers_group_show_tax, cg.customers_group_tax_exempt from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_GROUPS . " cg using(customers_group_id) where c.customers_id = '" . $customers_id . "'");
$customers_group_info = tep_db_fetch_array($check_customers_group_info);
$sppc_customers_group_id = $customers_group_info['customers_group_id'];
$sppc_customers_group_show_tax = (int)$customers_group_info['customers_group_show_tax'];
$sppc_customers_group_tax_exempt = (int)$customers_group_info['customers_group_tax_exempt'];
// EOF Separate Pricing Per customers
$customers_first_name = $firstname;
$customers_default_address_id = $address_id;
$customers_country_id = $country;
$customers_zone_id = $zone_id;
tep_session_register('customers_id');
tep_session_register('customers_first_name');
tep_session_register('customers_default_address_id');
tep_session_register('customers_country_id');
tep_session_register('customers_zone_id');
// BOF Separate Pricing Per customers
tep_session_register('sppc_customers_group_id');
tep_session_register('sppc_customers_group_show_tax');
tep_session_register('sppc_customers_group_tax_exempt');
// EOF Separate Pricing Per customers

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

// build the message content
$name = $firstname . ' ' . $lastname;

if (ACCOUNT_GENDER == 'true') {
if ($gender == 'm') {
$email_text = sprintf(EMAIL_GREET_MR, $lastname);
} else {
$email_text = sprintf(EMAIL_GREET_MS, $lastname);
}
} else {
$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
}

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);


tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}
}

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<script LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT>

<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">
<?php require('includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- coolMenu //-->
<?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?>
<!-- coolMenu_eof //-->

<!-- 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('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><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_account.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>
<tr>
<td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
if ($messageStack->size('create_account') > 0) {
?>
<tr>
<td><?php echo $messageStack->output('create_account'); ?></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"><b><?php echo CATEGORY_PERSONAL; ?></b></td>
<td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<?php
if (ACCOUNT_GENDER == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_GENDER; ?></td>
<td class="main"><?php echo tep_draw_radio_field('gender', 'm') . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f') . '  ' . FEMALE . ' ' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
<td class="main"><?php echo tep_draw_input_field('firstname') . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
<td class="main"><?php echo tep_draw_input_field('lastname') . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
</tr>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
<td class="main"><?php echo tep_draw_input_field('dob') . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
<td class="main"><?php echo tep_draw_input_field('email_address') . ' ' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
if (ACCOUNT_COMPANY == 'true') {
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_COMPANY; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_COMPANY; ?></td>
<td class="main"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
</tr>

<!-- BOF Separate Pricing Per customers: drop-down menu for authorization request -->
<tr>
<td class="main"><?php define('ENTRY_REQUEST_CUSTOMERS_GROUP', 'Do you plan to resale merchandise<br> that you purchase from our store? ');
echo ENTRY_REQUEST_CUSTOMERS_GROUP; ?></td>
<td class="main"><?php
$request_cg_array[] = array('id' => 'Retail', 'text' => 'no');
$request_cg_array[] = array('id' => 'Wholesale', 'text' => 'yes');

echo tep_draw_pull_down_menu('request_cg', $request_cg_array) ?></td>
</tr>
<!-- EOF Separate Pricing Per customers: drop-down menu for authorization request -->

<!-- BOF Separate Pricing Per customers: field for tax id number -->
<tr>
<td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?></td>
<td class="main"><?php echo tep_draw_input_field('company_tax_id') . ' ' . (tep_not_null(ENTRY_COMPANY_TAX_ID_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TAX_ID_TEXT . '</span>': ''); ?></td>
</tr>
<!-- EOF Separate Pricing Per customers: field for tax id number -->
</table></td>
</tr>
</table></td>
</tr>
<?php
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
<td class="main"><?php echo tep_draw_input_field('street_address') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>
</tr>
<?php
if (ACCOUNT_SUBURB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_SUBURB; ?></td>
<td class="main"><?php echo tep_draw_input_field('suburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_POST_CODE; ?></td>
<td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_CITY; ?></td>
<td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>
</tr>
<?php
if (ACCOUNT_STATE == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_STATE; ?></td>
<td class="main">
<?php
if ($process == true) {
if ($entry_state_has_zones == true) {
$zones_array = array();
$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
while ($zones_values = tep_db_fetch_array($zones_query)) {
$zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
}
echo tep_draw_pull_down_menu('state', $zones_array);
} else {
echo tep_draw_input_field('state');
}
} else {
echo tep_draw_input_field('state');
}

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_COUNTRY; ?></td>
<td class="main"><?php echo tep_get_country_list('country') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_CONTACT; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
<td class="main"><?php echo tep_draw_input_field('telephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
<td class="main"><?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
<td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_PASSWORD; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_PASSWORD; ?></td>
<td class="main"><?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
<td class="main"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></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><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></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 include(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Edited by herot

Did you get rid of the voices in your head? Do you now miss them and the things that they said?

-David Gilmour

Share this post


Link to post
Share on other sites

well, i restored my SQL Database from a couple days ago and i am using the same create_account.php file that i just posted...

 

now, no matter what i input at create account page i see only RETAIL prices but it shows me in the wholesale group!

 

!?


Did you get rid of the voices in your head? Do you now miss them and the things that they said?

-David Gilmour

Share this post


Link to post
Share on other sites
Hi,

 

You tell you have installed SPPC with Quantity Price Break but you speak about The "retail price" and "your price". So I think you have the contribution "Show your price" installed too ? If you want to be able all these contribution working well together, try to follow this SOLUTION, maybe it will help you, let us know... And check the contribution Show Price list for SPPC 4.1 v1.0 which contain all the things you need to be compatible with SPPC 4.1.1 with "Quantity Price Break" and even SPPC 4.1.1 with "Quantity Price Breaks" and "Hide Price if 0$ for Quantity Price Breaks". Good luck. :)

 

Thanks for the response. I have Ezier New Fields installed which sounds similar to the "Show Your Price" contrib you mention. I will check out that contrib and also your suggestions as to how to make all of them work together. Perhaps I will uninstall EZier New Fields, if it looks like Show Your Price can do the same thing and be compatible with SPPC and Quantity Price Break.


----------------------------------------------------

Share this post


Link to post
Share on other sites

OK, i found an even bigger problem...

 

when i create an account WITHOUT inputing a "company name" or a "tax id" and leave my dropdown menu to "yes" (for wholesale)... the customer gets wholesale access anyway... that is the problem that i explained 2 posts ago...

 

If i create an account WITHOUT inputing a "company name" or a "tax id" AND choose "no" in the drop down (not for wholesale)... the customer gets retail prices as they should.

 

NOW, if i create an account and i complete the "company name", "tax id", and choose "yes" (for wholesale)...

i get NO WHOLESALE priviledges... AND the data in the "product groups" table in MySQL database gets completely WIPED OUT!! (0 rows)...

 

after this NOBODY gets wholesale access ever... and i have to restore my good database where the "product groups" table has the correct data in it... (and yes the backup database does have the correct data in "product groups" table i verified it). After restoring everything works EXACTLY as i described above all over again!!

 

what is the freaking deal???

 

here is the create_account.php file i am using when this occurs... and i DID move my "tax id" field into customers table via texxmax's instructions....

 

**i wasn't completely sure if it was the same create_account.php file i listed 2 post ago... thats why im posting again...**

<?php
/*
$Id: create_account.php,v 1.65 2003/06/09 23:03:54 hpdl Exp $
adapted for Separate Pricing Per customers 2005/02/14

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

Copyright ? 2003 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

// needs to be included earlier to set the success message in the messageStack
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

$process = false;
if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
$process = true;

if (ACCOUNT_GENDER == 'true') {
if (isset($HTTP_POST_VARS['gender'])) {
$gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
} else {
$gender = false;
}
}
$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
$lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);

if ($_POST['request_cg'] == 'Wholesale') {
$customers_group_id = '1'; // assuming wholesale has that id
} else { // everything else is retail
$customers_group_id = '0';
}

// BOF Separate Pricing Per customers, added: field for tax id number
if (ACCOUNT_COMPANY == 'true') {
$company = tep_db_prepare_input($HTTP_POST_VARS['company']);
$company_tax_id = tep_db_prepare_input($HTTP_POST_VARS['company_tax_id']);
}
// EOF Separate Pricing Per customers, added: field for tax id number
$street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']);
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['suburb']);
$postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);
$city = tep_db_prepare_input($HTTP_POST_VARS['city']);
if (ACCOUNT_STATE == 'true') {
$state = tep_db_prepare_input($HTTP_POST_VARS['state']);
if (isset($HTTP_POST_VARS['zone_id'])) {
$zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);
} else {
$zone_id = false;
}
}
$country = tep_db_prepare_input($HTTP_POST_VARS['country']);
$telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']);
$fax = tep_db_prepare_input($HTTP_POST_VARS['fax']);
if (isset($HTTP_POST_VARS['newsletter'])) {
$newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);
} else {
$newsletter = false;
}
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
$confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

$error = false;

if (ACCOUNT_GENDER == 'true') {
if ( ($gender != 'm') && ($gender != 'f') ) {
$error = true;

$messageStack->add('create_account', ENTRY_GENDER_ERROR);
}
}

if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR);
}

if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);
}

if (ACCOUNT_DOB == 'true') {
if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {
$error = true;

$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);
}
}

if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
} elseif (tep_validate_email($email_address) == false) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
} else {
$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
$check_email = tep_db_fetch_array($check_email_query);
if ($check_email['total'] > 0) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
}
}

if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR);
}

if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_POST_CODE_ERROR);
}

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_CITY_ERROR);
}

if (is_numeric($country) == false) {
$error = true;

$messageStack->add('create_account', ENTRY_COUNTRY_ERROR);
}

if (ACCOUNT_STATE == 'true') {
$zone_id = 0;
$check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");
$check = tep_db_fetch_array($check_query);
$entry_state_has_zones = ($check['total'] > 0);
if ($entry_state_has_zones == true) {
$zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')");
if (tep_db_num_rows($zone_query) == 1) {
$zone = tep_db_fetch_array($zone_query);
$zone_id = $zone['zone_id'];
} else {
$error = true;

$messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT);
}
} else {
if (strlen($state) < ENTRY_STATE_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_STATE_ERROR);
}
}
}

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
}


if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR);
} elseif ($password != $confirmation) {
$error = true;

$messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
}

if ($error == false) {
$sql_data_array = array('customers_firstname' => $firstname,
'customers_lastname' => $lastname,
'customers_email_address' => $email_address,
'customers_telephone' => $telephone,
'customers_fax' => $fax,
'customers_group_id' => $customers_group_id,
'customers_newsletter' => $newsletter,
'customers_password' => tep_encrypt_password($password));
if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);


// BOF Separate Pricing Per customers: alert shop owner of account created by a company
// if you would like to have an email when either a company name has been entered in
// the appropriate field or a tax id number, or both then uncomment the next line and comment the default
// setting: only email when a tax_id number has been given
// if ( (ACCOUNT_COMPANY == 'true' && tep_not_null($company) ) || (ACCOUNT_COMPANY == 'true' && tep_not_null($company_tax_id) ) ) {
//start uncommenting on this line.AJG /* if ( ACCOUNT_COMPANY == 'true' && tep_not_null($company_tax_id) ) {
//$alert_email_text = "Please note that " . $firstname . " " . $lastname . " of the company: " . $company . " has created an account.";
//tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'Company account created', $alert_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
//} */
//if ( $_POST['request_cg'] != 'retail' ) {
//$alert_email_text = "Please note that " . $firstname . " " . $lastname . "of the company: " . $company . " has created an account and applied for a " . tep_db_prepare_input($_POST['request_cg']). " account.";
//$request_subject = tep_db_prepare_input($_POST['request_cg']). " account created";
//tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $request_subject, $alert_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
//}
// EOF Separate Pricing Per customers: alert shop owner of account created by a company

if (ACCOUNT_COMPANY == 'true') { // BOF adapted for Separate Pricing Per Customer
  $sql_data_array['entry_company_tax_id'] = $company_tax_id;
  } // EOF adapted for Separate Pricing Per Customer

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

$customers_id = tep_db_insert_id();

$sql_data_array = array('customers_id' => $customers_id,
'entry_firstname' => $firstname,
'entry_lastname' => $lastname,
'entry_street_address' => $street_address,
'entry_postcode' => $postcode,
'entry_city' => $city,
'entry_country_id' => $country);

if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
if (ACCOUNT_COMPANY == 'true') { // BOF adapted for Separate Pricing Per Customer
$sql_data_array['entry_company'] = $company;
} // EOF adapted for Separate Pricing Per Customer
if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
if (ACCOUNT_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $zone_id;
$sql_data_array['entry_state'] = '';
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
}

tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

$address_id = tep_db_insert_id();

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customers_id . "'");

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customers_id . "', '0', now())");

if (SESSION_RECREATE == 'True') {
tep_session_recreate();
}

// BOF Separate Pricing Per customers
// register SPPC session variables for the new customers
// if there is code above that puts new customers directly into another customers group (default is retail)
// then the below code need not be changed, it uses the newly inserted customers group
$check_customers_group_info = tep_db_query("select c.customers_group_id, cg.customers_group_show_tax, cg.customers_group_tax_exempt from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_GROUPS . " cg using(customers_group_id) where c.customers_id = '" . $customers_id . "'");
$customers_group_info = tep_db_fetch_array($check_customers_group_info);
$sppc_customers_group_id = $customers_group_info['customers_group_id'];
$sppc_customers_group_show_tax = (int)$customers_group_info['customers_group_show_tax'];
$sppc_customers_group_tax_exempt = (int)$customers_group_info['customers_group_tax_exempt'];
// EOF Separate Pricing Per customers
$customers_first_name = $firstname;
$customers_default_address_id = $address_id;
$customers_country_id = $country;
$customers_zone_id = $zone_id;
tep_session_register('customers_id');
tep_session_register('customers_first_name');
tep_session_register('customers_default_address_id');
tep_session_register('customers_country_id');
tep_session_register('customers_zone_id');
// BOF Separate Pricing Per customers
tep_session_register('sppc_customers_group_id');
tep_session_register('sppc_customers_group_show_tax');
tep_session_register('sppc_customers_group_tax_exempt');
// EOF Separate Pricing Per customers

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

// build the message content
$name = $firstname . ' ' . $lastname;

if (ACCOUNT_GENDER == 'true') {
if ($gender == 'm') {
$email_text = sprintf(EMAIL_GREET_MR, $lastname);
} else {
$email_text = sprintf(EMAIL_GREET_MS, $lastname);
}
} else {
$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
}

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);


tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}
}

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<script LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT>

<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">
<?php require('includes/form_check.js.php'); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- coolMenu //-->
<?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?>
<!-- coolMenu_eof //-->

<!-- 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('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><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_account.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>
<tr>
<td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
if ($messageStack->size('create_account') > 0) {
?>
<tr>
<td><?php echo $messageStack->output('create_account'); ?></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"><b><?php echo CATEGORY_PERSONAL; ?></b></td>
<td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<?php
if (ACCOUNT_GENDER == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_GENDER; ?></td>
<td class="main"><?php echo tep_draw_radio_field('gender', 'm') . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f') . '  ' . FEMALE . ' ' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
<td class="main"><?php echo tep_draw_input_field('firstname') . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
<td class="main"><?php echo tep_draw_input_field('lastname') . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
</tr>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
<td class="main"><?php echo tep_draw_input_field('dob') . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
<td class="main"><?php echo tep_draw_input_field('email_address') . ' ' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<?php
if (ACCOUNT_COMPANY == 'true') {
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_COMPANY; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_COMPANY; ?></td>
<td class="main"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
</tr>

<!-- BOF Separate Pricing Per customers: drop-down menu for authorization request -->
<tr>
<td class="main"><?php define('ENTRY_REQUEST_CUSTOMERS_GROUP', 'Do you plan to resale merchandise<br> that you purchase from our store? ');
echo ENTRY_REQUEST_CUSTOMERS_GROUP; ?></td>
<td class="main"><?php
$request_cg_array[] = array('id' => 'Wholesale', 'text' => 'yes');
$request_cg_array[] = array('id' => 'Retail', 'text' => 'no');
echo tep_draw_pull_down_menu('request_cg', $request_cg_array) ?></td>
</tr>
<!-- EOF Separate Pricing Per customers: drop-down menu for authorization request -->

<!-- BOF Separate Pricing Per customers: field for tax id number -->
<tr>
<td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?></td>
<td class="main"><?php echo tep_draw_input_field('company_tax_id') . ' ' . (tep_not_null(ENTRY_COMPANY_TAX_ID_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TAX_ID_TEXT . '</span>': ''); ?></td>
</tr>
<!-- EOF Separate Pricing Per customers: field for tax id number -->
</table></td>
</tr>
</table></td>
</tr>
<?php
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
<td class="main"><?php echo tep_draw_input_field('street_address') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>
</tr>
<?php
if (ACCOUNT_SUBURB == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_SUBURB; ?></td>
<td class="main"><?php echo tep_draw_input_field('suburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_POST_CODE; ?></td>
<td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_CITY; ?></td>
<td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>
</tr>
<?php
if (ACCOUNT_STATE == 'true') {
?>
<tr>
<td class="main"><?php echo ENTRY_STATE; ?></td>
<td class="main">
<?php
if ($process == true) {
if ($entry_state_has_zones == true) {
$zones_array = array();
$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
while ($zones_values = tep_db_fetch_array($zones_query)) {
$zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
}
echo tep_draw_pull_down_menu('state', $zones_array);
} else {
echo tep_draw_input_field('state');
}
} else {
echo tep_draw_input_field('state');
}

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php echo ENTRY_COUNTRY; ?></td>
<td class="main"><?php echo tep_get_country_list('country') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_CONTACT; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
<td class="main"><?php echo tep_draw_input_field('telephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
<td class="main"><?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
<td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="main"><b><?php echo CATEGORY_PASSWORD; ?></b></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_PASSWORD; ?></td>
<td class="main"><?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
<td class="main"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>
</tr>
</table></td>
</tr>
</table></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><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></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 include(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Did you get rid of the voices in your head? Do you now miss them and the things that they said?

-David Gilmour

Share this post


Link to post
Share on other sites

the problem seems to work only in the order i explained...

 

after restoreing from good backup:

 

if i create an account WITH inputing "company name", "tax id", and choose "yes" (for wholesale); first before i create any other accounts then it works and i CAN see wholesale prices... (and the product groups table remains intact...)

 

*update*

 

its wierd that time it happened when i left "company name" and "tax id" blank and picked "no" from the drop down.. logged in looked retail prices ok good... logoff... go to admin delete account i just created... check phpmyadmin *BOOM* no data in "product groups" table...


Did you get rid of the voices in your head? Do you now miss them and the things that they said?

-David Gilmour

Share this post


Link to post
Share on other sites
Thanks for the response. I have Ezier New Fields installed which sounds similar to the "Show Your Price" contrib you mention. I will check out that contrib and also your suggestions as to how to make all of them work together. Perhaps I will uninstall EZier New Fields, if it looks like Show Your Price can do the same thing and be compatible with SPPC and Quantity Price Break.

Well, on further investigation, I discovered that the problem between Ezier New Fields information on the product_info.php page when using also SPPC and Quantity Price Breaks for SPPC, is actually related not to SPPC but to Quantity Price Breaks. Ezier New Fields and SPPC work fine together. When QPB is added, there is incompatibility on the product_info.php page between EZier new fields include of "ezier_new_fields.php" and QPB's "priceformatter.php." It's beyond my php skill to fix it and I realized that I need a price break that is not product specific, so I uninstalled QPB. Now my Ezier New Fields and SPPC work fine again, though I screwed many of the other contribs on the site, so now I am having to rebuild a lot of code.

 

For what it's worth.


----------------------------------------------------

Share this post


Link to post
Share on other sites
its wierd that time it happened when i left "company name" and "tax id" blank and picked "no" from the drop down.. logged in looked retail prices ok good... logoff... go to admin delete account i just created... check phpmyadmin *BOOM* no data in "product groups" table...
Not really weird, it is commented in the code for admin/customers.php (starts around line 260) but I'm sure nobody remembers having seen that after installing SPPC:

// BOF Separate Pricing Per Customer
// Once all customers with a specific customers_group_id have been deleted from
// the table customers, the next time a customer is deleted, all entries in the table products_groups
// that have the (now apparently obsolete) customers_group_id will be deleted!
// If you don't want that, leave this section out, or comment it out

Share this post


Link to post
Share on other sites
Not really weird, it is commented in the code for admin/customers.php (starts around line 260) but I'm sure nobody remembers having seen that after installing SPPC:

// BOF Separate Pricing Per Customer
// Once all customers with a specific customers_group_id have been deleted from
// the table customers, the next time a customer is deleted, all entries in the table products_groups
// that have the (now apparently obsolete) customers_group_id will be deleted!
// If you don't want that, leave this section out, or comment it out

ok cool well at least that part is sorted out! thanks JanZ!

any idea about the drop down problem?


Did you get rid of the voices in your head? Do you now miss them and the things that they said?

-David Gilmour

Share this post


Link to post
Share on other sites

I have installed SPPC 4.1.1 everything seems ok but all prices are displaying as 0 : please help;

Hi

I have just installed SPPC and it looks good but although my prices appear OK in the back end all prices are displaying to customers as 0.

I am pretty new to OSC. If anyone could please help me?

 

Jes

Share this post


Link to post
Share on other sites
I have installed SPPC 4.1.1 everything seems ok but all prices are displaying as 0
Sounds more like you have a currency problem. I think the solution for that is in that thread.

Share this post


Link to post
Share on other sites
Sounds more like you have a currency problem. I think the solution for that is in that thread.

 

Thanks Janz, I will check it out

Regards

Jes

Share this post


Link to post
Share on other sites
Thanks Janz, I will check it out

Regards

Jes

Jan

Thanks again.

That did it!

Regards

Jes

Share this post


Link to post
Share on other sites

I have many modifications, so it maybe I just can't have all the items I have working together. However I thought I had this working with all the mods. I have SPPC, Hide products/catagories & Price Break. I used the Hide Product & Price Break contributions for SPPC.

 

My issue is with the price break(the Quantity Blocks:) . If I don't have a quanity block set up for the each customer group, I thought it automaticly used "Quanity Block:" setup in the Retail section.

 

However for some reason it is not doing this. If anyone could point me in the right direction to start looking that would be great. If it doesn't do this, I can start setting up for each customer group - I just thought I had it doing it automaticly.

 

Thanks,

Kristine

Edited by krobinson

Kristine

Share this post


Link to post
Share on other sites
If I don't have a quanity block set up for the each customer group, I thought it automaticly used "Quanity Block:" setup in the Retail section.

 

However for some reason it is not doing this.

True, in fact it is explicitly reset to "1" if there are no customer group prices/price breaks.

 

If you comment out two lines in the class PriceFormatter, one in the function loadProductSppc and the same line in the function loadProduct I think you changed that behaviour to what you desire (comment out the last line there):

		} // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query))
	$product_info['products_qty_blocks'] = '1';

Share this post


Link to post
Share on other sites

Perfect - That worked. Thank you so much Jan!

 

I could have swore I had it doing that before... I may have even seen this change somewhere & done it previously. I try to log any changes to a file, but I didn't make a note in my priceformatter file that I had changed anything. :blush: Oh well, will try to keep better documentation of what I do. :-"

 

Thanks again

 

Has anyone thought of creating a contribution grouping SPPC, SPPC Price Break, SPPC Hide Product, SPPC Show price list, etc? It took some playing around, but I finally got all of them working (well it appears so anyway) together. I think it would be great to offer it as just one contribution, but I didn't find it anywhere.


Kristine

Share this post


Link to post
Share on other sites
Has anyone thought of creating a contribution grouping SPPC, SPPC Price Break, SPPC Hide Product, SPPC Show price list, etc? It took some playing around, but I finally got all of them working (well it appears so anyway) together. I think it would be great to offer it as just one contribution, but I didn't find it anywhere.

 

Hi,

 

Yes, check Show Price list for SPPC 4.1 v1.0 which support SPPC 4.1.1 with "Quantity Price Breaks" and "Hide Price if 0$ for Quantity Price Breaks". Good luck.


John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites
I all I have install the new B2B add on and all is well except customers need to log on to see any pricing.. can anyone help.
Having seen your double post on this you are apparenlty having trouble with the TotalB2B contribution. That contribution has it's own thread.

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

×