Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

heyhey...

 

at first i want to say that i respect your work here totally. your dedication for this project is outstanding.

 

i maybe don't have a real problem, maybe i just need a tip related to mysql...

i got sppc 4.15 installed, together with Quantity Price Breaks for Separate Pricing Per Customer v1.02, the Price Breaks per top-level-category-mod (including the 2 fixes), tax_info1.3 for sppc, Product listing multi col for SPPC 2.1 and your attributes_groups mod...

 

now i really need a way to fill up the customer-related table "attributes_groups". maybe i should mention, this shop hosts 303 products, but 259 of them are sharing the same attributes, options and prices. i would love some way to write them all at once. so basically i need a way to copy the content of a whole column from one table in the database to another. or would you recommend me to get this stuff over with easy populate?

 

curious for anything

 

...sebi

Link to comment
Share on other sites

If this is inside a function, try declaring "global $order" as one of the first lines in that function (if you didn't do that already).

It is inside a function, and I had not done this already. It is what was needed, now it works.

 

Thank you Jan.

 

Tegan

Link to comment
Share on other sites

Sebastian,

and your attributes_groups mod...
There is a bug in there, an array was not emptied so attributes carried over from one product to the next product with attributes inflating the sub total in the shopping cart. The bug is in the function calculate in classes/shopping_cart.php. The attributes mod now is (the real change is about line 17):

// attributes price
// BOF SPPC attributes mod
	if (isset($this->contents[$products_id]['attributes'])) {
	  reset($this->contents[$products_id]['attributes']);
   $where = " AND ((";
	while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {
	 $where .= "options_id = '" . (int)$option . "' AND options_values_id = '" . (int)$value . "') OR (";
   }
   $where=substr($where, 0, -5) . ')';

   $attribute_price_query = tep_db_query("SELECT products_attributes_id, options_values_price, price_prefix FROM " . TABLE_PRODUCTS_ATTRIBUTES . " WHERE products_id = '" . (int)$products_id . "'" . $where ."");

   if (tep_db_num_rows($attribute_price_query)) { 
	   $list_of_prdcts_attributes_id = '';
			 // empty array $attribute_price
			 $attribute_price = array();
	   while ($attributes_price_array = tep_db_fetch_array($attribute_price_query)) { 
	   $attribute_price[] =  $attributes_price_array;
	   $list_of_prdcts_attributes_id .= $attributes_price_array['products_attributes_id'].",";
		}
	   if (tep_not_null($list_of_prdcts_attributes_id) && $this->cg_id != '0') { 
	 $select_list_of_prdcts_attributes_ids = "(" . substr($list_of_prdcts_attributes_id, 0 , -1) . ")";
 $pag_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES_GROUPS . " where products_attributes_id IN " . $select_list_of_prdcts_attributes_ids . " AND customers_group_id = '" . $this->cg_id . "'");
 while ($pag_array = tep_db_fetch_array($pag_query)) {
	 $cg_attr_prices[] = $pag_array;
 }

 // substitute options_values_price and prefix for those for the customer group (if available)
 if ($customer_group_id != '0' && tep_not_null($cg_attr_prices)) {
	for ($n = 0; $n < count($attribute_price); $n++) {
	 for ($i = 0; $i < count($cg_attr_prices); $i++) {
		 if ($cg_attr_prices[$i]['products_attributes_id'] == $attribute_price[$n]['products_attributes_id']) {
			$attribute_price[$n]['price_prefix'] = $cg_attr_prices[$i]['price_prefix'];
			$attribute_price[$n]['options_values_price'] = $cg_attr_prices[$i]['options_values_price'];
		 }
	 } // end for ($i = 0; $i < count($cg_att_prices); $i++)
	  }
	} // end if ($customer_group_id != '0' && (tep_not_null($cg_attr_prices))
  } // end if (tep_not_null($list_of_prdcts_attributes_id) && $customer_group_id != '0')
// now loop through array $attribute_price to add up/substract attribute prices

  for ($n = 0; $n < count($attribute_price); $n++) {
		if ($attribute_price[$n]['price_prefix'] == '+') {
		  $this->total += $qty * tep_add_tax($attribute_price[$n]['options_values_price'], $products_tax);
		} else {
		  $this->total -= $qty * tep_add_tax($attribute_price[$n]['options_values_price'], $products_tax);
	}
  } // end for ($n = 0; $n < count($attribute_price); $n++)
	  } // end if (tep_db_num_rows($attribute_price_query))
	} // end if (isset($this->contents[$products_id]['attributes'])) 
  }
}
// EOF SPPC attributes mod

 

