News:

Support the VirtueMart project and become a member

Main Menu

limite online store to one city

Started by rezaei.m.p, May 05, 2020, 03:34:15 AM

Previous topic - Next topic

rezaei.m.p

Dear all users
I want to have an online store that only people from my city can buy the product.
How can limite online store to one city?
I found that how can limite to one counrty but I can not find any option for city.
thanks

diri

#1
For such a limit there is a quick'n dirty method:

Add city to country list.

BUT:
How do you want to detect location of visitor?

You can't trust IP location!

Eg my location is shown in range of 12km to about 40km in dependancy of line being used and service being used to check location but never exact. Your extern IP is assigned to location of exit point at your provider which can be a moving target.

edit: In range about 10 km of my location there are more than 10 cities each with 4.000+ citizens (largest one 100.000+).

cu, diri

GJC Web Design

depends where you are ( with an accurate fine grained postcode system) and if the products are delivered..

If delivered then exclude all postcodes or addresses except ones within your city limits...

as diri says .. ip detection is not accurate for this but address detection if enforced would be

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rezaei.m.p

Is it possible to more explain? How can we limit deliver by range postcode?

Jörgen

min and max zip code in cofiguration for shipment method.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

AH

You need to inform the customer before attempts at ordering are made

Shipping Plugins only work after address is completed. It may be better for customer experience to inform customers of the city limitations and do further tests in the checkout form.

The challenge surely is not to allow orders/customer address at all from outside of a "defined" city

Which seems to indicate to me that the shopperfields - City  should be "fixed" in the address details and read only (see below for "fixing a default value"). This is simple configuration to pre-fill city and not allow editing

Of course your country settings would just enable only the single Country and the country address field would default to this.

Once the city is fixed - the postcode becomes another "useful piece of information" - but the customer now knows that the City is fixed!

Form there you can use a standard shipping plugin as the City is "YOUR city" so maybe you dont need to cater for lower level postal code variations.


Regards
A

Joomla 3.10.11
php 8.0

diri

From technical point of view limiting to zip code is a very good solution but:

I'm pretty sure it's not that good for reputation of site if somebody living outside of range covered can start order process. There should be a very clear message before.

For me there is no way to block ordering even with most accurate data related to IP and provider ($$) when user visits site from foreign country and wants to place some order (i.e. address in valid range in France, order placed in Switzerland).

cu, diri

Jörgen

@diri

Have You even looked at the shipment module ?

There is a choice to limit by country, zip, weight, nr of products, ordervalue, categories and blocking categories.

If this isn´t enough, then You will have to looka at another solution. There may be some alrady out there. Open Tools have an unsupported free plugin.

Stopping the customer on IP at the gate would be nice, but that takes some custom work to get it working.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

AH

We have no idea what the site is offering - and what information is provided to the consumer - so lets not speculate.

My solution will work so please read it.

IP stuff (it cannot work!!)

Simple message can be added on the site etc

NO costly plugins - base VirtueMart with standard shipping
Regards
A

Joomla 3.10.11
php 8.0