Jump to content
scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

Janz,

 

I see that you are occupied on the forum, good for the OsCommerce community that you are here for help.

 

I'm working on "Hide Price if $0" to add another module for the SPPC 4.1.1 jewels for working good together and it's all done finished or almost but I have a little thing who bugs me... :blink:

 

I use the version "Hide Price if $0 v.2", the only thing is when I put 0 in the admin side, the button Buy dissapear but we see 0 on the side store for customer. I want to see nothing. I'm finishing the hardcoding now for the language and after if you want , I can't send you tomorrow the zip file to test and you will see what I mean.

 

I would like to say by the way that SPPC 4.1.1 is the best add-on of OsCommerce. We have to work to adapt all we can to this contribution. :thumbsup:

Edited by Jeep_ice

John

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

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites

Jeep. I'm using the hide if $0 mod with SPPC now, Jan helped me a while back. Jan was able to edit the

PriceFormatter.php which is used w/ SPPC price breaks to allow me to not only hide prices, but display the message 'Authorized Dealers Only' when the price was set to zero. Here is a link of how i'm using it now...

http://blackwidowsecurity.com/store/alarm-...ty-c-36_38.html

 

Guests/ Retail customers can not by the modules, only accessories... but when signed on as a vendor the prices show up and allow checkout.

 

Here is the PriceFormatter.php i'm using, but if you need any other files let me know...

 

Nate

 

 

<?php
/*
 $Id: PriceFormatter.php,v 1.6 2003/06/25 08:29:26 petri Exp $
 adapted for Separate Pricing Per Customer v4 2005/03/20
 including an optimization to avoid double queries for the same info

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

/*
PriceFormatter.php - module to support quantity pricing

Created 2003, Beezle Software based on some code mods by WasaLab Oy (Thanks!)
*/

class PriceFormatter {
 var $hiPrice;
 var $lowPrice;
 var $quantity;
 var $hasQuantityPrice;

 function PriceFormatter($prices=NULL) {
$this->productsID = -1;

$this->hasQuantityPrice=false;
$this->hasSpecialPrice=false;

$this->hiPrice=-1;
$this->lowPrice=-1;

for ($i=1; $i<=8; $i++){
  $this->quantity[$i] = -1;
  $this->prices[$i] = -1;
}
$this->thePrice = -1;
$this->specialPrice = -1;
$this->qtyBlocks = 1;

if($prices)
  $this->parse($prices);
 }

 function encode() {
$str = $this->productsID . ":"
	   . (($this->hasQuantityPrice == true) ? "1" : "0") . ":"
	   . (($this->hasSpecialPrice == true) ? "1" : "0") . ":"
	   . $this->quantity[1] . ":"
	   . $this->quantity[2] . ":"
	   . $this->quantity[3] . ":"
	   . $this->quantity[4] . ":"
	   . $this->quantity[5] . ":"
	   . $this->quantity[6] . ":"
	   . $this->quantity[7] . ":"
	   . $this->quantity[8] . ":"
	   . $this->price[1] . ":"
	   . $this->price[2] . ":"
	   . $this->price[3] . ":"
	   . $this->price[4] . ":"
	   . $this->price[5] . ":"
	   . $this->price[6] . ":"
	   . $this->price[7] . ":"
	   . $this->price[8] . ":"
	   . $this->thePrice . ":"
	   . $this->specialPrice . ":"
	   . $this->qtyBlocks . ":"
	   . $this->taxClass;
return $str;
 }

 function decode($str) {
list($this->productsID,
	 $this->hasQuantityPrice,
	 $this->hasSpecialPrice,
	 $this->quantity[1],
	 $this->quantity[2],
	 $this->quantity[3],
	 $this->quantity[4],
	 $this->quantity[5],
	 $this->quantity[6],
	 $this->quantity[7],
	 $this->quantity[8],
	 $this->price[1],
	 $this->price[2],
	 $this->price[3],
	 $this->price[4],
	 $this->price[5],
	 $this->price[6],
	 $this->price[7],
	 $this->price[8],
	 $this->thePrice,
	 $this->specialPrice,
	 $this->qtyBlocks,
	 $this->taxClass) = explode(":", $str);

$this->hasQuantityPrice = (($this->hasQuantityPrice == 1) ? true : false);
$this->hasSpecialPrice = (($this->hasSpecialPrice == 1) ? true : false);
 }

