Jump to content
scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

I'm sure it is in this thread and I've missed this somewhere, but an hour of searching has turned up nada.

 

I've got 3 price groups setup; retail, member, and wholesale. Right now if I create a discount coupon for say 10% - it takes the 10% off of the discount group pricing for the item. I'd like it to always take the discount off of the retail price.

New to me actually. It sounds like a matter of the discount coupon contribution. If this is something that works as an order_total module so loaded on checkout_payment it will take a big rewrite to recalculate the total in retail prices and discounting from that I would guess.

Share this post


Link to post
Share on other sites

AAAARRRRRGGGGHHHHHHHH!!!!! :'(

 

I have been playing with this contrib for a while now, and the issue is that the admin side is working for me, however the client side is BLANK, nothing shows in the browser window!!!!

 

Prior to setting up this contrib, the only thing i had modded is the dealer only contrib, where my ecom site requires that i personally set up each client, rather than they set up themselves, and everything was working properly...now POOF!!!

 

This is the code that shows for HTML on the login, logoff, and index page, thusfar...

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD>

<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>

<BODY></BODY>

<META content=KJYMXIUQCA name=SKYPE_FRAMEID></HTML>

 

Thats it, thats all...

 

And theres SOOOOOOOO much to go thru on this contrib, i was hoping that someone would have some insight as to what the issue may be....

 

Oh man, this is so painful!!!!

 

Cheers, and thx ahead of time!!!

Edited by horsewhip

Share this post


Link to post
Share on other sites
I have been playing with this contrib for a while now, and the issue is that the admin side is working for me, however the client side is BLANK, nothing shows in the browser window!!!!

Without an error message there is little anybody can suggest here. Apparently your hosting provider has set up the site so that error messages are not shown to the browser. Most likely they have set up an error log somewhere for your site. That should give more insight into what the problem is.

Share this post


Link to post
Share on other sites

Thx Jan,

Well, I guess Im SOL, cuz the provider only keeps error logs for Linux based sites, and wouldnt you know it, my client is running his on Windows. This means a step by step, pick apart, lots of coffee day ahead of me.

Thanks for your time.

Share this post


Link to post
Share on other sites

Is there any way to incrementally check to see where things may be going wrong during installation? I have purchased this template for my client from monstertemplate, thinking, hey why reinvent the wheel... however it seems i am reinventing the entire car to fit around a wheel...I can put in the entire upload for this contribution, overwriting the two other small mods i have done, but i have a sinking feeling its gonna blow the whole template apart at the seams...help....

Share this post


Link to post
Share on other sites
Is there any way to incrementally check to see where things may be going wrong during installation? I have purchased this template for my client from monstertemplate, thinking, hey why reinvent the wheel... however it seems i am reinventing the entire car to fit around a wheel...I can put in the entire upload for this contribution, overwriting the two other small mods i have done, but i have a sinking feeling its gonna blow the whole template apart at the seams...help....

Personally, I would make a backup of the database of that client and the files and edit them locally. You can run your own Apache server, MySQL server etcetera very easily these days on your own computer (whether it is Windows, Mac, or Linux). Then if an error comes up you see it immediately. You can edit files right away instead having to ftp them to see if you don't get an error.

 

So working locally would seem the best option in my view.

 

