Link to home
Start Free TrialLog in
Avatar of Amanda Watson
Amanda WatsonFlag for Australia

asked on

How can I restrict purchases from Australia only in Virtuemart

Hi ,
Just wondering if someone can tell me how to restrict purchases to come only from Australian in Virtuemart.

At this stage we can only ship to Australia so how can I configure this so shoppers from Overseas will not be able to proceed?
Avatar of Snarfles
Snarfles
Flag of Australia image

I cant find any options for restricting users based on location so I think this will need to be a hack to the australia post shipping module. It would basically mean finding the code that generate that country drop down list, setting the default to Australia and removing the others from the list. Would that be acceptable?
Avatar of Amanda Watson

ASKER

Um, I think that would be ok....

So which  module do I hack  -

What is the australia post module?
ASKER CERTIFIED SOLUTION
Avatar of Snarfles
Snarfles
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hmmm, that is a rather direct attempt at fixing it isn't it.

Before doing that, which I will try if that is all the suggestions I get, I will wait to see if there is a less intrusive way of doing it.

I feel a bit more comfortable removing the countries from the drop down that directly in the database
Fair call, though it shouldnt be any issue really.

The added benefit from working directly in the database is that for every drop down that uses that table will be fixed instantly... whereas you might need to find mroe than one instance of a drop down list. I can think of at least 2 straight off the top of my head... (signup page and then the add additional address page.)
Just an addition here, I would like to accept registrations from all of the country, but they can't actually purchase anything, so not allowing people to register to buy is not going to be a solution, so Snarfles, deleting the countries from vm_countries...will that cause an issue with registration?
I believe so yes.

:/
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Storm,
That will actually work, and we will use that also, but I guess I don't want to annoy overseas shoppers by having them enter in all their details only be halted at the last minute... but we will add a notice and apply this also.
Thank you.
A
This was the solution found on the other thread...

So looking at the code and keywords you have virtuemart. According to this you can maintain the list of countries thru Admin/List of Countries

Is this available to you?

http://virtuemart.net/documentation/User_Manual/Peripheral_Admin_Configuration.html
There was another solution found also that would work