Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

Hello All,

 

I am new to OSC environment. I have some modifications installed in my site and was really desperate to have a function like SPPC. I have retail customers and wholesale customers that I can now mix in the same site without problems.

 

I first installed 4.0 and had some serious problems....it was a manual install....Thankfully all backups were in order and site was reset to what it was before......

then I dis the manual update using the Compare & Merge software.......5 star....great stuff indeed.....it worked straight away..Needless to say that Compare & Merge was the best tool I had found lately.

 

Was very happy indeed with this contribution and then ventured into 4.1.1 update which I managed to update successfully too....

 

The last bugfix I did was in post http://www.oscommerce.com/forums/index.php?sho...436&st=900#

 

Everything seems to be working fine for me upto now.

 

Many thanks to all that have contributed to this contribution. This is a masterpice and surely shall be part of the basic osc package.

 

I have a minor ptoblem that I would like to see solved:

For my retail customers I have free shipping for orders over a certain value, but somehow cant manage to take this away from the wholesale group.......they are also getting the same.

 

Additionally, from the current setup that I have, what should I update to to make it uptodate version, without going through manually looking at all the changes since 4.1.1 ?

 

thanks again to all.

 

dca

Link to comment
Share on other sites

I've got the SPPC running with Multi-stores and it all seems to be working fine, apart from one major thing - it's making all the accounts when logged in TAX EXEMPT but I can show tax when the user is not logged in. Is there any reason for this or anywhere I could be looking to fix it? I've looked in the admin and the groups are set to show tax, but it's just not doing it.
Double check login.php and also echo the session variables somewhere (in between HTML comment tags if it is live already:

 echo '<pre>Session: ';
print_r($_SESSION);

Then you should be able to see if sppc_customer_group_tax_exempt and sppc_customer_group_show_tax are set correctly.

Link to comment
Share on other sites

Hi JanZ,

 

I have an interesting one - LOL Our products for the wholesale group actually have a different model # than the same product for the retail group. I'm not sure if that is what is causing my issue or not - but, when I create a special and choose the special to be for the Retail group, if I've mistakenly chosen a Wholesale product the specials box will show me that the product is on special. When I click it I go to a page telling me no information is available for that product (because I'm signed in as a Retail customer and it's a Wholesale customer product that is hidden from Retail customers).

 

Somehow - I need to make the Specials box recognize the hide products or categories from customer groups for SPPC code. Any ideas?

 

This appears to be the main query in boxes/specials.php

if ($customer_group_id == '0')  {
  $rp_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id = '0' order by s.specials_date_added desc");
 } else { // $sppc_customer_group_id is in the session variables, so must be set
  $rp_query = tep_db_query("select p.products_id, pd.products_name, IF(pg.customers_group_price IS NOT NULL,pg.customers_group_price, p.products_price) as products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using (products_id, customers_group_id) where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and s.customers_group_id= '".$customer_group_id."' order by s.specials_date_added desc");
}

 

Do I just add this to the end of each query?

AND find_in_set('" . $customer_group_id . "', products_hide_from_groups) = 0

 

Thanks!

~Tracy
 

Link to comment
Share on other sites

Hi JanZ,

 

One other question :blush:

 

I'm looking over adding SPPC Price Break v1.02 and the update v2 - but with Master Products installed as well it is looking quite confusing at the moment. You wouldn't happen to have installed this with Master Products already would you? To make it even more interesting, our Master Products are not for sale, only the Slave Products are purchasable - so many of the "Buy Now" features are not in my files (especially since you simply enter a quantity and then click the "Add to Cart" button to order a product).

 

If you do have this installed with Master Products I would be very interested in doing a WinMerge comparison of the changed files as it might help me to figure out how to set this up :blush:

~Tracy
 

Link to comment
Share on other sites

Do I just add this to the end of each query?

AND find_in_set('" . $customer_group_id . "', products_hide_from_groups) = 0

Should work I think, but $customer_group_id was not used there (session variable used, so be carefull: use 0 in the query for retail/not logged-in).
Link to comment
Share on other sites

Should work I think, but $customer_group_id was not used there (session variable used, so be carefull: use 0 in the query for retail/not logged-in).

 

WooHoo!! It did work!! :)

 

