Jump to content
scendent

Seperate Pricing Per Customer v3.5

Recommended Posts

Another speed problem...

Since I have installed SPPC in it's latest release, everything seams to be running slowly,...

 

Sorry for posting, solved the problem myself minutes after the post. This was nothing to do with SPPC, but was to do with my menu showing up how many products were in each category... Ever so sorry to mess up the thread with my silly problems.

Share this post


Link to post
Share on other sites

Has anyone customised this module to remove the "choose a customer group" option when you login? A customer will only ever be a member of 1 group and I would like them to go straight in. Just trying to customise login.php but having trouble, any help appreciated!

Share this post


Link to post
Share on other sites
Has anyone customised this module to remove the "choose a customer group" option when you login?  A customer will only ever be a member of 1 group and I would like them to go straight in.  Just trying to customise login.php but having trouble, any help appreciated!

 

That is how the mod works. You can set up any member to be apart of any member group you would like. I think you may be confused as only the admin (or a designated account) has the choice to choose a customer group. Good Luck.

Share this post


Link to post
Share on other sites

Thanks Jewbacca, you were right - much appreciated. I created a separate account and I didn't get asked for that.

 

I have one other issue that perhaps someone could help with, since installing this mod, all my "?" show up as "?". Some language setting somewhere perhaps?

Share this post


Link to post
Share on other sites
Thanks Jewbacca, you were right - much appreciated.  I created a separate account and I didn't get asked for that.

 

I have one other issue that perhaps someone could help with, since installing this mod, all my "?" show up as "?".  Some language setting somewhere perhaps?

 

I'm not 100% sure on this, but I think this can be fixed by going into the your admin panel to the localization area and then into currencies. See if you can re define the symbol. Good Luck.

Share this post


Link to post
Share on other sites

Mathew,

Another speed problem...

Mujina found that on the page advanced_search_results.php (which does the actual searching) there is a problem with one of the queries that surfaces only when you have lot's of products.

  $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";       
     }
 // EOF Separate Pricing Per Customer
 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {

Should be changed to:

  $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";       
     }
 // EOF Separate Pricing Per Customer
 if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {

My reasoning is that because the products_id can be in the table specials several times (because of the customer groups) the dataset becomes much larger than necessary (and thus the query slower). Because if a specials price is involved another query is used and the specials price is looked up in the includes/modules/products_listing.php anyway (that modules presents the results) the left join with specials is not needed anyway.

 

Of course this has nothing to do with the index page, but you might notice it later.

Share this post


Link to post
Share on other sites
Mathew,

 

Mujina found that on the page advanced_search_results.php (which does the actual searching) there is a problem with one of the queries that surfaces only when you have lot's of products.

 

Ouaou, impressive change on the speed at which the search is done... Almost instant now... I had read about this before, but wasn't concerned to fix it as being a priority bug, I would have ended up changing this though... But thanx for giving the tip so quickly... I recommend it even for small stores, you can feel a small difference, althout negligeable... This should be usefull for the next store I'm working on running over 20.000 different references...

 

Thanx again... And thanx to everybody for bringing help along with this mod, as even if I've only posted a couple of times, all answers to other peoples questions have been a great help to sort out bugs and problems...

Share this post


Link to post
Share on other sites

In a custom booking form I want to be able to send the group name the customer is assigned to. Does anyone know the command to get that? I thought it was $check_customer['customers_group_id']; but doesnt seem to work.

 

Thanks in advance of any help.

Share this post


Link to post
Share on other sites
In a custom booking form I want to be able to send the group name the customer is assigned to.  Does anyone know the command to get that?  I thought it was $check_customer['customers_group_id'];  but doesnt  seem to work.

 

Thanks in advance of any help.

 

I don't know if this is what you are looking for...

 

 echo 'YOU ARE A MEMBER OF: '; echo $customer_group_id; echo '';

Share this post


Link to post
Share on other sites
echo 'YOU ARE A MEMBER OF: '; echo $customer_group_id; echo '';
That will likely give you the correct customer_group_id, but I don't think you want to add it to a form (some smart guy might save the page, change it with a text editor and then "post" the changed code). Server side I would try to add:

$check_customer['customers_group_id'] = $sppc_customer_group_id;

The $sppc_customer_group_id is the session variable that should be available globally.

Share this post


Link to post
Share on other sites

Thanks again Jewbacca. Weird problem here is when I go from being signed in on the product listing http://ftpupload.bpweb.net/catalog/index.php?cPath=64 then click through to the booking form http://ftpupload.bpweb.net/bookingform.php?products_id=163 it seems to log me out, as when I return to the product page the login link is back again. This might explain why it isn't passing the group through.

 

Any thoughts as to why this might be happening?

Share this post


Link to post
Share on other sites

ahhh...we're getting there. That file didn't have application_top included in it, so now it keeps the login status, but $sppc_customer_group_id returns the group ID (eg "1") - just need the variable that holds the name of the group and we're sorted.

Share this post


Link to post
Share on other sites

What about?

$customer_g_name_query = tep_db_query("SELECT customers_group_name FROM customers_groups WHERE customers_group_id = '".$sppc_customer_group_id."' ");
if ($customer_g_name_array = tep_db_fetch_array($customer_g_name_query)) {
$customer_g_name = $customer_g_name_array['customers_group_name'];
}

Share this post


Link to post
Share on other sites
Jan, you are an absolute star - thank you so much

 

 

Anyone who might have an idea..........?

 

I have now about 150 products with 4 groups (3 if you don't include retial). My product prices seem to be droping for different groups within different sub catagories? :(

 

It could be user error, but if anyone else has had such problems I would be a little more intrested. I'm gona keep trying.....

 

Nate

Share this post


Link to post
Share on other sites

I'm trying to follow this thread and think I got lost...

 

I too would like to add somewhere at the top a message that says they are logged into dealer pricing or retail pricing etc... How and where exactly would I put this code?

 

Thanks!

 

What about?

$customer_g_name_query = tep_db_query("SELECT customers_group_name FROM customers_groups WHERE customers_group_id = '".$sppc_customer_group_id."' ");
if ($customer_g_name_array = tep_db_fetch_array($customer_g_name_query)) {
$customer_g_name = $customer_g_name_array['customers_group_name'];
}

Share this post


Link to post
Share on other sites
On behalf of JanZ I would like to announce Quantity Price Breaks for Separate Pricing Per Customer

 

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

 

This is a SPPC add-on that:

1) Allows quantity based pricing per product per customer group

2) Allow the ability to sell a product inlots of # quantity only

 