 function parse($prices) {
$this->productsID = $prices['products_id'];
$this->hasQuantityPrice=false;
$this->hasSpecialPrice=false;

$this->quantity[1]=$prices['products_price1_qty'];
$this->quantity[2]=$prices['products_price2_qty'];
$this->quantity[3]=$prices['products_price3_qty'];
$this->quantity[4]=$prices['products_price4_qty'];
$this->quantity[5]=$prices['products_price5_qty'];
$this->quantity[6]=$prices['products_price6_qty'];
$this->quantity[7]=$prices['products_price7_qty'];
$this->quantity[8]=$prices['products_price8_qty'];

$this->thePrice=$prices['products_price'];
$this->specialPrice=$prices['specials_new_products_price'];
$this->hasSpecialPrice=tep_not_null($this->specialPrice);

$this->price[1]=$prices['products_price1'];
$this->price[2]=$prices['products_price2'];
$this->price[3]=$prices['products_price3'];
$this->price[4]=$prices['products_price4'];
$this->price[5]=$prices['products_price5'];
$this->price[6]=$prices['products_price6'];
$this->price[7]=$prices['products_price7'];
$this->price[8]=$prices['products_price8'];


 /*
   Change support special prices
   If any price level has a price greater than the special
   price lower it to the special price
*/
if ($this->hasSpecialPrice == true) {
	for($i=1; $i<=8; $i++) {
		if ($this->price[$i] > $this->specialPrice)
			$this->price[$i] = $this->specialPrice;
	}
}
//end changes to support special prices

$this->qtyBlocks=$prices['products_qty_blocks'];

$this->taxClass=$prices['products_tax_class_id'];

if ($this->quantity[1] > 0) {
  $this->hasQuantityPrice = true;
  $this->hiPrice = $this->thePrice;
  $this->lowPrice = $this->thePrice;

  for($i=1; $i<=8; $i++) {
if($this->quantity[$i] > 0) {
  if ($this->price[$i] > $this->hiPrice) {
	$this->hiPrice = $this->price[$i];
  }
  if ($this->price[$i] < $this->lowPrice) {
	$this->lowPrice = $this->price[$i];
  }
}
  }
}
 }
 // function loadProductSppc is Separate Pricing Per Customer only
 function loadProductSppc($product_id, $language_id=1, $product_info)
 {

 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;
 }
 if ($customer_group_id != '0') {
  $customer_group_price_query = tep_db_query("select customers_group_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$product_id. "' and customers_group_id =  '" . $customer_group_id . "'");

	if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
	$product_info['products_price']= $customer_group_price['customers_group_price'];
for ($i = 1; $i < 9; $i++) {
	$product_info['products_price'.$i.''] = $customer_group_price['products_price'.$i.''];
	$product_info['products_price'.$i.'_qty'] = $customer_group_price['products_price'.$i.'_qty'];
} // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query))
$product_info['products_qty_blocks'] = $customer_group_price['products_qty_blocks'];
} else { // there is no price for the item in products_groups: retail price breaks need to nulled
	for ($i = 1; $i < 9; $i++) {
	$product_info['products_price'.$i.''] = '0.0000';
	$product_info['products_price'.$i.'_qty'] = '0';
	} // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query))
	$product_info['products_qty_blocks'] = '1';
}
 } // end if ($customer_group_id != '0')
 // now get the specials price for this customer_group and add it to product_info array
 $special_price_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = " . (int)$product_id . " and status ='1' and customers_group_id = '" . $customer_group_id . "'");
 if ($specials_price = tep_db_fetch_array($special_price_query)) {
  $product_info['specials_new_products_price'] = $specials_price['specials_new_products_price'];
 }

$this->parse($product_info);
return $product_info;
 }

function loadProduct($product_id, $language_id=1)
 {
 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;
 }