From what I have seen of these templates is that it is mostly about presentation. Most of the code is left in place so although it would be a bit harder to find, the bits and pieces to replace will still be there. A file comparison program (FOSS version of one: KDiff3) would make things easier too. It at least would tell you right away if a file has been changed by the template makers (or hasn't been updated...) if you compare them with an RC1 version. If not or if it needs updating use the version from SPPC.

Share this post


Link to post
Share on other sites

Good Evening,

 

I installed on a RC1 shop the latest SPPC 4.2 followed immediately after by:

tax info

Quantity Price breaks for SPPC

Hide price if $0 for SPPC

Hide products from customer groups for SPPC . All seemed to work great until ...

 

I then realized I couldnt login anymore to the catalog side. I decided to unpack a backup which left me with all contribs except "Hide products from customer groups"

 

Now I dont have this special login screen anymore to log into the different groups for test purpouses. The start page just refreshes and nothing else happens.

 

has anyone an idea which files control the login so far.


david

Share this post


Link to post
Share on other sites
I decided to unpack a backup which left me with all contribs except "Hide products from customer groups"

 

Now I dont have this special login screen anymore to log into the different groups for test purpouses. The start page just refreshes and nothing else happens.

 

has anyone an idea which files control the login so far.

Hide products from customer groups is an add-on to SPPC, so I don't get how you can have a backup with just that.

 

Login is handled by login.php... what can I say.

Share this post


Link to post
Share on other sites
Hide products from customer groups is an add-on to SPPC, so I don't get how you can have a backup with just that.

 

Login is handled by login.php... what can I say.

 

Thanks for replying !

 

Actually I make tars of all b4 and after conribs I install.

 

Correction to previous post:

 

The start page just refreshes and nothing else happens before backup.

 

After that I have all SPPC contribs except this particular add-on and I can log in but not choose the group I want to be in.

 

Cant it be a problem with the session handling which sometimes is different between this "old" add-on not being based on RC1 ?

 

Best Regards

Edited by Eim2

david

Share this post


Link to post
Share on other sites
Hide products from customer groups is an add-on to SPPC, so I don't get how you can have a backup with just that.

 

Login is handled by login.php... what can I say.

 

Sorry for my perhaps not so clear english I meant the tar backups contained all previous states between contribs.

 

Additonnaly re logging screen: is it only working with Firefox or with IE too ?

 

Thanks


david

Share this post


Link to post
Share on other sites
Additonnaly re logging screen: is it only working with Firefox or with IE too ?

I can't test with IE (I use a Mac) but I don't see why it shouldn't since it is vanilla HTML and server side stuff. What do you mean with start page refreshes? If you log in you go back to index.php... Are you sure the email address that triggers the choosing of the customer group is added in the appropriate file and correct?

Share this post


Link to post
Share on other sites
I can't test with IE (I use a Mac) but I don't see why it shouldn't since it is vanilla HTML and server side stuff. What do you mean with start page refreshes? If you log in you go back to index.php... Are you sure the email address that triggers the choosing of the customer group is added in the appropriate file and correct?

 

Yes, that s what I meant with refreshes and sure I can log in as any group member and ...

my MISTAKE as admin too with the login screen you provide. All works great.

Sorry I must be bit tired . IE loads german language whereas firefox loads in french first and I didnt update all language files to include the admin e-mail.

 

I ll just have to re-examine the hide product stuff an reinstall that. Ive spent hours cutting away our TotalB2B contrib and started getting really confused. I was also struggling to get the whats_new.php to work cozed it didnt show the product name with the Hide product add-on. I then installed Featured Products which has the needed code... anyways I am very glad now.

 

Thanks very much for your help.

Best regards.

 

Oh by the way. This is the actual state of the shop www.sertek.ch . We have one german only .de the next with your contribution will be dot.eu ;-)

Edited by Eim2

david

Share this post


Link to post
Share on other sites
Guest

Hi Jan,

 

I'm getting an error on admin/product_attributes.php trying to integrate the Attribute Sorter contribution.

 

The error is:

Fatal error: Call to undefined function tep_attributes_sort() in /home/infinity/public_html/catalog/admin/products_attributes.php on line 721

 

I'm not sure where I went wrong on the integration. The part of the file is:

<?php
 $next_id = 1;
