Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

Hi all, great contrib !! :D

 

Anyway, just a quickie...

 

On the product pages, is it possible to indicate in some way that the price being displayed is part of a usergroup?

 

Ie i have assigned some prices to a usergroup on certain products, but i notice that when viewing the catalog, there is no indication as to whether the price is a standard price (on unaffected products), or whether it is a special usergroup price.

 

Perhaps having (wholesale) etc written under the affected prices is possible?

Edited by adiwillow

Share this post


Link to post
Share on other sites
Guest
That error can occur when products_id is not a variable but an array. Check the HTML of the page or do a:

 echo '<pre>Post variables:<br />';
print_r($_POST);
echo '</pre>';

on the page (I think that will work). Perhaps it will give a clue about what products_id is: variable (as it should) or an array.

 

Post variables:

Array

(

[cart_quantity] => Array

(

[0] => 2

)

 

[products_id] => Array

(

[0] => 1673

)

 

[x] => 77

[y] => 17

)

is the return?

Share this post


Link to post
Share on other sites

Hi everybody!

 

I installed the SPPC contribution and it's really great. I configured it so that my retail customers see the prices incl. VAT and my wholesale customers excl. VAT. Now I want to add a rule to the bottom or top of my page which says to which group they belong (retail or wholesale) and if the prices are incl. or excl. VAT. How can I do this?

 

Thanks in advance!

Share this post


Link to post
Share on other sites
is the return?
Hmm, I get a similar post array, but not your error, so this is perfectly valid.

Share this post


Link to post
Share on other sites
Guest

can someone help me with this error !!

 

i just install all the mod and verify but something is missing and can really know where . I change some produts price just to test and see how it works.

 

its the following:

 

when i login as a " VIP " costumers and go to the products that i change price allways getting

 

1146 - Table 'blabla_osc.specials_retail_prices' doesn't exist

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials_retail_prices s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '4' and p2c.categories_id = '124'

 

[TEP STOP]

 

can someone tell what its wrong ... ??? what i missing ??

 

Thz in advanced

best regards.

Mario Vital

Share this post


Link to post
Share on other sites
Guest

forgot to say that i have it defined on the tables file .... so the problem isnt on the define its somewhere else ...

 

:P

Share this post


Link to post
Share on other sites
forgot to say that i have it defined on the tables file .... so the problem isnt on the define its somewhere else
It is automatically made when a retail customer uses a sorting on price in the products_listing (index.php, in a category) or in the advanced_search page. Until then that error will be visible. So try that and you should be fine.

Share this post


Link to post
Share on other sites
The what's new box is in the SPPC package and it gets the special price with the function tep_get_products_special_price. This function is in includes/general.php around line 106 and takes into account the customer group so what you see is not "normal".

 

in reference to retail specials bleeding into the whats new box for logins other than retail.... site (create an account and I will change your status from retail to wholesale if you wish to see the error)

 

JanZ, thank you for the reply.

 

is this the code in includes/functions/general.php that you are referring to? and if so is it correct? lines 91-101 in my file.

 

////
// Return a product's special price (returns nothing if there is no offer)
// TABLES: products
 function tep_get_products_special_price($product_id) {
$product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status");
$product = tep_db_fetch_array($product_query);

return $product['specials_new_products_price'];
 }

////

 

Thanks again, or if anyone could post the matching code for me to compare.


-Dave

Share this post


Link to post
Share on other sites
is this the code in includes/functions/general.php that you are referring to? and if so is it correct? lines 91-101 in my file.
No, you either misplaced the following code or skipped adding accidently:

catalog\includes\functions\general.php

Line 4

**AFTER**
$Id: general.php,v 1.231 2003/07/09 01:15:48 hpdl Exp $

**ADD**
adapted for Separate Pricing Per Customer v4.0 2005/02/08


Line 96

**REPLACE**
$product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status");