now i really need a way to fill up the customer-related table "attributes_groups".
Provided you have a constant factor for the price difference between the group and retail (here 0.9 is used) this seems to do the job:

insert into products_attributes_groups select pa.products_attributes_id, '4' as customers_group_id, 0.9 * pa.options_values_price, pa.price_prefix, pa.products_id from products_attributes pa;

or would you recommend me to get this stuff over with easy populate?
I am not familiar with that so I can't be of any help.

 

Actually, the admin part is finished for the attributes groups thing (a pop-up window were you can change the atttribute price and prefix for all groups, and the hide status). On the catalog side some code needs to be added to prevent customers smuggling in hidden attributes because an additional feature was added: hiding attributes for groups. PM me if you want the (beta) code.

Link to comment
Share on other sites

I keep on getting this error, I tried everything on the forums but I can't get my advance search results to work...

 

1054 - Unknown column 'p2pef.products_extra_fields_value' in 'where clause'

 

select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id) , products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%cables%' or p.products_model like '%cables%' or m.manufacturers_name like '%cables%' or p2pef.products_extra_fields_value like '%cables%') )

 

[TEP STOP]

 

These are the contributions I've installed:

Protection of Configuration v1.1

Center Shop CSS ms2

Separate Price Per Customer v4.1.5

Separate Price Per Customer Price Break v1.02

Extra Fields v2.0j

 

Here is my code:

 