$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," .
	" NULL as specials_new_products_price" .
	" from " . TABLE_PRODUCTS_DESCRIPTION . " pd," .
	"	  " . TABLE_PRODUCTS . " p" .
	" where p.products_status = '1'" .
	"   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);

 if ($customer_group_id != '0') {
  $customer_group_price_query = tep_db_query("select customers_group_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$product_id. "' and customers_group_id =  '" . $customer_group_id . "'");

	if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
	$product_info['products_price']= $customer_group_price['customers_group_price'];
for ($i = 1; $i < 9; $i++) {
	$product_info['products_price'.$i.''] = $customer_group_price['products_price'.$i.''];
	$product_info['products_price'.$i.'_qty'] = $customer_group_price['products_price'.$i.'_qty'];
} // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query))
$product_info['products_qty_blocks'] = $customer_group_price['products_qty_blocks'];
} else { // there is no price for the item in products_groups: retail price breaks need to nulled
	for ($i = 1; $i < 9; $i++) {
	$product_info['products_price'.$i.''] = '0.0000';
	$product_info['products_price'.$i.'_qty'] = '0';
	} // end if ($customer_group_price = tep_db_fetch_array($customer_group_price_query))
	$product_info['products_qty_blocks'] = '1';
}
 } // end if ($customer_group_id != '0')
 // now get the specials price for this customer_group and add it to product_info array
 $special_price_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = " . (int)$product_id . " and status ='1' and customers_group_id = '" . $customer_group_id . "'");
 if ($specials_price = tep_db_fetch_array($special_price_query)) {
  $product_info['specials_new_products_price'] = $specials_price['specials_new_products_price'];
 }

$this->parse($product_info);
return $product_info;
 }

 function computePrice($qty)
 {
$qty = $this->adjustQty($qty);

// Compute base price, taking into account the possibility of a special
$price = ($this->hasSpecialPrice === TRUE) ? $this->specialPrice : $this->thePrice;

for ($i=1; $i<=8; $i++)
	if (($this->quantity[$i] > 0) && ($qty >= $this->quantity[$i]))
		$price = $this->price[$i];

return $price;
 }

 function adjustQty($qty) {
// Force QTY_BLOCKS granularity
$qb = $this->getQtyBlocks();
if ($qty < 1)
	$qty = 1;

if ($qb >= 1)
{
	if ($qty < $qb)
		$qty = $qb;

	if (($qty % $qb) != 0)
		$qty += ($qb - ($qty % $qb));
}
return $qty;
 }

 function getQtyBlocks() {
return $this->qtyBlocks;
 }

 function getPrice() {
return $this->thePrice;
 }

 function getLowPrice() {
return $this->lowPrice;
 }

 function getHiPrice() {
return $this->hiPrice;
 }

 function hasSpecialPrice() {
return $this->hasSpecialPrice;
 }

 function hasQuantityPrice() {
return $this->hasQuantityPrice;
 }

 function getPriceString($style='productPriceInBox') {
global $currencies;

 if ($this->thePrice > 0 ) { // BOF "Hide Price if $0" modification
if ($this->hasSpecialPrice == true) {
	$lc_text = '<table align="top" border="1" cellspacing="0" cellpadding="0">';
	$lc_text .= '<tr><td align="center" class=' . $style. ' colspan="2">';
	  $lc_text .= ' <s>'
	. $currencies->display_price($this->thePrice,
				 tep_get_tax_rate($this->taxClass))
	. '</s>  <span class="productSpecialPrice">'
	. $currencies->display_price($this->specialPrice,
				 tep_get_tax_rate($this->taxClass))
	. '</span> '
	.'</td></tr>';
}
else
{
	$lc_text = '<table align="top" border="1" cellspacing="0" cellpadding="0">';
	$lc_text .= '<tr><td align="center" class=' . $style. ' colspan="2">'
	. $currencies->display_price($this->thePrice,
	tep_get_tax_rate($this->taxClass))
	. '</td></tr>';
}
  // If you want to change the format of the price/quantity table
  // displayed on the product information page, here is where you do it.

if($this->hasQuantityPrice == true) {
	for($i=1; $i<=8; $i++) {
		if($this->quantity[$i] > 0) {
			$lc_text .= '<tr><td class='.$style.'>'
			. $this->quantity[$i]
			.'+ </td><td class='.$style.'>'
			. $currencies->display_price($this->price[$i],
			tep_get_tax_rate($this->taxClass))
			.'</td></tr>';
		}
	}

	$lc_text .= '</table>';

  }
  else {
	if ($this->hasSpecialPrice == true) {
		$lc_text = ' <s>'
		  . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass))
		  . '</s>  <span class="productSpecialPrice">'
		  . $currencies->display_price($this->specialPrice, tep_get_tax_rate($this->taxClass))
		  . '</span> ';
	}
	else {
		$lc_text = ' '
		  . $currencies->display_price($this->thePrice,
				   tep_get_tax_rate($this->taxClass))
		  . ' ';
	}
	  }
 } else {
  $lc_text = 'Call for Price';
 } // EOF "Hide Price if $0" modification