But I do have this in both my includes/boxes/specials.php and my root specials.php

// BOF Separate Price Per Customer
//  global variable (session): $sppc_customers_group_id -> local variable $customer_group_id

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

 

Just in case anyone else ever needs the info ;)

~Tracy
 

Link to comment
Share on other sites

will SPPC conflict with these contributions that I am using?:

 

- Products Multi 1.2 (it uses it's own file, product_listing_multi.php and not the product_listing.php)

- Forced Total Order Quantity

Link to comment
Share on other sites

JanZ,

 

I have SPPC installed and working very well....

 

I have now added the WISHLIST mod. All seems well except that the wishlist does not show the wholesale price to a client who belongs to that group.

 

I am sure this is a really easy adaptation to the code in the wishlist.php I think I have an idea where it needs to change, but am not sure what the syntax and actual code should be.

 

Can you help me ?

 

The wishlis.pho code (the part where I think the change needs to be done) is :

 

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

}

 

Thanks in advance.

 

dca

Link to comment
Share on other sites

Hi JanZ

 

The store is up and running now, however there are 50,000 products to go in! I've installed Easy Populate, which is working fine on Group 0 (retail group) but not Group 1 (trade/wholesale group). I have SPPC and SPPC Attributes installed, I'll worry about the attributes bit later (maybe), but it would be really great if I could get the separate prices working. Have you looked at this contribution before?

 

When I download the csv file it doesn't include the Table Products Groups fields customers_group_price or customers_group_id and if I add them manually to the csv file and upload it just ignores them. There isn't much code in EP that relates to SPPC and I've done the obvious (I hope) and check the correct table name and field names have been used.

 

I'd really value any comments you can offer on this.

Thank you

Katie

 

// this is for the separate price per customer module (lines 563 - 584)
	if (isset($filelayout['v_customer_price_1'])){
		$sql2 = "SELECT
				customers_group_price,
				customers_group_id
			FROM
				".TABLE_PRODUCTS_GROUPS."
			WHERE
			products_id = " . $row['v_products_id'] . "
			ORDER BY
			customers_group_id"
	;
		$result2 = tep_db_query($sql2);
		$ll = 1;
		$row2 =  tep_db_fetch_array($result2);
		while( $row2 ){
			$row['v_customer_group_id_' . $ll] 	= $row2['customers_group_id'];
			$row['v_customer_price_' . $ll] 	= $row2['customers_group_price'];
			$row2 = tep_db_fetch_array($result2);
			$ll++;
		}
	}
//lines 1311-1336

case 'priceqty':
	$iii = 0;
	// uncomment the customer_price and customer_group to support multi-price per product contrib
	$filelayout = array(
		'v_products_model'		=> $iii++,
		'v_products_price'		=> $iii++,
		'v_products_quantity'		=> $iii++,
		'v_customer_price_1'		=> $iii++,
		'v_customer_group_id_1'		=> $iii++,
		'v_customer_price_2'		=> $iii++,
		'v_customer_group_id_2'		=> $iii++,
		#'v_customer_price_3'		=> $iii++,
		#'v_customer_group_id_3'		=> $iii++,
		#'v_customer_price_4'		=> $iii++,
		#'v_customer_group_id_4'		=> $iii++,
			);
	$filelayout_sql = "SELECT
		p.products_id as v_products_id,
		p.products_model as v_products_model,
		p.products_price as v_products_price,
		p.products_tax_class_id as v_tax_class_id,
		p.products_quantity as v_products_quantity
		FROM
		".TABLE_PRODUCTS." as p
		";
	break;