<?php
/*
 $Id: advanced_search_result.php,v 1.72 2003/06/23 06:50:11 project3000 Exp $
 adapted for Separate Pricing Per Customer 2006/06/01

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

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

 $error = false;

 if ( (isset($HTTP_GET_VARS['keywords']) && empty($HTTP_GET_VARS['keywords'])) &&
   (isset($HTTP_GET_VARS['dfrom']) && (empty($HTTP_GET_VARS['dfrom']) || ($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING))) &&
   (isset($HTTP_GET_VARS['dto']) && (empty($HTTP_GET_VARS['dto']) || ($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING))) &&
   (isset($HTTP_GET_VARS['pfrom']) && !is_numeric($HTTP_GET_VARS['pfrom'])) &&
   (isset($HTTP_GET_VARS['pto']) && !is_numeric($HTTP_GET_VARS['pto'])) ) {
$error = true;

$messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT);
 } else {
$dfrom = '';
$dto = '';
$pfrom = '';
$pto = '';
$keywords = '';

if (isset($HTTP_GET_VARS['dfrom'])) {
  $dfrom = (($HTTP_GET_VARS['dfrom'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dfrom']);
}

if (isset($HTTP_GET_VARS['dto'])) {
  $dto = (($HTTP_GET_VARS['dto'] == DOB_FORMAT_STRING) ? '' : $HTTP_GET_VARS['dto']);
}

if (isset($HTTP_GET_VARS['pfrom'])) {
  $pfrom = $HTTP_GET_VARS['pfrom'];
}

if (isset($HTTP_GET_VARS['pto'])) {
  $pto = $HTTP_GET_VARS['pto'];
}

if (isset($HTTP_GET_VARS['keywords'])) {
  $keywords = $HTTP_GET_VARS['keywords'];
}

$date_check_error = false;
if (tep_not_null($dfrom)) {
  if (!tep_checkdate($dfrom, DOB_FORMAT_STRING, $dfrom_array)) {
	$error = true;
	$date_check_error = true;

	$messageStack->add_session('search', ERROR_INVALID_FROM_DATE);
  }
}

if (tep_not_null($dto)) {
  if (!tep_checkdate($dto, DOB_FORMAT_STRING, $dto_array)) {
	$error = true;
	$date_check_error = true;

	$messageStack->add_session('search', ERROR_INVALID_TO_DATE);
  }
}

if (($date_check_error == false) && tep_not_null($dfrom) && tep_not_null($dto)) {
  if (mktime(0, 0, 0, $dfrom_array[1], $dfrom_array[2], $dfrom_array[0]) > mktime(0, 0, 0, $dto_array[1], $dto_array[2], $dto_array[0])) {
	$error = true;

	$messageStack->add_session('search', ERROR_TO_DATE_LESS_THAN_FROM_DATE);
  }
}

$price_check_error = false;
if (tep_not_null($pfrom)) {
  if (!settype($pfrom, 'double')) {
	$error = true;
	$price_check_error = true;

	$messageStack->add_session('search', ERROR_PRICE_FROM_MUST_BE_NUM);
  }
}

if (tep_not_null($pto)) {
  if (!settype($pto, 'double')) {
	$error = true;
	$price_check_error = true;

	$messageStack->add_session('search', ERROR_PRICE_TO_MUST_BE_NUM);
  }
}

if (($price_check_error == false) && is_float($pfrom) && is_float($pto)) {
  if ($pfrom >= $pto) {
	$error = true;

	$messageStack->add_session('search', ERROR_PRICE_TO_LESS_THAN_PRICE_FROM);
  }
}

if (tep_not_null($keywords)) {
  if (!tep_parse_search_string($keywords, $search_keywords)) {
	$error = true;

	$messageStack->add_session('search', ERROR_INVALID_KEYWORDS);
  }
}
 }

 if (empty($dfrom) && empty($dto) && empty($pfrom) && empty($pto) && empty($keywords)) {
$error = true;

$messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT);
 }

 if ($error == true) {
tep_redirect(tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(), 'NONSSL', true, false));
 }

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, tep_get_all_get_params(), 'NONSSL', true, false));
?>
<!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; ?>">
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<title><?php echo TITLE; ?></title>
<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"><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_2; ?></td> //-->
		<td class="main"><?php echo sprintf(HEADING_TITLE_2, $HTTP_GET_VARS['keywords']); ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_browse.gif', HEADING_TITLE_2, 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>
<?php
// create column list
 $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
				   'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
				   'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
				   'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
				   'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
				   'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
				   'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
				   'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

 asort($define_list);

 $column_list = array();
 reset($define_list);
 while (list($key, $value) = each($define_list)) {
if ($value > 0) $column_list[] = $key;
 }

// BOF Separate Pricing 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 Pricing Per Customer

 $select_column_list = '';

 for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
switch ($column_list[$i]) {
  case 'PRODUCT_LIST_MODEL':
	$select_column_list .= 'p.products_model, ';
	break;
  case 'PRODUCT_LIST_MANUFACTURER':
	$select_column_list .= 'm.manufacturers_name, ';
	break;
  case 'PRODUCT_LIST_QUANTITY':
	$select_column_list .= 'p.products_quantity, ';
	break;
  case 'PRODUCT_LIST_IMAGE':
	$select_column_list .= 'p.products_image, ';
	break;
  case 'PRODUCT_LIST_WEIGHT':
	$select_column_list .= 'p.products_weight, ';
	break;
}
 }

// BOF Separate Pricing Per Customer
$status_tmp_product_prices_table = false;
$status_need_to_get_prices = false;
// find out if sorting by price has been requested
if ( (isset($HTTP_GET_VARS['sort'])) && (ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) && (substr($HTTP_GET_VARS['sort'], 0, 1) <= sizeof($column_list)) ){
$_sort_col = substr($HTTP_GET_VARS['sort'], 0, 1);
if ($column_list[$_sort_col-1] == 'PRODUCT_LIST_PRICE') {
  $status_need_to_get_prices = true;
  }
}

if ((tep_not_null($pfrom) || tep_not_null($pto) || $status_need_to_get_prices == true) && $customer_group_id != '0') {
$product_prices_table = TABLE_PRODUCTS_GROUP_PRICES.$customer_group_id;
// the table with product prices for a particular customer group is re-built only a number of times per hour
// (setting in /includes/database_tables.php called MAXIMUM_DELAY_UPDATE_PG_PRICES_TABLE, in minutes)
// to trigger the update the next function is called (new function that should have been
// added to includes/functions/database.php)
tep_db_check_age_products_group_prices_cg_table($customer_group_id);
$status_tmp_product_prices_table = true;
} elseif ((tep_not_null($pfrom) || tep_not_null($pto) || $status_need_to_get_prices == true) && $customer_group_id == '0') {
// to be able to sort on retail prices we *need* to get the special prices instead of leaving them
// NULL and do product_listing the job of getting the special price
// first make sure that table exists and needs no updating
tep_db_check_age_specials_retail_table();
$status_tmp_special_prices_table = true;
} // end elseif ((tep_not_null($pfrom) || (tep_not_null($pfrom)) && ....

if ($status_tmp_product_prices_table == true) {
$select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, tmp_pp.products_price, p.products_tax_class_id, if(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price ";
} elseif ($status_tmp_special_prices_table == true) {
  $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_name, 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 ";
} else {
	$select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, NULL as specials_new_products_price, NULL as final_price ";
}
// next line original select query
// $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, 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 ";

if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
$select_str .= ", SUM(tr.tax_rate) as tax_rate ";
 }

// START: Extra Fields Contribution
//  $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id";
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id";
// END: Extra Fields Contribution

 if ($status_tmp_product_prices_table == true) {
$from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . $product_prices_table . " as tmp_pp using(products_id)";
  } elseif ($status_tmp_special_prices_table == true) {
$from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id ";
  } else {
$from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) ";
}
// EOF Separate Pricing Per Customer

 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
if (!tep_session_is_registered('customer_country_id')) {
  $customer_country_id = STORE_COUNTRY;
  $customer_zone_id = STORE_ZONE;
}
$from_str .= " left join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '" . (int)$customer_country_id . "') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '" . (int)$customer_zone_id . "')";
 }

 $from_str .= ", " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";

 $where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";

 if (isset($HTTP_GET_VARS['categories_id']) && tep_not_null($HTTP_GET_VARS['categories_id'])) {
if (isset($HTTP_GET_VARS['inc_subcat']) && ($HTTP_GET_VARS['inc_subcat'] == '1')) {
  $subcategories_array = array();
  tep_get_subcategories($subcategories_array, $HTTP_GET_VARS['categories_id']);

  $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and (p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'";

  for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) {
	$where_str .= " or p2c.categories_id = '" . (int)$subcategories_array[$i] . "'";
  }

  $where_str .= ")";
} else {
  $where_str .= " and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['categories_id'] . "'";
}
 }

 if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
$where_str .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
 }

 if (isset($search_keywords) && (sizeof($search_keywords) > 0)) {
$where_str .= " and (";
for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {
  switch ($search_keywords[$i]) {
	case '(':
	case ')':
	case 'and':
	case 'or':
	  $where_str .= " " . $search_keywords[$i] . " ";
	  break;
	default:
	  $keyword = tep_db_prepare_input($search_keywords[$i]);
// START: Extra Fields Contribution
//		  $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%'";
	  $where_str .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' or p2pef.products_extra_fields_value like '%" . tep_db_input($keyword) . "%'";
// END: Extra Fields Contribution
	  if (isset($HTTP_GET_VARS['search_in_description']) && ($HTTP_GET_VARS['search_in_description'] == '1')) $where_str .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'";
	  $where_str .= ')';
	  break;
  }
}
$where_str .= " )";
 }

 if (tep_not_null($dfrom)) {
$where_str .= " and p.products_date_added >= '" . tep_date_raw($dfrom) . "'";
 }

 if (tep_not_null($dto)) {
$where_str .= " and p.products_date_added <= '" . tep_date_raw($dto) . "'";
 }

 if (tep_not_null($pfrom)) {
if ($currencies->is_set($currency)) {
  $rate = $currencies->get_value($currency);

  $pfrom = $pfrom / $rate;
}
 }

 if (tep_not_null($pto)) {
if (isset($rate)) {
  $pto = $pto / $rate;
}
 }

// BOF Separate Pricing Per Customer
  if ($status_tmp_products_prices_table == true) {
  if (DISPLAY_PRICE_WITH_TAX == 'true') {
if ($pfrom > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")";
if ($pto > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")";
 } else {
if ($pfrom > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) >= " . (double)$pfrom . ")";
if ($pfrom > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) <= " . (double)$pfrom . ")";
}
} else { // $status_tmp_product_prices_table is not true: uses p.products_price instead of cg_products_price
		 // because in the where clause for the case $status_tmp_special_prices is true, the table
		 // specials_retail_prices is abbreviated with "s" also we can use the same code for "true" and for "false"
		if (DISPLAY_PRICE_WITH_TAX == 'true') {
if ($pfrom > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")";
if ($pto > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")";
} else {
  if ($pfrom > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price, p.products_price) >= " . (double)$pfrom . ")";
  if ($pto > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price, p.products_price) <= " . (double)$pto . ")";
}
}
// EOF Separate Pricing Per Customer

 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
$where_str .= " group by p.products_id, tr.tax_priority";
 }

 if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
	$HTTP_GET_VARS['sort'] = $i+1 . 'a';
	$order_str = ' order by pd.products_name';
	break;
  }
}
 } else {
$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
$sort_order = substr($HTTP_GET_VARS['sort'], 1);
$order_str = ' order by ';
switch ($column_list[$sort_col-1]) {
  case 'PRODUCT_LIST_MODEL':
	$order_str .= "p.products_model " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
  case 'PRODUCT_LIST_NAME':
	$order_str .= "pd.products_name " . ($sort_order == 'd' ? "desc" : "");
	break;
  case 'PRODUCT_LIST_MANUFACTURER':
	$order_str .= "m.manufacturers_name " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
  case 'PRODUCT_LIST_QUANTITY':
	$order_str .= "p.products_quantity " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
  case 'PRODUCT_LIST_IMAGE':
	$order_str .= "pd.products_name";
	break;
  case 'PRODUCT_LIST_WEIGHT':
	$order_str .= "p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
  case 'PRODUCT_LIST_PRICE':
	$order_str .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
	break;
}
 }

 $listing_sql = $select_str . $from_str . $where_str . $order_str;

 require(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>
	</td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
  </tr>
</table></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'); ?>

 

Any ideas? I've searched everywhere...

Link to comment
Share on other sites

Any ideas? I've searched everywhere...
The from_str of the original query is changed and found three times in the SPPC version. You added the original back (not used by the way) but did not change the three SPPC ones.

 

I think it should be like this (starts around line 258):

// START: Extra Fields Contribution
//  $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id";

/* remove this part 
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id"; */
// END: Extra Fields Contribution

 if ($status_tmp_product_prices_table == true) {
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . $product_prices_table . " as tmp_pp using(products_id)";
  } elseif ($status_tmp_special_prices_table == true) {
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id ";
  } else {
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) ";
}
// EOF Separate Pricing Per Customer

 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