return $lc_text;
 }

 function getPriceStringShort() {
global $currencies;

  if ($this->thePrice > 0 ) { // BOF "Hide Price if $0" modification
if ($this->hasSpecialPrice == true) {
  $lc_text = ' <s>'
. $currencies->display_price($this->thePrice,
				 tep_get_tax_rate($this->taxClass))
. '</s>  <span class="productSpecialPrice">'
. $currencies->display_price($this->specialPrice,
				 tep_get_tax_rate($this->taxClass))
. '</span> ';
}
else {
  if($this->hasQuantityPrice == true) {
$lc_text = ' '
  . $currencies->display_price($this->lowPrice,
				   tep_get_tax_rate($this->taxClass))
  . ' - '
  . $currencies->display_price($this->hiPrice,
				   tep_get_tax_rate($this->taxClass))
  . ' ';
  }
  else {
$lc_text = ' '
  . $currencies->display_price($this->thePrice,
				   tep_get_tax_rate($this->taxClass))
  . ' ';
  }
}
 } else {
  $lc_text = 'Call for Price';
 } // EOF "Hide Price if $0" modification
return $lc_text;
 }
}

?>

Share this post


Link to post
Share on other sites
Jeep. I'm using the hide if $0 mod with SPPC now, Jan helped me a while back. Jan was able to edit the

PriceFormatter.php which is used w/ SPPC price breaks to allow me to not only hide prices, but display the message 'Authorized Dealers Only' when the price was set to zero. Here is a link of how i'm using it now...

http://blackwidowsecurity.com/store/alarm-...ty-c-36_38.html

 

Guests/ Retail customers can not by the modules, only accessories... but when signed on as a vendor the prices show up and allow checkout.

 

Nate,

 

Thank you very much for that info, I will check this and melt with what I have done and give news about this Friday or in the next day. :rolleyes:

 

Best regards,


John

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

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites

I've installed installed this module into my shop. I have 2 groups. Retail & trade. I dont sell all my stock to trade. Is there a way of setting which items traders can purchase?

 

Cheers,

 

ash.

Share this post


Link to post
Share on other sites
I've installed installed this module into my shop. I have 2 groups. Retail & trade. I dont sell all my stock to trade. Is there a way of setting which items traders can purchase?
There is Hide products from customer groups for SPPC. You also might be interested in Easy Populate for SPPC and Hide Products from Customer Groups, Best Sellers Content Box for SPPC with Hide Products, and Previous/Next for Product Sort and Hide products from groups.

 

In this particular case your traders would be able to see all the products, but the moment they login they are hidden (and blocked from being added to the shopping cart too, if they would try to add it through manally editing a url).

Share this post


Link to post
Share on other sites

Hi,

 

I have the need to know in a column on the admin/orders.php directly what group an order is made by :

 

|Custumers|Customer Group|

|Customer1 |Retail|

|Customer2 |Club|

|Customer3 |Association|

etc

 

I have very little knowledge in php and would like to know if someone has the answer to this one.

 

Thank you in advance.

All the Best.

Great MOD.

Edited by mat123slade

Share this post


Link to post
Share on other sites
I have the need to know in a column on the admin/orders.php directly what group an order is made by :

What about:

admin/includes/languages/english/orders.php

Line 4

**AFTER**

 $Id: orders.php,v 1.112 2003/06/29 22:50:52 hpdl Exp $

**ADD**
 adapted for Separate Pricing Per Customer v4 2005/12/10

Line 13

**AFTER**

define('HEADING_TITLE', 'Orders');

**ADD**

// BOF Separate Pricing Per Customer
define('TABLE_HEADING_CUSTOMERS_GROUPS', 'Customer?Group');
// EOF Separate Pricing Per Customer

admin/orders.php

Line 342-387

**REPLACE** (number of lines left out)

  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr class="dataTableHeadingRow">
			<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
			<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
			<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
			<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
			<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>?</td>
		  </tr>
<?php
if (isset($HTTP_GET_VARS['cID'])) {
.
.
.
.
.
<?php
}
?>
		  <tr>
			<td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>

