Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SPPC 4.1 and known customers


oww_

Recommended Posts

Hello!

 

before I? ll start: Congratulations, Lance Armstrong!

;)

 

Now to my problem:

After installing SPPC 4.1 into an existing osc-MS2.2 shop I found something, seems like a bug to me. By testing the "taxnumber-criteria" as event for B2B-Access, I simulated a "known customer"-case: The taxnumber is added in standard-adress (address_book_process.php/edit/xy) by a known user. During this session (Login as customer who was created before taxnumber is added in DB) all prices are displayed without taxes after submiting the taxnumber.

 

After Logout/Login everything works fine: The customer is in RA-mode, all prices are displayed with taxes.

 

Any Ideas?

 

Greeting from Goettingen, Germany

Oliver

 

I decided to start this topic in english after my german post (http://forums.oscommerce.de/index.php?showtopic=31566) starts to become english and all discussed solutions won?t work so far...

Link to comment
Share on other sites

By testing the "taxnumber-criteria" as event for B2B-Access, I simulated a "known customer"-case: The taxnumber is added in standard-adress (address_book_process.php/edit/xy) by a known user. During this session (Login as customer who was created before taxnumber is added in DB) all prices are displayed without taxes after submiting the taxnumber.

 

After Logout/Login everything works fine: The customer is in RA-mode, all prices are displayed with taxes.

 

Any Ideas?

Adding a tax number doesn't make a customer a business client. That would create a hole big enough to drive a bus through. It does alert you in admin: RA/alert is on. Then it is up to you to manually put this customer in another group. There is no automatic mode.

 

To do that automatically you would have to add code to go and check the Umsatz Steuer Nummer against the European database (I think there is a contribution for that, I remember vaguely that there were issues with connecting to the database automatically) and go from there.

Link to comment
Share on other sites

Hello JanZ,

 

thanks for follow up and your answer. My problem isn?t about automatic authorisation or checking an ID against external databases. RA and Group-Management work very fine in my case. Perhaps my description wasn?t good enough too (please excuse my english) so I?ll try this new one hoping somebody has an idea. There are two ways to submit a taxnumber: First by a new customer filling out completely the create_account.php form (works fine). Second way is by an existing customer who adds his tax number in his existing adress-settings (also an Email-event for the "taxnumber added" mail). I got problems with this second choice:

 

My Group-Settings are:

customers_group_id = 0

customers_group_name = Retail

customers_group_show_tax = 1

 

customers_group_id = 1

customers_group_name = Wholesale

customers_group_show_tax = 0

 

After submit of an added taxnumber for an existing and logged in user, my shop starts to display prices without taxes. It seems that after this submit and during this session the customer is carry the flag "customers_group_id = 0" (Retail-Customer who is not jet authorised but in RA-mode waiting for manual change to another group) but "customers_group_show_tax = 0" (instead of "1" for Retail-Customers). No wholesale price is displayed but the taxes are missing in retail-prices. After Logout an a new Re-Login everthing works fine: Prices are retailprices including taxes, user is still in RA-mode waiting for authorisation. No admin settins were changed in between.

 

I can?t find any solution so I think to redirect the user against logoff.php.... :(

 

Oliver

Link to comment
Share on other sites

After submit of an added taxnumber for an existing and logged in user, my shop starts to display prices without taxes. It seems that after this submit and during this session the customer is carry the flag "customers_group_id = 0" (Retail-Customer who is not jet authorised but in RA-mode waiting for manual change to another group) but "customers_group_show_tax = 0" (instead of "1" for Retail-Customers). No wholesale price is displayed but the taxes are missing in retail-prices. After Logout an a new Re-Login everthing works fine: Prices are retailprices including taxes, user is still in RA-mode waiting for authorisation. No admin settins were changed in between.

 

I can?t find any solution so I think to redirect the user against logoff.php.... :(

I tried this and couldn't replicate what you see. So after a change, prices stay including tax. The way I checked the sessions was to add on the index page (but it could be any page) to the bottom of the file (but in between PHP tags):

echo '<pre>';
print_r($_SESSION);
echo '</pre>';

Nothing happened to the session settings of sppc for the retail customer. I did notice that the country_id was dropped. This appears to be a known bug which is easily fixed:

The address_book_process.php does not set the session variable for customer_country_id properly

lines 150 and 171 read (sppc version: 175 and 196 respectively)

$customer_country_id = $country_id;

but should read

$customer_country_id = $country;

Perhaps this causes your problem. Otherwise can you confirm with the echo'ing of the session variables that the sppc session variables change?

Link to comment
Share on other sites

JanZ,

 

good news. Everything works: The solution is the bufgfix for customer_country_id. There are no problems with the the sppc session variables changes. I used your echo $Session method an double checked all.

 

Thank you very much for time, help and SPPC at all! Perhaps you?ll add a hint in the next version of "new_install_directions.txt"...

 

:thumbsup:

Oliver

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...