if (!tep_session_is_registered('customer_country_id')) {
  $customer_country_id = STORE_COUNTRY;
  $customer_zone_id = STORE_ZONE;
}

Link to comment
Share on other sites

Thanks a bunch! I don't know what I will do without you.... :'(

 

The from_str of the original query is changed and found three times in the SPPC version. You added the original back (not used by the way) but did not change the three SPPC ones.

 

I think it should be like this (starts around line 258):

// START: Extra Fields Contribution
//  $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id";

/* remove this part 
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id"; */
// END: Extra Fields Contribution

 if ($status_tmp_product_prices_table == true) {
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . $product_prices_table . " as tmp_pp using(products_id)";
  } elseif ($status_tmp_special_prices_table == true) {
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id ";
  } else {
$from_str = "from (" . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef on p.products_id=p2pef.products_id) left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) ";
}
// EOF Separate Pricing Per Customer

 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
if (!tep_session_is_registered('customer_country_id')) {
  $customer_country_id = STORE_COUNTRY;
  $customer_zone_id = STORE_ZONE;
}

Link to comment
Share on other sites

as anyone got this to work with open feature sets contrib http://www.oscommerce.com/community/contributions,4066

 

or what about wishlist contrib?

http://www.oscommerce.com/community/contributions,1682

 