**WITH**

  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr class="dataTableHeadingRow">
			<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td><!-- next td added for SPPC -->
	<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS_GROUPS; ?></td>
			<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
			<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
			<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
			<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>?</td>
		  </tr>
<?php
if (isset($HTTP_GET_VARS['cID'])) {
	// BOF Separate Pricing Per Customer
  $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);
  $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cg.customers_group_name from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) left join " . TABLE_CUSTOMERS . " c on c.customers_id = o.customers_id left join " . TABLE_CUSTOMERS_GROUPS . " cg using(customers_group_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC";
} elseif (isset($HTTP_GET_VARS['status'])) {
  $status = tep_db_prepare_input($HTTP_GET_VARS['status']);
  $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cg.customers_group_name from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) left join " . TABLE_CUSTOMERS . " c on c.customers_id = o.customers_id left join " . TABLE_CUSTOMERS_GROUPS . " cg using(customers_group_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC";
} else {
  $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cg.customers_group_name from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) left join " . TABLE_CUSTOMERS . " c on c.customers_id = o.customers_id left join " . TABLE_CUSTOMERS_GROUPS . " cg using(customers_group_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC";
  // EOF Separate Pricing Per Customer
}
$orders_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows);
$orders_query = tep_db_query($orders_query_raw);
while ($orders = tep_db_fetch_array($orders_query)) {
if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID']) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']))) && !isset($oInfo)) {
	$oInfo = new objectInfo($orders);
  }

  if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
	echo '			  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n";
  } else {
	echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n";
  }
?>
			<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a>?' . $orders['customers_name']; ?></td><!-- next td added for SPPC -->
	<td class="dataTableContent"><?php echo $orders['customers_group_name']; ?></td>
			<td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
			<td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>
			<td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>
			<td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>?</td>
		  </tr>
<?php
}
?>
		  <tr><!-- next colspan from 5 to 6 for SPPC -->
			<td colspan="6"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>

Share this post


Link to post
Share on other sites

As usual on this topic, as usual from you JanZ, a perfect answer to my question.

Thanks a lot. A great help, that will cut down on a lot of time spent identifying type of customer for each individual order !

 

I think it would be great to implement this in the next release, if such a release is planned.

 

One last question. Is anyone, working on adapting seperate pricing per customer for the ZenCart Application ?

 

Thank you again for your help.

All the Best.

Share this post


Link to post
Share on other sites
right a couple of bugs, which are major. on the whats new. the add to cart button does not work
Nothing comes to mind really. Form opening and closing tags are still in the right place?

Share this post


Link to post
Share on other sites

Hey there,

91 pages are a ton to sort through... and I haven't been able to find the 'Pictorial Overview of Separate Pricing' as stated here:

 

A complete overview of what this contribution does and how it works can be seen in the 'Pictorial Overview of Separate Pricing' folder that is included in the 4.1 release of March 15, 2005.

 

Since it is no longer available here:

 

Seperate Pricing Per Customer

 

Also, if I want the newest version, should I download this one:

 

Version 4.1.1.: Completo + Idioma Espa?ol

 

Because I don't see another download that says it has the 4.1.1 complete package. Thanks so much if you guys have time for these two questions,

BD

Edited by BoulderDash

Share this post


Link to post
Share on other sites
I haven't been able to find the 'Pictorial Overview of Separate Pricing' as stated here:

Since it is no longer available here:

Seperate Pricing Per Customer

It is, look for: "Missing HTML-Overview from package 4.1"
Also, if I want the newest version, should I download this one:

 

Version 4.1.1.: Completo + Idioma Espa?ol

 

Because I don't see another download that says it has the 4.1.1 complete package.

Well, there is another one, but the one you see first is complete too (even more complete because it has the files for a Spanish version too).

Share this post


Link to post
Share on other sites

Help in Admin customers_group.php???????

 

Under Customer Groups i am getting the system tags or identifiers instead of the actual values of the data. I have a new install of MS2.2 and SPPC 4.0. I have everything else working except for this last page.

 

