Is it possible to force the user to select his country before he enters the store?

I think about something like that: http://www.thomann.de/

If he selects his country, it should be possible to save this in the cookie/session, and show him the correct price:

inclusive tax => in EU
or
exclusive tax=> not in the EU

best way will be to select the language at the same time (if there is i18n)

e.g.:
England (in EU) => Language exists: take english / TAX: with taxes
Germany (in EU) => Language exists: take german / TAX: with taxes
SPAIN (in EU) => Language "spanish" does not exist: take standard language (e.g. english) / TAX: with taxes
Argentina ( not in EU) => Language "spanish" does not exist: take standard language (e.g. english) / TAX: without taxes
USA ( not in EU) => Language exists: english / TAX: without taxes

is it possible?

Chears! I like your work!

PS: sorry for my english

Comments

iStryker’s picture

I am also looking for something like this

I am using this module for State Tax and would like to be able to specific the state before entering Ubercart

drupalok’s picture

+1 for this

longwave’s picture

This likely won't be a feature of uc_vat itself, as this could be useful to other users - preselecting the country or determining it via geolocation in some way may be helpful for all stores. Feel free to discuss possible implementations here, however!

lpalgarvio’s picture

dumping my idea^^

to avoid the problem of pre-selecting the first VAT, which is not always the intended VAT, i'd recommend this:
- optional integration with a Multiprice module (there's 4 or 5 of those), a Geo module (Location for example) or a Language module (selected language on l18n, harder to do)
- read the main VATs associated with the user (through defined shipping and billing addresses) from previous purchases

some multi-price / multi-currency and l18n modules:
- http://drupal.org/project/uc_multiprice
- http://drupal.org/project/multicurrency
- http://drupal.org/project/uc_cck_currency
- http://drupal.org/project/uc_multiple_currency (abandoned)

more here - http://drupal.org/node/855296#comment-3462982
some aren't published and i fetched them from ubercart forums

Bartezz’s picture

I request my users to enter certain details via profile.module.
Then via a custom module (too specific to share) I do a hook_user and set the country to be used in uc_multiprice from the profile details upon logging in.
(My site requires users to login to use the shop as it is a wholesale webshop and not for retail customers)

/**
 * Implementation of hook_user().
 */
function custommodule_user($op, &$edit, &$account, $category = NULL) {
  if ($op == 'login') {
    global $user;
    profile_load_profile($user);
    uc_multiprice_country_id($user->profile_country); 
  }
}

The reason I'm not using uc_multiprice methods of country determination are mentioned here; http://drupal.org/node/913788

Haven't looked into showing the price including VAT yet based on the users country yet... will post back if I find a solution to that.

Cheers

lpalgarvio’s picture

Status: Active » Needs work

bump

Bartezz’s picture

This issue came up again and I might have another solution. As I wrote before my store requires customers to log in but if this is not the case for you maybe you could create a small custom module.

With this module you could do a color/lightbox like page overlay requiring a customer to select their country before they can do anything on the page. You could inject this lightbox overlay when the session var country_id is missing. It's a similar solution to websites promoting alcohol where you have to select your date of birth before you can enter the site / view the pages.

Maybe this helps in such a setup;
http://drupal.org/project/splash
http://drupal.org/project/disclaimer

Cheers