also i have this order editing tool

http://www.oscommerce.com/community/contributions,1589

and you can add products when yuou are doing an order, but it pulls the retail price.. maybe someone modified this to work with sppc?

Link to comment
Share on other sites

Hi!

 

Since I installed the SPPC contrib, my orders in the Admin Panel does not show the correct numbers for the excluded taxes prices. Totals are ok, but in the orders field, in the line where it shows the inc and ex taxes prices, where it should be 12.93 it shows 12.00, for instance.

 

 

Any one had this problem too? I have installed separate_price_413 :huh:

Edited by Mookie_Jam
Link to comment
Share on other sites

With this contribution can I assign a free delivery for a specific group? I couldn't find that option anywhere. Pleas let me know someone.
I think the simplest way of doing that is to add a table rate and change the shipping table to 0:0.00 using price as a criterium (and allowing that table rate only for that group of course). If you already use a table rate you can add another table rate (see the changelog.txt in the contribution package under "Changes in 4.1 from 4.0" for a link to where that is explained). Haven't tried it though...
Link to comment
Share on other sites

Since I installed the SPPC contrib, my orders in the Admin Panel does not show the correct numbers for the excluded taxes prices. Totals are ok, but in the orders field, in the line where it shows the inc and ex taxes prices, where it should be 12.93 it shows 12.00, for instance.
That doesn't make any sense really. SPPC doesn't do anything in that page and orders.php pulls it info from tables that concern orders (once entered there, SPPC has no business there).

 