// BOF SPPC, attributes groups modification
 $customers_groups_query = tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . "  order by customers_group_id");

 while ($_customers_groups = tep_db_fetch_array($customers_groups_query)) {
	$customers_groups[] = $_customers_groups;
}
// EOF SPPC, attributes groups modification
 $attributes = tep_db_query($attributes);
 while ($attributes_values = tep_db_fetch_array($attributes)) {
//    $products_name_only = tep_get_products_name($attributes_values['products_id']);
   $products_name_only = $attributes_values['products_name'];
   $options_name = tep_options_name($attributes_values['options_id']);
   $values_name = tep_values_name($attributes_values['options_values_id']);
   $attributes_sort = tep_attributes_sort($attributes_values['products_attributes_id']);//attribute sorter 
   $rows++;
?>
         <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
<?php

 

Any assistance is appreciated as always!

 

Joanne

Share this post


Link to post
Share on other sites
I'm getting an error on admin/product_attributes.php trying to integrate the Attribute Sorter contribution.

 

The error is:

Fatal error: Call to undefined function tep_attributes_sort() in /home/infinity/public_html/catalog/admin/products_attributes.php on line 721

 

I'm not sure where I went wrong on the integration.

That should be an easy one. In the Attribute Sorter contribution there should be a new function somewhere called tep_attributes_sort that should be added to admin/includes/functions/general.php (at least that is the most logical place to put it).

Share this post


Link to post
Share on other sites
Guest

Jan,

 

Yea ha! I wish all fixes were that easy. I added the code to the wrong general.php file. Thanks so much and Happy New Year!

 

That should be an easy one. In the Attribute Sorter contribution there should be a new function somewhere called tep_attributes_sort that should be added to admin/includes/functions/general.php (at least that is the most logical place to put it).

Share this post


Link to post
Share on other sites

Hi folks,

 

Have just installed SPPC4.2 on rc1 but having issues installing Hide products & categories 2.0.2.

 

The Hide Products mod seems to be built on ms2 files and am getting rather confused, even though the SPPC 4.2 has some code (which I have merged) ready done to support the Hide Products contrib.

 

Has anyone installed both of these on rc1 (a clean install, not an upgrade) successfully and if so what do I need to watch out for?

 

Any help greatly accepted.

 

I know this is a little vague so here are some code snippets to illustrate:

 

This is the code at the top of Product_info with SPPC 4.2 installed:

 

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

 $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
 $product_check = tep_db_fetch_array($product_check_query);
// 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
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>

 

and this is the code for the Hide Products for SPPC contrib:

 

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

    // BOF Separate Pricing Per Customer, hide products and categories from groups
    if(!tep_session_is_registered('sppc_customer_group_id')) { 
    $customer_group_id = '0';
    } else {
     $customer_group_id = $sppc_customer_group_id;
    }

 $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0");
 $product_check = tep_db_fetch_array($product_check_query);
  // EOF Separate Pricing Per Customer, hide products and categories from groups
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>

 

Do I need to use the lines that have the Left Join SQL code or do I use the code from the SPPC 4.2 for rc1?

 

I also have QTPro and the OSCAffiliates contribs installed and plan on using some logic to tie them all together once they are installed and working.

 

Once again, all help appreciated!

 

Regards,

 

Simon

Share this post


Link to post
Share on other sites

Hello,

 

I was wondering if any one has modified the "Who Is Online" to show actually the customers actual sub total. Currently no matter who is in the cart and their corresponding group discount, it just shows full retail in the sub total in the Who Is.

 

Thanks JR

Share this post


Link to post
Share on other sites
Have just installed SPPC4.2 on rc1 but having issues installing Hide products & categories 2.0.2.

 

The Hide Products mod seems to be built on ms2 files and am getting rather confused, even though the SPPC 4.2 has some code (which I have merged) ready done to support the Hide Products contrib.

 

Do I need to use the lines that have the Left Join SQL code or do I use the code from the SPPC 4.2 for rc1?

In 4.2 the global $_SESSION is used instead of the osC logic to find out about the session value (I had the idea that it wasn't working correctly sometimes). But it does need to be moved to above the product_check query because the customer group id is needed in that query. This should work fine too:

 

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

// 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';
 }

 $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0");
 $product_check = tep_db_fetch_array($product_check_query);
  // EOF Separate Pricing Per Customer, hide products and categories from groups
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>

Share this post


Link to post
Share on other sites

Hey Jan,

 

I am using the quantity price break contribution of yours with the SPPC 4.20. All installed perfect and seems to all work except for one issue. And I might be crazy, because I thought it worked prior. I thought when the group price is set below the quantity discount price the table that shows the quantity pricing disappeared? Is this correct. On my site, no matter what I set the group price, the quantity price table always shows. If it is supposed to disappear, what did I mis?

 

Thanks JR

Share this post


Link to post
Share on other sites
I am using the quantity price break contribution of yours with the SPPC 4.20. All installed perfect and seems to all work except for one issue. And I might be crazy, because I thought it worked prior. I thought when the group price is set below the quantity discount price the table that shows the quantity pricing disappeared? Is this correct. On my site, no matter what I set the group price, the quantity price table always shows. If it is supposed to disappear, what did I mis?

Actually, the table appears when $pf->hasQuantityPrice == true. But that becomes true the moment there is a quantity set for the first price break. It doesn't look at the price (quite logical because why would you set a price break if the price goes up?).

 

See PriceFormatter, function parsePrices:

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

For this QPBPP version you can also set price breaks for customer groups. It doesn't look at the price break for retail customer when there are no price breaks for the group (in contrast to the regular price: if there is no group price, the retail price is taken).

Share this post


Link to post
Share on other sites

Hey Jan,

 

Thanks for the reply, most helpful, but just to clarify the theory since there are quite a few files with this sort of conflict (and to help others with the same situation);

 

I am to use the $_Session lines from SPPC 4.2.0 to test the status of the logged in user but use the queries from the Hide Products contrib, that check for whether the user is in a group that the product is hidden from.

 

I must also ensure that the $_Session lines are above the query, otherwise the session info can't be used by the query - correct?

 

Once again, many thanks for your input.

 

Regards,

 

Simon

Share this post


Link to post
Share on other sites
I am to use the $_Session lines from SPPC 4.2.0 to test the status of the logged in user but use the queries from the Hide Products contrib, that check for whether the user is in a group that the product is hidden from.

The "old" one will probably work fine too, but using the global $_SESSION seems more fool proof.

I must also ensure that the $_Session lines are above the query, otherwise the session info can't be used by the query - correct?

Yes.

Share this post


Link to post
Share on other sites

Hey Jan,

 

Thanks for the note, makes sense. I do have another question (of course HA!). I noticed on one of my sites, and I have four identical with you SPPC and Quantity Breaks that one of them in the admin specials where product drop down menu is, that retail is $0.00. The rest of the groups have pricing and it is only on one of the sites, this issue. I copied over specials.php from another site that is working fine and still same issue. Where should I look?

 

Thanks JR

Share this post


Link to post
Share on other sites

Hey Jan,

 

Also relating to my above note, and this also be part of the issue, is that I can not insert new specials? Once the insert button is pressed, it just reverts back to the original specials page?

 

Thanks JR

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

×