// for the separate prices per customer (SPPC) module (lines 2286-2357)
	$ll=1;
	if (isset($v_customer_price_1)){

		if (($v_customer_group_id_1 == '') AND ($v_customer_price_1 != ''))  {
			echo "<font color=red>ERROR - v_customer_group_id and v_customer_price must occur in pairs</font>";
			die();
		}
		// they spec'd some prices, so clear all existing entries
		$result = tep_db_query('
					DELETE
					FROM
						'.TABLE_PRODUCTS_GROUPS.'
					WHERE
						products_id = ' . $v_products_id
					);
		// and insert the new record
		if ($v_customer_prices_1 != ''){
			$result = tep_db_query('
						INSERT INTO
							'.TABLE_PRODUCTS_GROUPS.'
						VALUES
						(
							' . $v_customer_group_id_1 . ',
							' . $v_customer_price_1 . ',
							' . $v_products_id . ',
							' . $v_products_price .'
							)'
						);
		}
		if ($v_customer_price_2 != ''){
			$result = tep_db_query('
						INSERT INTO
							'.TABLE_PRODUCTS_GROUPS.'
						VALUES
						(
							' . $v_customer_group_id_2 . ',
							' . $v_customer_price_2 . ',
							' . $v_products_id . ',
							' . $v_products_price . '
							)'
						);
		}
		if ($v_customer_price_3 != ''){
			$result = tep_db_query('
						INSERT INTO
							'.TABLE_PRODUCTS_GROUPS.'
						VALUES
						(
							' . $v_customer_group_id_3 . ',
							' . $v_customer_price_3 . ',
							' . $v_products_id . ',
							' . $v_products_price . '
							)'
						);
		}
		if ($v_customer_price_4 != ''){
			$result = tep_db_query('
						INSERT INTO
							'.TABLE_PRODUCTS_GROUPS.'
						VALUES
						(
							' . $v_customer_group_id_4 . ',
							' . $v_customer_price_4 . ',
							' . $v_products_id . ',
							' . $v_products_price . '
							)'
						);
		}

	}
	// end: separate prices per customer (SPPC) module

Edited by Kayti
Link to comment
Share on other sites

I have a minor ptoblem that I would like to see solved:

For my retail customers I have free shipping for orders over a certain value, but somehow cant manage to take this away from the wholesale group.......they are also getting the same.