You don't happen to have the decimal places in admin->Localization->Currencies->Decimal places set to 0 instead of 2 by any chance?

 

Tracing the code back: on that page the display is coded by: $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) and $order->products[$i]['final_price'] is derived from the class order.php in admin/includes/classes where it is pulled with:

	  $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
  while ($orders_products = tep_db_fetch_array($orders_products_query)) {
	$this->products[$index] = array('qty' => $orders_products['products_quantity'],
									'name' => $orders_products['products_name'],
									'model' => $orders_products['products_model'],
									'tax' => $orders_products['products_tax'],
									'price' => $orders_products['products_price'],
									'final_price' => $orders_products['final_price']);
etcetera...

Link to comment
Share on other sites

You don't happen to have the decimal places in admin->Localization->Currencies->Decimal places set to 0 instead of 2 by any chance?

Nop.. I have correctly set to 2.

 

 

That doesn't make any sense really. SPPC doesn't do anything in that page and orders.php pulls it info from tables that concern orders (once entered there, SPPC has no business there).

Well, si I imagine I am the first one to have this problem? :'(

 

Can?t understand so the difference betwens these two orders..

 

- The correct one

tempnc8.jpg

 

- Wrong one

tempfh7.jpg

 

 

If it helps.. numbers in the orders are not recalculated when I upload de original OsCommerce files or add later the SPPC ones, I mean, once made the order, the numbers are keeped, but if I make the buy with the SPPC uploaded, it send the bad numbers to the Admin Panel. Maybe is a forntend file problem? :'(

Link to comment
Share on other sites

Well, si I imagine I am the first one to have this problem?
Perhaps, perhaps not.

 

If it helps.. numbers in the orders are not recalculated when I upload de original OsCommerce files or add later the SPPC ones, I mean, once made the order, the numbers are keeped, but if I make the buy with the SPPC uploaded, it send the bad numbers to the Admin Panel. Maybe is a forntend file problem?
If you change the bottom of admin/order.php to read:

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
<?php
echo '<pre>';
print_r($order);
?>

You can see what info is pulled from the database. For example for a single product in an order it would show something (among other things):

[products] => Array
	(
		[0] => Array
			(
				[qty] => 10
				[name] => There's Something About Mary
				[model] => DVD-TSAB
				[tax] => 0.0000
				[price] => 49.9900
				[final_price] => 49.9900
			)

	)

If [final_price] is 12.93 and it shows 12.00 in your page then $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) does a rounding on the final_price.

Link to comment
Share on other sites

If [final_price] is 12.93 and it shows 12.00 in your page then $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) does a rounding on the final_price.

