• Welcome to KonaKart Community Forum. Please login or sign up.
 

How to display Product Price based on Country

Started by kans, April 29, 2009, 11:14:19 am

Previous topic - Next topic

kans

I have a requirement such that the price of the product is different based on the country.  If the customer's country is XYZ, then it would be less.  If it is any thing else, then it would be more.  How do I do this? 

I know there are 4 to 5 different prices that can be set for each product.  But the problem would be: How do I show these prices based on the country.  Particularly because the customer will login or sign-up only at the end.  Even after login, I am not sure how I retrieve the correct price based on his country.

Any help would be great

trevor

The price shown is based on the customer's group. i.e. A customer may be a retail customer, wholesale customer, student etc. However, you could easily have a group for a country. i.e. during registration, all customers from that country are placed into that group.

When a product is retrieved using an API call, you have all prices in the product object so if the customer hasn't logged in yet, you can figure out based on his IP address where he is connecting from and display only the price that you want. Note that you may get into problems when using the search functionality based on a price range because that will use the standard price until the customer has logged in.

kans

Thanks a lot for your response.  I am slowly coming to terms.  I tried to create Customer Groups through the admin tool and was successful. 

However I am not clear about how to associate customers to customer groups automatically (not manually).  In other words, I want the application to associate a customer to a customer group as soon as he chooses his country during registration.  Does this require any programming?

The next question is about your suggestion on using the IP Address for getting the country.  I think this requires programming too.  If so, should I be modifying the Action Class?  Can you please guide me?  Even if I am able to get the IP Address the next problem would be to associate this "Yet-to-login" customer to a customer group so that the correct price is displayed.

Being a newbie to Konakart, this looks like an iceberg to me.  However I am basically a Struts developer so I can digest technically dense responses.

trevor

QuoteHowever I am not clear about how to associate customers to customer groups automatically (not manually).  In other words, I want the application to associate a customer to a customer group as soon as he chooses his country during registration.  Does this require any programming?


In the action class you could set the group id of the CustomerRegistration object before the KK API call is made to register the customer.

QuoteThe next question is about your suggestion on using the IP Address for getting the country.  I think this requires programming too.  If so, should I be modifying the Action Class?  Can you please guide me?  Even if I am able to get the IP Address the next problem would be to associate this "Yet-to-login" customer to a customer group so that the correct price is displayed.


This wouldn't work since the customer hasn't logged in yet. Once you've figured out which price to display based on the ip address you'd have to modify the JSPs that show the price by adding conditional logic telling them which price to show.