chrometweaks.org

iPage or geocities? I want to buy a webpage!?

Click Here To View All Answers...


First of all iPage or geocities? I want to buy a webpage!? Thanks in advance for any response. Second question.. I have a question with relation to creating customer groups..

Is there a Contribution where you can setup customer groups and that when a customer signs up for an account they will automatically added to a group dependent on the country they choose..

For example if I had a price for local customers and international customers, dependent on the country they choose on signup they will automatically be added to either a local group or international group..

Or would it be possible to customise a contribution to meet these requirements?.

Thanks in advance..

Comments (43)

I would like to know the answer too. Anyone here know what is the answer. I'll do some investigation and get back to you if I bump into an good answer. You should email the people at iPage as they probably could help you..

Comment #1

Cheers for that Matti!.

Just one more question I am reading through the information for this contribution but I do not see anything about automatically assigning customers to groups when a customer signs up for an account..

Does this contribution have this feature or does it have to be customised to add this..

Thanks again..

Comment #2

I did say you would need to modify it.

It does assign a default group - it would be simple enough to add groups to the query at account signup based on location..

Matti..

Comment #3

Hi Matti.

I am fairly new to PHP but learning fast. Would you be able to help me identify what pages would have to be updated and provide some example code..

I know this is a big ask, and apologise if this is not proper forum behaviour...

Comment #4

Sorry for the wait - I had to sleep.

Create_account.php should be the only file you need to modify. I shall take a look at the Xprices structure today and post a mod..

Matti..

Comment #5

Thank you Matti.

I think we are probably on different time zones! I am really looking forward to your reply...

Comment #6

Ok - I shall try and run through this simply - I will assume that you have.

Xprices.

Installed. Backup your database..

In admin->configuration->my store: set 'Number Of Prices Per Products to 2'..

In admin->customers->groups: rename 'Wholesale' to 'International ->select product price 2..

In catalog/create_account.php, after:.

$country = tep_db_prepare_input($HTTP_POST_VARS['country']);.

Add:.

//Xprices mod -.

'customers_groups_id' => $customer_group,.

//Xprices mod = EOF.

In the above code, '223' is the countries_id for USA from the countries table in your database - change this to the country of your choice..

Add your new prices in your admin->categories/products edit page..

Thats it!.

Matti.

This post has been edited by.

Johnson.

: 17 May 2004, 13:08..

Comment #7

Thanks Matti! Your a star!!.

I have not worked on it yet but am going to try it now. Will let you know how I get on.....

Comment #8

Ok - I'll keep an eye on this thread - good luck!.

Matti..

Comment #9

Hi Matti.

Unfortunately that did not do the trick. I followed your instructions and copied and pasted your code and also changed the country number..

I also setup both the International price and the Default price. I then went into the shop and logged in as a user from the local country and it displayed the default price. However when I logged in as a customer from the UK or US the default price still appeared..

I also loaded a fresh install of osCommerce and installed the Xprices Contribution and then added your code as descripbed. Unfortunately I had the same result as above..

Any suggestions?.

Thanks in advance..

Comment #10

Hi Matti.

Please ignore my previous post I have it working now. I made a slight code error after revising..

My apologies your code worked perfectly!!.

However just one final question. I noticed that if a customer has created an account and have been assigned to a group and then decide to change their address details "Country" that they are not changed to the appropriate group..

Would a solution to this simply be to copy your code into catalog/address_book.php?.

Thanks Matti for all your help!!.

This post has been edited by.

Johnson.

: 17 May 2004, 06:32..

Comment #11

Pretty much.

Put the second code snippet after:.

'customers_lastname' => $lastname,.

Matti.

This post has been edited by.

Johnson.

: 17 May 2004, 12:16..

Comment #12

Cheers! that worked.

However instead of changing catalog/address_book.php I had to make the changes in catalog/address_book_process.php.

I have it all working perfectly - Thanks for all you help with this code you are a life saver!..

Comment #13

Yes - I forgot to say.

No prob - was fun.

Matti..

Comment #14

I have a question with relation to creating customer groups..

Is there a Contribution where you can setup customer groups and that when a customer signs up for an account they will automatically added to a group dependent on the country they choose..

For example if I had a price for local customers and international customers, dependent on the country they choose on signup they will automatically be added to either a local group or international group..

Or would it be possible to customise a contribution to meet these requirements?.

Thanks in advance..

Comment #15

I think the best contribution to modify for this would be.

Xprices.

..

Matti.

This post has been edited by.

Johnson.

: 17 May 2004, 13:08..

Comment #16


This question was taken from a support group/message board and re-posted here so others can learn from it.