EXACTLY as you said!!

order Object
(
[info] => Array
	(
		[currency] => EUR
		[currency_value] => 1.000000
		[payment_method] => Transferencia Bancaria
		[cc_type] => 
		[cc_owner] => 
		[cc_number] => 
		[cc_expires] => 
		[date_purchased] => 2006-09-08 22:01:27
		[orders_status] => 1
		[last_modified] => 
	)

[totals] => Array
	(
		[0] => Array
			(
				[title] => Subtotal:
				[text] => 15.00EUR
			)

		[1] => Array
			(
				[title] => Portes (Agencia Transportes):
				[text] => 8.31EUR
			)

		[2] => Array
			(
				[title] => 16% IVA:
				[text] => 3.21EUR
			)

		[3] => Array
			(
				[title] => Total:
				[text] => 23.31EUR
			)

	)

[products] => Array
	(
		[0] => Array
			(
				[qty] => 1
				[name] => Camiseta ASI verde
				[model] => 
				[tax] => 16.0000
				[price] => 12.9310
				[final_price] => 12.0000
				[attributes] => Array
					(
						[0] => Array
							(
								[option] => Talla
								[value] => XL - Muy Grande
								[prefix] => 
								[price] => 0.0000
							)

					)

			)

	)

Know how can I fix it?? >_<

Link to comment
Share on other sites

With this contribution can I assign a free delivery for a specific group? I couldn't find that option anywhere. Pleas let me know someone.

Thank you very much for your answer. i thing i will have to install this contrib. but it will take me whole day to do it. is there any simpler way how to do it?

Link to comment
Share on other sites

EXACTLY as you said!!

Know how can I fix it??

Then we first need to know where it goes wrong... As far as I can see the final price is inserted in checkout_process and in its turn it derives the information from the class shopping_cart in the function get_products (about 80% down that file).

 

First the retail price is queried there, then it is checked if there is a special price, if the customer group is other than retail if there is a customer group price and if so it the $products_price changed for that one.

 

A little further, the final_price is established as the products_price plus attributes price. Since the attributes price is zero the final_price cannot be lower than the products_price... (see code from includes/classes/shopping_cart.php, function get_products):

// BOF Separate Pricing Per Customer

  $specials_price = tep_get_products_special_price($prid);
 if (tep_not_null($specials_price)) {
 $products_price = $specials_price;
  } elseif ($this->cg_id != 0){
	$customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$prid . "' and customers_group_id =  '" . $this->cg_id . "'");
	if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
	$products_price = $customer_group_price['customers_group_price'];
	}
	  }
// EOF Separate Pricing Per Customer

	  $products_array[] = array('id' => $products_id,
								'name' => $products['products_name'],
								'model' => $products['products_model'],
								'image' => $products['products_image'],
								'price' => $products_price,
								'quantity' => $this->contents[$products_id]['qty'],
								'weight' => $products['products_weight'],
								'final_price' => ($products_price + $this->attributes_price($products_id)),

In the class order.php this seems to be done again:

// EOF Separate Pricing Per Customer
  for ($i=0, $n=sizeof($products); $i<$n; $i++) {
	$this->products[$index] = array('qty' => $products[$i]['quantity'],
									'name' => $products[$i]['name'],
									'model' => $products[$i]['model'],
									'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
									'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
									'price' => $products[$i]['price'],
									'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']),
									'weight' => $products[$i]['weight'],
									'id' => $products[$i]['id']);

Link to comment
Share on other sites

i thing i will have to install this contrib. but it will take me whole day to do it. is there any simpler way how to do it?
I'm afraid not. Of course if you only need this little part of SPPC you could only add code for that part, but figuring out what parts to install and which parts not would take a lot longer than just install everything.

 

osCommerce has no notion of customer groups otherwise this would be one of those things that could be implemented simply.

Link to comment
Share on other sites

I'm afraid not. Of course if you only need this little part of SPPC you could only add code for that part, but figuring out what parts to install and which parts not would take a lot longer than just install everything.

 

osCommerce has no notion of customer groups otherwise this would be one of those things that could be implemented simply.

 