Once again JanZ has put his time and effort into helping the OScommerce community (especially all us SPPC users). Many Thanks!

 

Hurrah! It's my lucky month, I asked about Separate Payment/Shipping and (just by chance) JanZ had it ready within days, now the same with Price Breaks... bliss!

 

Just got the Price Breaks added - bit of a struggle with all the other contributions in the mix especially the Gift Voucher but I think it's there now.

 

I know some people want almost every contribution rolled into the osc source code, but this one really does deserve to be there. It adds so much functionality yet can be safely ignored by those owners that only want a basic store set-up.

 

If this contribution came out in the MS3 release it would be a big boost to osc's future development success.

 

Cheers JanZ! :thumbsup:

Share this post


Link to post
Share on other sites

I am getting the following error and I can not figure out what is wrong, can someone help me please:

 

When i click on any product in the description section, the image don't popup but I obtain the following error

A Runtime Error has occured.
Doyou wish to debug

Line: 0
Error: Object expected

 

I don't know ho to fix it and I don't understand what I do to make this. Any people had this proble before ?

 

Jeep >_<


John

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

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites
I too would like to add somewhere at the top a message that says they are logged into dealer

Howard, I don't want to patronize, but I you should do yourself a favor and get a good book on PHP. This kind of thing is dealt with in the first few chapters. Since the variable customer_group_id is available (after the obligatory if(!tep_session_is_registered('sppc_customer_group_id')) { etc. on the page ) you can do all kind of things with it. Like:

<?php
if ($customer_group_id == '1' ) { // 1 is dealer
echo 'Heh dude, you got dealer prices';
} elseif ($customer_group_id == '2') { // 2 is dealers with better prices
echo 'You got the best prices';
} else {
echo 'You are wasting my server\'s bandwidth, go away';
}
?>

Share this post


Link to post
Share on other sites
I am getting the following error and I can not figure out what is wrong, can someone help me please:

 

When i click on any product in the description section, the image don't popup but I obtain the following error

A Runtime Error has occured.
Doyou wish to debug

Line: 0
Error: Object expected

Sounds like you are working on a Windows box with Frontpage installed and just got yourself a JavaScript error. Impossible to tell what went wrong. Maybe the variable for the product_id in the PHP code is different than is used in the JavaScript code?

Share this post


Link to post
Share on other sites

Information on SPPC

 

Hello,

 

In the next few weeks I wil be working for a large company setting up their first sales website with an internet catalog I plan to power using Oscommerce that I regularly use for many of my customers. It will be running on a database of over 20.000 different product references with products having as many as 60 different prices, so that means definning just as many groups depending on the type of customer.

 

Will SPPC support this kind of massive database ?

If it will need important programming work in order to do this, and you think you can help, please contact me by pm.

 

Thanx in advance for your advice and help.

 

 

Regards.

Matthew SLADE

Share this post


Link to post
Share on other sites

OK, after lurking here for awhile, I'm finally ready to tackle SPPC. I went to the osC Contributions area and found the SPPC page.

 

The most recent release there is 4.1.1 and the description says "This release does not include the HTML overview of the contribution in action with extensive pictures. Download version 4.1 of March 15, 2005 for that."

 

But I can't find 4.1 anywhere. Can anyone point me there?

 

Thanks.


Mike in Key West

Share this post


Link to post
Share on other sites

Hi,

 

Ok i found my problem, it's the "Simple Template System (STS) 1.9" contribution who did the problem, because I change the layout in that. . It had nothing to do with "SPPC v.4.1.1".

 

 

JanZ, I have a question, if i want to make a catalog PDF price download catalog , Can I do a download version for my three price version ?

 

Jeep


John

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

osCommerce 2.3.4 Bootstrap Edge

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×