That would be easy to solve. In checkout_shipping.php there is a line (around 65) that says:

  if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {

If you add to it && ($customer_group_id == '0') after (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') you should be fine.

 

Since the variable $customer_group_id is not used on that page (but might already be in the registered globals) better be sure to add this above it:

// BOF Separate Pricing Per Customer
 if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {
 $customer_group_id = $_SESSION['sppc_customer_group_id'];
 } else {
  $customer_group_id = '0';
 } // EOF Separate Pricing Per Customer

 

Additionally, from the current setup that I have, what should I update to to make it uptodate version, without going through manually looking at all the changes since 4.1.1 ?
I haven't made a list of that. From the top of my head the earliest change I think was something in admin/specials.php, that was OK. A later one in categories.php regarding copying of products had a slight flaw (there is a more correct version somewhere in the thread). There were also a few changes regarding MySQL5 issues, of which some worked, some didn't (for index.php and advanced_search_results.php). My proposed changes are in this thread, referred to a couple of times so you should be able to find them doing a search in the topic. If you're still on MySQL4 it shouldn't be a problem (yet).
Link to comment
Share on other sites

will SPPC conflict with these contributions that I am using?:

 

- Products Multi 1.2 (it uses it's own file, product_listing_multi.php and not the product_listing.php)

- Forced Total Order Quantity

Conflict is a big word, but product_listing_multi.php would need to be adapted for prices (I guess you could use the code from product_listing.php, isn't it just a matter of displaying the products in a different way?)

 

Forced Total Order Quantity and SPPC shouldn't "conflict" at all in principle, depends on where it looks for the total order quantity. My guess is, it is will not be a problem.

Link to comment
Share on other sites

I have now added the WISHLIST mod. All seems well except that the wishlist does not show the wholesale price to a client who belongs to that group.

 

I am sure this is a really easy adaptation to the code in the wishlist.php I think I have an idea where it needs to change, but am not sure what the syntax and actual code should be.

The code you posted starts with attributes price, so the retail/wholesale/specials price is already determined there. Attribute prices are not changeable for groups in standard SPPC, unless you specifically added that option with the SPPC attributes mod rev. 1.
Link to comment
Share on other sites

OK I'm really stuck here.

I am trying to apply "SPPC attributes mod" in catalog/includes/classes/shopping_cart.php and I just cant seem to complete the following...

 

**REPLACE**

 

$check_product_query = tep_db_query("select products_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

$check_product = tep_db_fetch_array($check_product_query);

 

if (($check_product !== false) && ($check_product['products_status'] == '1')) {

 

**WITH**

 

// BOF SPPC attribute hide check, original query expanded to include attributes

$check_product_query = tep_db_query("select products_status, options_id, options_values_id, attributes_hide_from_groups, '0' as hide_attr_status from " . TABLE_PRODUCTS . " left join " . TABLE_PRODUCTS_ATTRIBUTES . " using(products_id) where products_id = '" . (int)$products_id . "'");

while ($_check_product = tep_db_fetch_array($check_product_query)) {

$attr_hide_array = array(); // empty array in case it is still around and filled

$attr_hide_array = explode(",", $_check_product['attributes_hide_from_groups']);

if (in_array($this->cg_id, $attr_hide_array)) {

$_check_product['hide_attr_status'] = '1';

}

$check_product[] = $_check_product;

} // end while ($_check_product = tep_db_fetch_array($check_product_query))

$no_of_check_product = count($check_product);

 

if (is_array($attributes)) {

foreach($attributes as $attr_option => $attr_option_value) {

$valid_option = '0';

for ($x = 0; $x < $no_of_check_product ; $x++) {

if ($attr_option == $check_product[$x]['options_id'] && $attr_option_value == $check_product[$x]['options_values_id']) {

$valid_option = '1';

if ($check_product[$x]['hide_attr_status'] == '1') {

// delete hidden attributes from array attributes

unset($attributes[$attr_option]);

}

} // end if ($attr_option == $check_product[$x]['options_id']....

} // end for ($x = 0; $x < $no_of_check_product ; $x++)

if ($valid_option == '0') {

// after having gone through the options for this product and not having found a matching one

// we can conclude that apparently this is not a valid option for this product so remove it

unset($attributes[$attr_option]);

}

} // end foreach($attributes as $attr_option => $attr_option_value)

} // end if (is_array($attributes))

// now attributes have been checked and hidden and invalid ones deleted make the $products_id_string again

$products_id_string = tep_get_uprid($products_id, $attributes);

 

if ((isset($check_product) && tep_not_null($check_product)) && ($check_product[0]['products_status'] == '1')) {

// EOF SPPC attribute hide check

 

Lines 264-265

 

I cant find the code to replace. In fact I cant even find any reference to $check_product_query in the whole file.

 

At the moment I have "Register Globals" and "SPPC Version 4.0 - A Complete Revision" installed.

 

Thanks

Link to comment
Share on other sites

I cant find the code to replace. In fact I cant even find any reference to $check_product_query in the whole file.
That code was added with the osC 2.2 update of August 2006.

 

At the moment I have "Register Globals" and "SPPC Version 4.0 - A Complete Revision" installed.
Updating to at least 4.1.1 wouldn't be a bad idea.
Link to comment
Share on other sites

That would be easy to solve. In checkout_shipping.php there is a line (around 65) that says:

  if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {

If you add to it && ($customer_group_id == '0') after (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') you should be fine.

 

Since the variable $customer_group_id is not used on that page (but might already be in the registered globals) better be sure to add this above it:

// BOF Separate Pricing Per Customer
 if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {
 $customer_group_id = $_SESSION['sppc_customer_group_id'];
 } else {
  $customer_group_id = '0';
 } // EOF Separate Pricing Per Customer

 

I haven't made a list of that. From the top of my head the earliest change I think was something in admin/specials.php, that was OK. A later one in categories.php regarding copying of products had a slight flaw (there is a more correct version somewhere in the thread). There were also a few changes regarding MySQL5 issues, of which some worked, some didn't (for index.php and advanced_search_results.php). My proposed changes are in this thread, referred to a couple of times so you should be able to find them doing a search in the topic. If you're still on MySQL4 it shouldn't be a problem (yet).

 

 

Hi Jan

 

Have tried what you indicated. Somehow, the wholesale client is still geting the free shipment.

 

 

Have I put the code in the right place ?

 

// BOF Separate Pricing Per Customer

if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {

$customer_group_id = $_SESSION['sppc_customer_group_id'];

} else {

$customer_group_id = '0';

} // EOF Separate Pricing Per Customer

 

if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') && ($customer_group_id == '0')) {

$pass = false;

 

Thanks in advance

 

dca

Link to comment
Share on other sites

Jan,

 

In the same checkout_shipping.php there is additional coding that also deals with free shipping ?

 

<?php

} elseif ($free_shipping == false) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>

<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

<?php

}

 

if ($free_shipping == true) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td colspan="2" width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main" colspan="3"><b><?php echo FREE_SHIPPING_TITLE; ?></b> <?php echo $quotes[$i]['icon']; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

<tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

<?php

 

anything needs to be changed here ?

 

dca

Link to comment
Share on other sites

anything needs to be changed here ?

No, not there, but a bit after the code I mentioned is:

	$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
  $free_shipping = true;

You would need to add the && ($customer_group_id == '0') there too. Missed that the first time :blush:

Link to comment
Share on other sites

does this contribution enable the admin to so the following..

 

 

In admin panel enable only wholesale group to see specific products and viceversa. (with retail)

 

 

If it can I will fill my stomach get a good sleep and in the morning start working :)

Link to comment
Share on other sites

OK I got another problem. After updating to the latest version the catalog works fine. However when trying to access admin I get the following error:

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/db/mysql/mysql.sock' (2) in /hsphere/local/home/discosys/discoverysystems.com.au/store/admin/includes/functions/database.php on line 19 Unable to connect to database server!

I have looked into it a bit and I have found the following (although it may be unrelated)...

 

database tables.php:

// BOF Separate Pricing Per Customer

define('TABLE_PRODUCTS_GROUPS', 'products_groups');

define('TABLE_CUSTOMERS_GROUPS', 'customers_groups');

define('TABLE_PRODUCTS_GROUP_PRICES', 'products_group_prices_cg_');

define('TABLE_PRODUCTS_ATTRIBUTES_GROUPS', 'products_attributes_groups');

// EOF Separate Pricing Per Customer

 

What is this table? I cant find the SQL in any of the installation instructions. It is even in the non-manual install files.

 

Thanks

Link to comment
Share on other sites

I seem to be getting this unsual problem which i hadn't realised before. Whenever i select a manufacturer from the pull down manfacturer infobox i am getting this error:

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

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

 

[TEP STOP]

 

Everything works like searching for keywords, advanced searh. just the manufacturer infobox doesn't.

 

Any help would be appreciated.

Link to comment
Share on other sites

No, not there, but a bit after the code I mentioned is:

	$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
  $free_shipping = true;

You would need to add the && ($customer_group_id == '0') there too. Missed that the first time :blush:

 

Hello Janz,

 

Thanks for the tip again. Somehow due to my limited PHP skills maybe I am not putting the correct text in the right place as you indicate.

 

My checkout_shipping.pho looks like this after making the changes that you indicated :

 

// BOF Separate Pricing Per Customer

if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {

$customer_group_id = $_SESSION['sppc_customer_group_id'];

} else {

$customer_group_id = '0';

} // EOF Separate Pricing Per Customer

 

if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') && ($customer_group_id == '0') ) {

$pass = false;

 

switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {

case 'national':

if ($order->delivery['country_id'] == STORE_COUNTRY) {

$pass = true;

}

break;

case 'international':

if ($order->delivery['country_id'] != STORE_COUNTRY) {

$pass = true;

}

break;

case 'both':

$pass = true;

break;

}

 

$free_shipping = false;

if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {

$free_shipping = true && ($customer_group_id == '0');

 

include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');

}

} else {

$free_shipping = false;

}

 

Looks like I am not doing something right ......Can you have a quick look and point me to the right direction.

 

I feel that am so near, yet so far...lol

 

Thanks in advance again.

 

dca

Link to comment
Share on other sites

	$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) && ($customer_group_id == '0') ) {
  $free_shipping = true;

  include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
 } else {
$free_shipping = false;
 }

That should work.
Link to comment
Share on other sites

That should work.

 

Jan

 

Thanks again for your quick reply.

 

It still seems somthing is missing....when it reaches the checkout_confirmation stage, it still allows free shipping . Anything in that file to change too ?

 

dca

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