Thanks for replay i will need this also for the separate pricing, but which version should I install, there are so many bug fixes. Which version has the latest full package? Please let me know anyone.

 

Thank you

Link to comment
Share on other sites

Thanks for replay i will need this also for the separate pricing, but which version should I install, there are so many bug fixes. Which version has the latest full package? Please let me know anyone.

 

Thank you

Sorry to jump in the middle here, are you adding this to a fresh install of osc? If not you could use a diff compare program like ExamDiff or WinMerge.

Link to comment
Share on other sites

Sorry to jump in the middle here, are you adding this to a fresh install of osc? If not you could use a diff compare program like ExamDiff or WinMerge.

I have a couple of cotribs installed. I will try to use the winmerge for the first time. But which version of SPPC should i install?

Link to comment
Share on other sites

i am running SPPC and have 2 category's; wholesale & retail

 

is there a way i can have customers who enter a tax ID and a Company name AUTOMATICALLY added to my wholesale SPPC category???

 

but they should ONLY be added to the SPPC wholesale category if they enter Tax ID AND a Company Name...

 

everyone else should get added to the SPPC retail category by default

ok, i have this and the "drop down" menu working now...

my drop down menu asks the customer if they intend to resale any merchandise they purchase from our store.

 

i want the values the customer inputs for Tax ID, Company Name, and what they answer for the above "drop down menu" question; to be displayed on the order (as it appears in admin->customers->orders).

 

how can i do this?

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

Link to comment
Share on other sites

I have a couple of cotribs installed. I will try to use the winmerge for the first time. But which version of SPPC should i install?

I have 4.11 installed on my version. And am currently looking at the new versions.

Link to comment
Share on other sites

There must be something wrong in "new_install_directions" of Separate Pricing Per Customer v.4.1.4 (bugfix)

In this part:

Lines 343-349

 

**REPLACE**

if (DISPLAY_PRICE_WITH_TAX == 'true') {

if ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 +

(tr.tax_rate / 100) ) >= " . (double)$pfrom . ")";

if ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is null, 1, 1 +

(tr.tax_rate / 100) ) <= " . (double)$pto . ")";

} else {

if ($pfrom > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) >= " . (double)$pfrom . ")";

if ($pto > 0) $where_str .= " and (IF(s.status, s.specials_new_products_price, p.products_price) <= " . (double)$pto . ")";

}

**WITH**

// BOF Separate Pricing Per Customer

if ($status_tmp_product_prices_table == true) {

if (DISPLAY_PRICE_WITH_TAX == 'true') {

if ($pfrom > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) * if(gz.geo_zone_id is

null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")";

if ($pto > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) * if(gz.geo_zone_id is

null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")";

} else {

if ($pfrom > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) >= " . (double)$pfrom .

")";

if ($pto > 0) $where_str .= " and (IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) <= " . (double)$pto .

")";

}

} else { // $status_tmp_product_prices_table is not true: uses p.products_price instead of cg_products_price

// because in the where clause for the case $status_tmp_special_prices is true, the table

// specials_retail_prices is abbreviated with "s" also we can use the same code for "true" and for "false"

if (DISPLAY_PRICE_WITH_TAX == 'true') {

if ($pfrom > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price,

p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= " . (double)$pfrom . ")";

if ($pto > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price,

p.products_price) * if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= " . (double)$pto . ")";

} else {

if ($pfrom > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price,

p.products_price) >= " . (double)$pfrom . ")";

if ($pto > 0) $where_str .= " and (IF(s.status AND s.customers_group_id = '" . $customer_group_id . "', s.specials_new_products_price,

p.products_price) <= " . (double)$pto . ")";

}

}

// EOF Separate Pricing Per Customer

Because the ?REPLACE? part doesn?t exist in catalog\advanced_search_result.php. Can somebody have a look at it please?

 

Thank you

Link to comment
Share on other sites

Because the ?REPLACE? part doesn?t exist in catalog\advanced_search_result.php.
It is there, just a bit further than the rest of the code that needs adapting. Use the search function in your text editor for "DISPLAY_PRICE_WITH_TAX" and you will find it quickly.
Link to comment
Share on other sites

Join the conversation

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

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...