**WITH**
// BOF Separate Pricing Per Customer
 global $sppc_customer_group_id;

 if(!tep_session_is_registered('sppc_customer_group_id')) {
 $customer_group_id = '0';
 } else {
 $customer_group_id = $sppc_customer_group_id;
 }

	$product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status and customers_group_id = '" . (int)$customer_group_id . "'");
// EOF Separate_Pricing Per Customer

So it should look like this:

////
// Return a product's special price (returns nothing if there is no offer)
// TABLES: products
 function tep_get_products_special_price($product_id) {
// BOF Separate Pricing Per Customer
 global $sppc_customer_group_id;

 if(!tep_session_is_registered('sppc_customer_group_id')) {
 $customer_group_id = '0';
 } else {
 $customer_group_id = $sppc_customer_group_id;
 }

	$product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status and customers_group_id = '" . (int)$customer_group_id . "'");
// EOF Separate_Pricing Per Customer
$product = tep_db_fetch_array($product_query);

return $product['specials_new_products_price'];
 }

////

Share this post


Link to post
Share on other sites

BLING!! Thank you thank you!!

 

somehow :-" I totally glazed over that entire file edit. It works perfectly now. Thank you for pointing me to the obvious :D -smacks head on desk-

 

Great support here and great contribution! JanZ A++


-Dave

Share this post


Link to post
Share on other sites

Hi Jan,

 

I hope you can help me get my head around this because it is making my head spin.

 

At the moment I am running the PWA contrib which at the moment runs with all groups retail, trade and dropship. What I need is that only retail customers use the Purchase without account and trade and dropship clients have order history which will show up in account.php

 

Also I am planning to create a different create_account page for clients who want to sign up for trade/dropship. Any ideas or advice would be grateful.

 

Also (sorry about this) I use the more_categories contribution and need to exclude certain category boxes from certain groups. I wont post the code now but if you want to have a look at it (again modded to hell) I will post it.

 

Your thoughts would be greatly appreciated as I feel I am making some headway with all of this now.

 

Thanks

 

Mark :thumbsup:


Lifes a bitch, then you marry one, then you die!

Share this post


Link to post
Share on other sites

Hello,

 

I were install the "Wishlist 3.5d".but the wishlist.php show the price was wrong!

 

How can I do?

 

The wishlist.php code just as below:(sorry for my english :blush: )

<?php
/*
 $Id: wishlist.php,v 3.0  2005/04/20 Dennis Blake
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_WISHLIST);

/*******************************************************************
******* ADD PRODUCT TO WISHLIST IF PRODUCT ID IS REGISTERED ********
*******************************************************************/

 if(tep_session_is_registered('wishlist_id')) {
$wishList->add_wishlist($wishlist_id, $attributes_id);

if(WISHLIST_REDIRECT == 'Yes') {
	tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $wishlist_id));
} else {
	tep_session_unregister('wishlist_id');
}
 }


/*******************************************************************
****************** ADD PRODUCT TO SHOPPING CART ********************
*******************************************************************/

 if (isset($HTTP_POST_VARS['add_wishprod'])) {
if(isset($HTTP_POST_VARS['add_prod_x'])) {
	foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
		$product_id = tep_get_prid($value);
		$cart->add_cart($product_id, $cart->get_quantity(tep_get_uprid($product_id, $HTTP_POST_VARS['id'][$value]))+1, $HTTP_POST_VARS['id'][$value]);
	}
}
 }


/*******************************************************************
****************** DELETE PRODUCT FROM WISHLIST ********************
*******************************************************************/

 if (isset($HTTP_POST_VARS['add_wishprod'])) {
if(isset($HTTP_POST_VARS['delete_prod_x'])) {
	foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
		$wishList->remove($value);
	}
}
 }


