Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Assigning new accounts to customer groups


Recommended Posts

Hi folks,

 

I have been looking through past posts in General Contribution Support to see if customers can be auto-assigned to their appropriate customer group. We installed special pricing last week (we love this contribution!) and although I realize customers can be easily assigned manually AFTER account creation, is this the only method? Can a customer be streamed directly from account creation to their customer group without manual moderation in order to see the appropriate pricing tier during their initial visit?

 

Thanks very much!

Cheers,

Gillian

Link to comment
Share on other sites

Can a customer be streamed directly from account creation to their customer group without manual moderation in order to see the appropriate pricing tier during their initial visit?

Yes, but since this will be something special (based on what input for example) it will need customized code in create_account.php. Not hundreds of lines of code, but no general answer can be given to your question.

 

The SPPC thread is at the moment on this page of the forum :)

Link to comment
Share on other sites

Yes, but since this will be something special (based on what input for example) it will need customized code in create_account.php. Not hundreds of lines of code, but no general answer can be given to your question.

 

The SPPC thread is at the moment on this page of the forum :)

 

 

Do you mean that I could have code written that would stream someone into the 'Canadian wholesale' group based, e.g., on the country and tax number provided? We are dealing with two countries and retail and wholesale for each. I was just looking at the code in create_account'php? (The comments make it interesting to read! Is this where I would need to have code added? I am sure one of the tech guys at my hosting company will do this for me but I am asking now, just because I am interested and trying to learn. If this isn't an appropriate request, please disregard.

Cheers,

Gillian

 

// BOF Separate Pricing Per Customer
// register SPPC session variables for the new customer
// if there is code above that puts new customers directly into another customer group (default is retail)
// then the below code need not be changed, it uses the newly inserted customer group
     $check_customer_group_info = tep_db_query("select c.customers_group_id, cg.customers_group_show_tax, cg.customers_group_tax_exempt, cg.group_specific_taxes_exempt from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_GROUPS . " cg using(customers_group_id) where c.customers_id = '" . $customer_id . "'");
     $customer_group_info = tep_db_fetch_array($check_customer_group_info);
     $sppc_customer_group_id = $customer_group_info['customers_group_id'];
     $sppc_customer_group_show_tax = (int)$customer_group_info['customers_group_show_tax'];
     $sppc_customer_group_tax_exempt = (int)$customer_group_info['customers_group_tax_exempt'];
     $sppc_customer_specific_taxes_exempt = '';
     if (tep_not_null($customer_group_info['group_specific_taxes_exempt'])) {
       $sppc_customer_specific_taxes_exempt = $customer_group_info['group_specific_taxes_exempt'];

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