Hi guys, i have country restrictions on products ...
# suitecommerce
m
Hi guys, i have country restrictions on products so i need to force a hard stop if you were trying to ship to an area that i cant deliver to. Is there any way to determine the country the user is reside in? Maybe based on ip? Is there a 3rd party module/integration maybe? Best Maik
r
You have several options depending on how exactly you want to notify the customer. 1) Using IP detection show popup/message on site that you do not deliver to their country. Obviously these IP databases are not 100% 2) When user puts in their shipping details you do the hard stop at that point.
3) Let the order come into NS and then have a workflow to check and block those that have shipping to countries you cannot ship to
t
s
PCVs can certainly help if you already know who your customers are, but I don't think there's an OOTB solution for anonymous customers. It's difficult to apply computational restrictions until the shipping or billing location is known, which means the user must be logged in or in the checkout (and then beyond the first step)
Even then, a concept of 'shipping restrictions' I think only applies to shipping methods and not individual items, so you'd have to code something custom
In other words, it's probably going to have to include a lot of item tagging/categorisation and then some SuiteScript that checks the cart's items and shipping locations
beforeSubmit
A simple example might be to add an approvals workflow. Eg every order that is submitted goes through the workflow, if it contains restricted items, then its put on hold until approved by a human
m
@Steve Goldberg @Rehan Ali @TheAntman thanks a lot guys!
@Rehan Ali for your first answer: is there any 3rd party solution or do i need to code something custom ?
r
I've used this in the past https://www.ip2location.com/web-service
m
@Rehan Ali thanks. And maybe last question: should i code some custom suitescript for that or how do i should implement this. Sorry for the basic question.. im kinda new to suitecommerce/suitescript and the project. Comming from php world..
r
@maik_sk Apologies I'm not a hands-on SuiteScript developer. If you go through the developer docs (https://developers.suitecommerce.com) it will give the options to implement this.