/*******************************************************************
************* EMAIL THE WISHLIST TO MULTIPLE FRIENDS ***************
*******************************************************************/

 if (isset($HTTP_POST_VARS['email_prod_x'])) {

	$errors = false;
	$guest_errors = "";
	$email_errors = "";
	$message_error = "";

	if(strlen($HTTP_POST_VARS['message']) < '1') {
		$error = true;
		$message_error .= "<div class=\"messageStackError\"><img src=\"images/icons/error.gif\" /> " . ERROR_MESSAGE . "</div>";
	}			

	  if(tep_session_is_registered('customer_id')) {
		$customer_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
		  $customer = tep_db_fetch_array($customer_query);

		$from_name = $customer['customers_firstname'] . ' ' . $customer['customers_lastname'];
		$from_email = $customer['customers_email_address'];
		$subject = $customer['customers_firstname'] . ' ' . WISHLIST_EMAIL_SUBJECT;
		$link = HTTP_SERVER . DIR_WS_CATALOG . FILENAME_WISHLIST_PUBLIC . "?public_id=" . $customer_id;

	//REPLACE VARIABLES FROM DEFINE
		$arr1 = array('$from_name', '$link');
		$arr2 = array($from_name, $link);
		$replace = str_replace($arr1, $arr2, WISHLIST_EMAIL_LINK);
		$message = tep_db_prepare_input($HTTP_POST_VARS['message']);
		$body = $message . $replace;
	} else {
		if(strlen($_POST['your_name']) < '1') {
			$error = true;
			$guest_errors .= "<div class=\"messageStackError\"><img src=\"images/icons/error.gif\" /> " . ERROR_YOUR_NAME . "</div>";
		}
		if(strlen($_POST['your_email']) < '1') {
			$error = true;
			$guest_errors .= "<div class=\"messageStackError\"><img src=\"images/icons/error.gif\" /> " .ERROR_YOUR_EMAIL . "</div>";
		} elseif(!tep_validate_email($_POST['your_email'])) {
			$error = true;
			$guest_errors .= "<div class=\"messageStackError\"><img src=\"images/icons/error.gif\" /> " . ERROR_VALID_EMAIL . "</div>";
		}

		$from_name = stripslashes($_POST['your_name']);
		$from_email = $_POST['your_email'];
		$subject = $from_name . ' ' . WISHLIST_EMAIL_SUBJECT;
		$message = stripslashes($HTTP_POST_VARS['message']);

		$z = 0;
		$prods = "";
		foreach($HTTP_POST_VARS['prod_name'] as $name) {
			$prods .= stripslashes($name) . "  " . stripslashes($HTTP_POST_VARS['prod_att'][$z]) . "\n" . $HTTP_POST_VARS['prod_link'][$z] . "\n\n";
			$z++;
		}
		$body = $message . "\n\n" . $prods . "\n\n" . WISHLIST_EMAIL_GUEST;
	  }

	//Check each posted name => email for errors.
	$j = 0;
	foreach($HTTP_POST_VARS['friend'] as $friendx) {
		if($j == 0) {
			if($friend[0] == '' && $email[0] == '') {
				$error = true;
				$email_errors .= "<div class=\"messageStackError\"><img src=\"images/icons/error.gif\" /> " . ERROR_ONE_EMAIL . "</div>";
			}
		}

		if(isset($friendx) && $friendx != '') {
			if(strlen($email[$j]) < '1') {
				$error = true;
				$email_errors .= "<div class=\"messageStackError\"><img src=\"images/icons/error.gif\" /> " . ERROR_ENTER_EMAIL . "</div>";
			} elseif(!tep_validate_email($email[$j])) {
				$error = true;
				$email_errors .= "<div class=\"messageStackError\"><img src=\"images/icons/error.gif\" /> " . ERROR_VALID_EMAIL . "</div>";
			}
		}

		if(isset($email[$j]) && $email[$j] != '') {
			if(strlen($friendx) < '1') {
				$error = true;
				$email_errors .= "<div class=\"messageStackError\"><img src=\"images/icons/error.gif\" /> " . ERROR_ENTER_NAME . "</div>";
			}
		}
		$j++;
	}
	if($error == false) {
		$j = 0;
		foreach($HTTP_POST_VARS['friend'] as $friendx) {
			if($friendx != '') {
				tep_mail($friendx, $email[$j], $subject, $friendx . ",\n\n" . $body, $from_name, $from_email);
			}

		//Clear Values
			$friend[$j] = "";
			$email[$j] = "";
			$message = "";

			$j++;
		}

		$messageStack->add('wishlist', WISHLIST_SENT, 'success');
	}
 }