Any ideas :( :( :(

 

 

customers_groups.php - default listing results

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

HEADING_TITLE HEADING_TITLE_SEARCH

 

TABLE_HEADING_NAME TABLE_HEADING_ACTION

Retail

TEXT_DISPLAY_NUMBER_OF_CUSTOMERS_GROUPS Page 1 of 1

 

 

customers_groups.php - adding a new group results

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

HEADING_TITLE

 

Personal

ENTRY_GROUPS_NAME

ENTRY_GROUP_SHOW_TAX This Setting only works when 'Display Prices with Tax'

is set to true in the Configuration for your store and Tax Exempt (below) to 'No'.

ENTRY_GROUP_TAX_EXEMPT

 

 

That should give everyone an idea of what to look the screens i am getting look like to some extent.

 

thanks

Share this post


Link to post
Share on other sites

this is a easy one. i can answer this. hee hee.

 

Have you installed the right php files in the admin\includes\languages\english directory?

 

i.e.

customers.php

customers_groups.php

specials.php

 

etc etc.

Share this post


Link to post
Share on other sites

I have a few questions about this contribution before I implement it.

 

The site is for a distribution company that sells products mainly to trade customers but also to retail. Some products and information documents must be visible only to my trade customers.

 

My questions.

 

1. Can I have seperate trade and retail account application pages?

 

2. Will the system generate an email to my trade customer once I have approved his trade account?

 

3. I need to publish information documents visible only to my trade customers. From what I have read in this forum I can achieve this using the "0$ hide" & "hide products" add ons. Could someone confirm this?

 

4. Is there an option that will allow me to send newsletters to a group? EG. Trade newsletter or Retail newsletter.

 

5. Is SPPC compatible with the STS contribution?

 

Many thanks in advance

 

Banjo

Share this post


Link to post
Share on other sites
I have a few questions about this contribution before I implement it.

 

The site is for a distribution company that sells products mainly to trade customers but also to retail. Some products and information documents must be visible only to my trade customers.

 

My questions.

 

1. Can I have seperate trade and retail account application pages?

 

2. Will the system generate an email to my trade customer once I have approved his trade account?

 

3. I need to publish information documents visible only to my trade customers. From what I have read in this forum I can achieve this using the "0$ hide" & "hide products" add ons. Could someone confirm this?

 

4. Is there an option that will allow me to send newsletters to a group? EG. Trade newsletter or Retail newsletter.

 

5. Is SPPC compatible with the STS contribution?

 

Many thanks in advance

 

Banjo

 

Banjo,

 

Yes, SPPC is compatible with the STS contribution and I work to on the contribution ""Hide Price if $0"

to be ccompatible with SPPC 4.1.1. I will release it shortly. I will call it ""Hide Price if $0" for SPPC 4.1.1". I have to work for this contribution to be compatible because, some people use price bereak and other don't, so the code is not the same and I want the contribution to be hardcoded for the language file. I almost finish.

 

But to answer your question, yes you can publish information documents visible only to your trade customers with the contribution "Hide Price if $0".

 

For the question you ask about a seperate trade and retail account application pages, it's no... you can have many groups of customer like retail, wholesaler or whatever you want and you classify your customer in the group you want. When you edit a customer, you can see on which group he belong. Capish ?

 

For the question concerning an option that will allow you to send newsletters to a group ? The answer is no. You can just email like the oscommerce do with the same option.

 

For the question about the system generate an email to your customer when they register, it's the same things like oscommerce do. What I do it's a email template for each group and I send to customer the confirmation of thei account in my emal program. Very simple and easy to do. Just make a template in your email program.

 

I wish all your question is answered and long life to SPPC 4.1.1 B)


John

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

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites
this is a easy one. i can answer this. hee hee.

 

Have you installed the right php files in the admin\includes\languages\english directory?

 

i.e.

customers.php

customers_groups.php

specials.php

 

etc etc.

 

I must of brain faded at 2:00am, i could of sworn the files were being FTP'd. I checked this morning and that file was missing.

 

thanks again

Share this post


Link to post
Share on other sites
Banjo,

 

Yes, SPPC is compatible with the STS contribution and I work to on the contribution ""Hide Price if $0"

to be ccompatible with SPPC 4.1.1. I will release it shortly. I will call it ""Hide Price if $0" for SPPC 4.1.1". I have to work for this contribution to be compatible because, some people use price bereak and other don't, so the code is not the same and I want the contribution to be hardcoded for the language file. I almost finish.

 

But to answer your question, yes you can publish information documents visible only to your trade customers with the contribution "Hide Price if $0".

 

For the question you ask about a seperate trade and retail account application pages, it's no... you can have many groups of customer like retail, wholesaler or whatever you want and you classify your customer in the group you want. When you edit a customer, you can see on which group he belong. Capish ?

 

For the question concerning an option that will allow you to send newsletters to a group ? The answer is no. You can just email like the oscommerce do with the same option.

 

For the question about the system generate an email to your customer when they register, it's the same things like oscommerce do. What I do it's a email template for each group and I send to customer the confirmation of thei account in my emal program. Very simple and easy to do. Just make a template in your email program.

 

I wish all your question is answered and long life to SPPC 4.1.1 B)

 

 

Hello Jeep:

 

I have installed SPPC in MS2 and like to have price break feature. Know any contribution for that?

 

thanks

 

Spencer

Share this post


Link to post
Share on other sites
Hello Jeep:

 

I have installed SPPC in MS2 and like to have price break feature. Know any contribution for that?

 

thanks

 

Spencer

 

Yep, check on Quantity Price Breaks for Separate Pricing Per Customer and a bonus B) , this one at Show Price list for SPPC 4.1 v1.0

 