$breadcrumb->add(NAVBAR_TITLE_WISHLIST, tep_href_link(FILENAME_WISHLIST, '', '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 (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top">
  <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
  </table>
</td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('wishlist_form', tep_href_link(FILENAME_WISHLIST)); ?>
  <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_wishlist.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('wishlist') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('wishlist'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }


if (is_array($wishList->wishID) && !empty($wishList->wishID)) {
reset($wishList->wishID);

?>
  <tr>
	<td>
	<table border="0" width="100%" cellspacing="0" cellpadding="3" class="productListing">
	  <tr>
			<td class="productListing-heading"><?php echo BOX_TEXT_IMAGE; ?></td>
			<td class="productListing-heading"><?php echo BOX_TEXT_PRODUCT; ?></td>
			<td class="productListing-heading"><?php echo BOX_TEXT_PRICE; ?></td>
			<td class="productListing-heading" align="center"><?php echo BOX_TEXT_SELECT; ?></td>
	  </tr>

<?php
	$i = 0;
	while (list($wishlist_id, ) = each($wishList->wishID)) {

		$product_id = tep_get_prid($wishlist_id);

		$products_query = tep_db_query("select pd.products_id, pd.products_name, pd.products_description, p.products_image, p.products_status, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where pd.products_id = '" . $product_id . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' order by products_name");
		$products = tep_db_fetch_array($products_query);

		  if (($i/2) == floor($i/2)) {
			$class = "productListing-even";
		  } else {
			$class = "productListing-odd";
		  }

?>
			  <tr class="<?php echo $class; ?>">
				<td valign="top" class="productListing-data" align="left"><a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $wishlist_id, 'NONSSL'); ?>"><?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); ?></a></td>
				<td valign="top" class="productListing-data" align="left" class="main"><b><a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $wishlist_id, 'NONSSL'); ?>"><?php echo $products['products_name']; ?></a></b>
				<input type="hidden" name="prod_link[]" value="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $wishlist_id, 'NONSSL'); ?>" />
				<input type="hidden" name="prod_name[]" value="<?php echo $products['products_name']; ?>" />
<?php



/*******************************************************************
******** THIS IS THE WISHLIST CODE FOR PRODUCT ATTRIBUTES  *********
*******************************************************************/

			  $attributes_addon_price = 0;

			  // Now get and populate product attributes
				$att_name = "";
				if (isset($wishList->wishID[$wishlist_id]['attributes'])) {
					while (list($option, $value) = each($wishList->wishID[$wishlist_id]['attributes'])) {
						  echo tep_draw_hidden_field('id[' . $wishlist_id . '][' . $option . ']', $value);

	 					$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
								  from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
								  where pa.products_id = '" . $wishlist_id . "'
								   and pa.options_id = '" . $option . "'
								   and pa.options_id = popt.products_options_id
								   and pa.options_values_id = '" . $value . "'
								   and pa.options_values_id = poval.products_options_values_id
								   and popt.language_id = '" . $languages_id . "'
								   and poval.language_id = '" . $languages_id . "'");
						$attributes_values = tep_db_fetch_array($attributes);

				   		if ($attributes_values['price_prefix'] == '+') {
							$attributes_addon_price += $attributes_values['options_values_price'];
				   		} else if($attributes_values['price_prefix'] == '-') {
					 		$attributes_addon_price -= $attributes_values['options_values_price'];
						}
						$att_name .= " (" . $attributes_values['products_options_name'] . ": " . $attributes_values['products_options_values_name'] . ") ";
				   		echo '<br /><small><i> ' . $attributes_values['products_options_name'] . ': ' . $attributes_values['products_options_values_name'] . '</i></small>';
					} // end while attributes for product

				}

				echo '<input type="hidden" name="prod_att[]" value="' . $att_name . '" />';

			   	if (tep_not_null($products['specials_new_products_price'])) {
			   		$products_price = '<s>' . $currencies->display_price($products['products_price']+$attributes_addon_price, tep_get_tax_rate($products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($products['specials_new_products_price']+$attributes_addon_price, tep_get_tax_rate($products['products_tax_class_id'])) . '</span>';
			   	} else {
				   	$products_price = $currencies->display_price($products['products_price']+$attributes_addon_price, tep_get_tax_rate($products['products_tax_class_id']));
				}

/*******************************************************************
******* CHECK TO SEE IF PRODUCT HAS BEEN ADDED TO THEIR CART *******
*******************************************************************/

		if($cart->in_cart($wishlist_id)) {
			echo '<br /><font color="#FF0000"><b>' . TEXT_ITEM_IN_CART . '</b></font>';
		}

/*******************************************************************
********** CHECK TO SEE IF PRODUCT IS NO LONGER AVAILABLE **********
*******************************************************************/

  			if($products['products_status'] == 0) {
  				echo '<br /><font color="#FF0000"><b>' . TEXT_ITEM_NOT_AVAILABLE . '</b></font>';
		  }

		$i++;
?>
		</td>
		<td valign="top" class="productListing-data"><?php echo $products_price; ?></td>
		<td valign="top" class="productListing-data" align="center">
<?php

/*******************************************************************
* PREVENT THE ITEM FROM BEING ADDED TO CART IF NO LONGER AVAILABLE *
*******************************************************************/

		if($products['products_status'] != 0) {
			echo tep_draw_checkbox_field('add_wishprod[]',$wishlist_id);
		}
?>
		</td>
	  </tr>

<?php
	}
?>
	</table>
	</td>
  </tr>
  <tr>
	<td align="right"><br /><?php echo tep_image_submit('button_delete.gif', 'Delete From Wishlist', 'name="delete_prod" value="delete_prod"') . " " . tep_image_submit('button_in_cart.gif', 'Add to Cart', 'name="add_prod" value="add_prod"'); ?></td>
	  </tr>
</table>
<?php

/*******************************************************************
*********** CODE TO SPECIFY HOW MANY EMAILS TO DISPLAY *************
*******************************************************************/


if(!tep_session_is_registered('customer_id')) {

?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><?php echo WISHLIST_EMAIL_TEXT_GUEST; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td align="center">
		<table border="0" width="400px" cellspacing="0" cellpadding="2">
		  <tr>
			<td class="main" colspan="2"><table cellpadding="2" cellspacing="0">
			  <tr>
				<td colspan="2"><?php echo $guest_errors; ?></td>
			  </tr>
			  <tr>
				<td class="main"><?php echo TEXT_YOUR_NAME; ?></td>
				<td class="main"><?php echo tep_draw_input_field('your_name', $your_name); ?></td>
				</tr>
				<tr>
				<td class="main"><?php echo TEXT_YOUR_EMAIL; ?></td>
				<td class="main"><?php echo tep_draw_input_field('your_email', $your_email); ?></td>
				</tr>
			</table></td>
		  </tr>
		  <tr>
			<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td colspan="2"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td>
		  </tr>
		  <tr>
			<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
<?php 

} else {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><?php echo WISHLIST_EMAIL_TEXT; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td align="center">
		<table border="0" width="400px" cellspacing="0" cellpadding="2">

<?php

}

?>
		  <tr>
			<td colspan="2"><?php echo $email_errors; ?></td>
		  </tr>
<?php

$email_counter = 0;
while($email_counter < DISPLAY_WISHLIST_EMAILS) {
?>
		  <tr>
			<td class="main"><?php echo TEXT_NAME; ?>??<?php echo tep_draw_input_field('friend[]', $friend[$email_counter]); ?></td>
			<td class="main"><?php echo TEXT_EMAIL; ?>??<?php echo tep_draw_input_field('email[]', $email[$email_counter]); ?></td>
		  </tr>
<?php
$email_counter++;
}
?>
		  <tr>
			<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr>
		  <tr>
			<td colspan="2"><?php echo $message_error; ?></td>
		  </tr>
		  <tr>
			<td colspan="2" class="main"><?php echo TEXT_MESSAGE .  tep_draw_textarea_field('message', 'soft', 45, 5); ?></td>
		  </tr>
		  <tr>
			<td colspan="2" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE, 'name="email_prod" value="email_prod"'); ?></td>

		  </tr>
		</table>
	</td>
  </tr>
</table>
</form>
<?php

} else { // Nothing in the customers wishlist

?>
 <tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="main"><?php echo BOX_TEXT_NO_ITEMS;?></td>
	  </tr>
	</table>
	</td>
  </tr>
</table>
</td>
 </tr>
</table>
</form>

<?php 
}
?>
<!-- customer_wishlist_eof //-->
</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'); ?>

 

Please help me!

Thanks very much!!

 

Sophina

Share this post


Link to post
Share on other sites

I'm hoping this one might be a simple one or two. Installed SPPC 411 on a heavily moded cart.

 

#1. I can't get my group settings or check mark for offered groups to hold when I add a new product through admin. Any ideas?

#2. Are we not allowed to delete the Retail group? It tells me I am not allowed to delete this group

 

 

Any help would be greatly appreciated. Of and sophina, how did you resovle that?

 

thanks again everyone

Share this post


Link to post
Share on other sites

Mark,

At the moment I am running the PWA contrib which at the moment runs with all groups retail, trade and dropship. What I need is that only retail customers use the Purchase without account and trade and dropship clients have order history which will show up in account.php
I am not familiar with the code of PWA, but as far as I know it doesn't exclude logging-in/using a created account does it?

 

Also I am planning to create a different create_account page for clients who want to sign up for trade/dropship. Any ideas or advice would be grateful.
I wouldn't. The create_acccount page already facilitates that with the tax_id number that will set off the alarm bells (OK, can send you an email/sets an alert on the customers page). Instead of using the tax_id number you can use something else (like a checkbox or whatever) to do the same thing.
Also (sorry about this) I use the more_categories contribution and need to exclude certain category boxes from certain groups. I wont post the code now but if you want to have a look at it (again modded to hell) I will post it.
Never seen that contribution, but not including a box depending on the customer group id should be pretty straightforward.

Share this post


Link to post
Share on other sites
#1. I can't get my group settings or check mark for offered groups to hold when I add a new product through admin. Any ideas?
Hard to say. Might be that you have a modified categories.php page and something was forgotten in adding the new code, or misplaced. I would try to use the categories.php page from the package and see if that works OK. If so it might give a clue to where the problem is if you do a file compare, or try to add the code for the other contributions to the categories.php of the package.
#2. Are we not allowed to delete the Retail group? It tells me I am not allowed to delete this group
No you can't. It is a default group for visitors who have not (yet) logged-in. If the visitor is not logged-in it will assume he/she is in the retail group and show them those prices (could even be zero and then hidden, together with buy-now buttons). You do can rename the group.

Share this post


Link to post
Share on other sites
Hard to say. Might be that you have a modified categories.php page and something was forgotten in adding the new code, or misplaced. I would try to use the categories.php page from the package and see if that works OK. If so it might give a clue to where the problem is if you do a file compare, or try to add the code for the other contributions to the categories.php of the package.

No you can't. It is a default group for visitors who have not (yet) logged-in. If the visitor is not logged-in it will assume he/she is in the retail group and show them those prices (could even be zero and then hidden, together with buy-now buttons). You do can rename the group.

 

thanks janz. i'll post and document my mistake of being a dumbass somehow at the outcome of this one.

Share this post


Link to post
Share on other sites
Is it possible to have more than one extra group? For example, I have both a wholesale and distributor group that need different pricing than retail.

Also.... Is it possible to have an admin editing tool for the groups? Just a thought. I don't have enough knowledge in this area to make something like this yet.

That all being said - THANK YOU SO MUCH for this great modification!!

Have a great day!

Heather

 

hey..

hi can you tell me what was that solution for the groups on the admin???

 

thank you very much

 

nch

Share this post


Link to post
Share on other sites

seeing as no-one seems to know about my earlier question (the one about having wholesale prices marked as being somehow).

 

Does anyone know if there is a way to tell the customer what customer type they are in an infobox or something?

 

eg... "You are logged in as a trade customer, all prices indicated are wholesale prices'

 

ta very muchly... :D

Share this post


Link to post
Share on other sites
Guest

Hoping someone can help with this, I'm having a brainfreeze.

 

I am trying to merge SPPC with MVS and can't seem to figure out how to do this with classes/vendor_shipping.php

this line

$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

 

is replced with this:

 

// BOF Separate Pricing Per Customer, next line original code
 //   $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
 global $sppc_customer_group_id, $customer_id;
 if(!tep_session_is_registered('sppc_customer_group_id')) {
 $customer_group_id = '0';
 } else {
  $customer_group_id = $sppc_customer_group_id;
 }
  $customer_shipment_query = tep_db_query("select IF(c.customers_shipment_allowed <> '', c.customers_shipment_allowed, cg.group_shipment_allowed) as shipment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id =  '" . $customer_group_id . "'");
  if ($customer_shipment = tep_db_fetch_array($customer_shipment_query)  ) {
   if (tep_not_null($customer_shipment['shipment_allowed']) ) {
  $temp_shipment_array = explode(';', $customer_shipment['shipment_allowed']);
  $installed_modules = explode(';', MODULE_SHIPPING_INSTALLED);
  for ($n = 0; $n < sizeof($installed_modules); $n++) {
	  // check to see if a shipping module is not de-installed
	  if ( in_array($installed_modules[$n], $temp_shipment_array ) ) {
		  $shipment_array[] = $installed_modules[$n];
	  }
  } // end for loop
  $this->modules = $shipment_array;
  } else {
   $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
  }
  } else { // default
   $this->modules = explode(';', MODULE_SHIPPING_INSTALLED);
  }
 // EOF Separate Pricing Per Customer

 

so how do I merge that with this?

	function shipping($module = '') {
  global $language, $PHP_SELF, $cart;

  $installed_modules_array = array();
		//Get the vendors_id for each vendor in the database
  $vendors_data_query = tep_db_query("select vendors_id from " . TABLE_VENDORS);
  while ($vendors_data = tep_db_fetch_array($vendors_data_query)) {;
	$vendors_id = $vendors_data['vendors_id'];
	$installed_modules = @constant ('MODULE_VENDOR_SHIPPING_INSTALLED_' . $vendors_id);

	if (isset ($installed_modules) && tep_not_null ($installed_modules)) {
	  $modules_array = explode(';', $installed_modules);
	  $this->modules[$vendors_id] = $modules_array;

	  foreach ($modules_array as $module_name) {
		//if the module is not already in the array, add it in
		if (!in_array ($module_name, $installed_modules_array)) {  
		  $installed_modules_array[] = $module_name;
		}//if !in_array
	  }//foreach
	}//if isset
  }//while

Share this post


Link to post
Share on other sites

Marc,

Hoping someone can help with this, I'm having a brainfreeze.

 

I am trying to merge SPPC with MVS and can't seem to figure out how to do this with classes/vendor_shipping.php

this line

$this->modules = explode(';', MODULE_SHIPPING_INSTALLED);

 

is replaced with this:

If you are not planning on offering different shipping options to different groups just forget that whole SPPC code. What it does is looking up which modules should be loaded for the customer group that particular customer belongs too, but if you are not using that feature just use the MVS code and it should not give any trouble with SPPC.

Share this post


Link to post
Share on other sites
Does anyone know if there is a way to tell the customer what customer type they are in an infobox or something?

 

eg... "You are logged in as a trade customer, all prices indicated are wholesale prices'

Have you looked at TAX INFO FOR SPPC? I'm sure you will find good code examples for that in there. It is pretty simple. Just make sure the customer_group_id is available. If not use the:

	// BOF Separate Price per Customer
if(!tep_session_is_registered('sppc_customer_group_id')) { 
$customer_group_id = '0';
} else {
 $customer_group_id = $sppc_customer_group_id;
}
 // EOF Separate Price per Customer

and then

if ($customer_group_id == '1' ) { //
echo 'This is what you want to show with customer group 1';
} else {
echo 'Default code, customer group 0 = Retail';
}

Share this post


Link to post
Share on other sites
Marc,

If you are not planning on offering different shipping options to different groups just forget that whole SPPC code. What it does is looking up which modules should be loaded for the customer group that particular customer belongs too, but if you are not using that feature just use the MVS code and it should not give any trouble with SPPC.

 

Jan,

I am trying to add this code from Nulti Vendor shipping to the priceformatter.php. Can you tell me if I have the syntax correct?

 

$sql = "select pd.products_name, p.products_model, p.products_image, p.products_id," .

" p.products_price, p.products_weight," .

" p.products_price1,p.products_price2,p.products_price3,p.products_price4, p.products_price5,p.products_price6,p.products_price7,p.products_price8," .

" p.products_price1_qty,p.products_price2_qty,p.products_price3_qty,p.products_pri

ce4_qty, p.products_price5_qty,p.products_price6_qty,p.products_price7_qty,p.products_pri

ce8_qty," .

" p.products_qty_blocks," .

" p.products_tax_class_id," .

" v.vendors_id," .

" v.vendors_name ," .

" NULL as specials_new_products_price" .

" from " . TABLE_PRODUCTS_DESCRIPTION . " pd," .

" " . TABLE_PRODUCTS . " p" .

" " . TABLE_VENDORS . " v" .

" where p.products_status = '1'" .

" and v.vendors_id = p.vendors_id"

" and p.products_id = '" . (int)$product_id . "'" .

" and pd.products_id = '" . (int)$product_id . "'" .

" and pd.language_id = '". (int)$language_id ."'";

$product_info_query = tep_db_query($sql);

$product_info = tep_db_fetch_array($product_info_query);

// BOF add List Price (retail price) to the product_info array

$product_info['list_price'] = $product_info['products_price'];

// EOF add List Price

Share this post


Link to post
Share on other sites

Just installed "Show Price list v.3.5 for SPPC 4.1.1 version 3.5". (For SPPC 4.1.1 with "Hide Price if 0$" only)

Works great, I just have one stupid question:

I want to hide all occurances of $0, not only for wholesale but for guests too, in product_info and the product listing. What am I gonna do?

Now I have to hide the products for guest and retail when all I want to do is hide the $0...

Any ideas?

Share this post


Link to post
Share on other sites
Just installed "Show Price list v.3.5 for SPPC 4.1.1 version 3.5". (For SPPC 4.1.1 with "Hide Price if 0$" only)

Works great, I just have one stupid question:

I want to hide all occurances of $0, not only for wholesale but for guests too, in product_info and the product listing. What am I gonna do?

Now I have to hide the products for guest and retail when all I want to do is hide the $0...

Any ideas?

 

What do you want to say ? You mean you see )$ instead of a message like comming soon, if yes, you have miss something in the instructions.... Repeat all the steps and double check if you have do everything in the correct order. Good luck.


John

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

osCommerce 2.3.4 Bootstrap Edge

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

×