Have fun...


John

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

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites
Yep, check on Quantity Price Breaks for Separate Pricing Per Customer and a bonus B) , this one at Show Price list for SPPC 4.1 v1.0

 

Have fun...

 

Thanks! Jeep.

 

One other question:

 

I also installed easy populate and like to know :

If I download the complete product list from the original database that comes with many product attributes via easy populate (Download Complete tab-delimited .txt file to edit).

 

Can I edit the downloaded file by adding and deleting product attributes, then upload it back? If I do that, would the product attibutes will be updated automately? I mean old attributes (not in the updated file) will be deleted? And new attributes will be added?

 

Or please advise how to do it in batch. thank in advance.

 

 

Spencer

Share this post


Link to post
Share on other sites

In addition to Jeep's answers:

1. Can I have seperate trade and retail account application pages?
There is only one, but I guess you could rename the account set up page and make your own for the trade? At present the system looks for the tax_id number to alert you for a trade customer. You could hack that and have something else, like a checkbox or a drop-down menu/radio button menu.

 

2. Will the system generate an email to my trade customer once I have approved his trade account?
No, but something like this has been discussed in this thread and sample code is thus available.

 

3. I need to publish information documents visible only to my trade customers. From what I have read in this forum I can achieve this using the "0$ hide" & "hide products" add ons. Could someone confirm this?
Well, the hide products contribution is specific for as the name says hiding products. Information documents can be made visible by checking the customer_group_id before the page is displayed. When it is not set or not in the group that is allowed you can do a redirect (header("Location: url_to_go_to ") to a page of your preference.

 

4. Is there an option that will allow me to send newsletters to a group? EG. Trade newsletter or Retail newsletter.
Not in the contribution section. I did work on it a while back and as far as I can recollect it was finished apart from full testing and documenting the manual changes for installation.

 

For the SPPC modified mail page (admin/mail.php) the code is somewhere in the thread (as is orders.php, a post from this weekend).

Share this post


Link to post
Share on other sites
In addition to Jeep's answers:

There is only one, but I guess you could rename the account set up page and make your own for the trade? At present the system looks for the tax_id number to alert you for a trade customer. You could hack that and have something else, like a checkbox or a drop-down menu/radio button menu.

 

No, but something like this has been discussed in this thread and sample code is thus available.

 

Well, the hide products contribution is specific for as the name says hiding products. Information documents can be made visible by checking the customer_group_id before the page is displayed. When it is not set or not in the group that is allowed you can do a redirect (header("Location: url_to_go_to ") to a page of your preference.

 

Not in the contribution section. I did work on it a while back and as far as I can recollect it was finished apart from full testing and documenting the manual changes for installation.

 

For the SPPC modified mail page (admin/mail.php) the code is somewhere in the thread (as is orders.php, a post from this weekend).

 

Hi, JAn:

 

Is "Quantity Price Breaks for Separate Pricing Per Customer" works with SPPC 4.1.1?

 

thanks

 

Spencer

Share this post


Link to post
Share on other sites
Hi, JAn:

 

Is "Quantity Price Breaks for Separate Pricing Per Customer" works with SPPC 4.1.1?

 

thanks

 

Spencer

 

Yes, they work 100% with one another.

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

×