Limit a product to U.S. purchasers?

General ShopSite user discussion

Limit a product to U.S. purchasers?

Postby gkrehbiel » Tue Mar 27, 2012 6:03 am

Is there a way to set a product so that it can only be purchased by people who enter a United States address?

I am running ShopSite® Pro 10 sp2 r2.

Thanks,

Greg
gkrehbiel
 
Posts: 97
Joined: Mon Jun 15, 2009 11:31 am
Location: Washington, D.C.

Re: Limit a product to U.S. purchasers?

Postby Jim » Tue Mar 27, 2012 7:07 am

There is no built in way to limit a single product to being bought just in the US.

You could probably add some javascript to the cart to check for that specific product and if it is in the cart and the shipping destination country is not the US then block the checkout button and put up a message saying the product can only be shipped to US addresses. You would add the javascript on Commerce Setup > Order System > Shopping cart > Javascript added at start of
built-in CheckIt function:
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Limit a product to U.S. purchasers?

Postby gkrehbiel » Tue Mar 27, 2012 7:13 am

That sounds reasonable. Thanks.
gkrehbiel
 
Posts: 97
Joined: Mon Jun 15, 2009 11:31 am
Location: Washington, D.C.

Re: Limit a product to U.S. purchasers?

Postby gkrehbiel » Tue Mar 27, 2012 9:21 am

Jim, I talked this over with our developer and he says the sku and the drop-down aren't available to the javascript because they're generated by a perl script that runs at the server level.

Would we have to modify the perl scripts to include the "on select" and where we get the sku?

Thanks,

Greg
gkrehbiel
 
Posts: 97
Joined: Mon Jun 15, 2009 11:31 am
Location: Washington, D.C.

Re: Limit a product to U.S. purchasers?

Postby Jim » Tue Mar 27, 2012 9:40 am

ShopSite cgis are NOT perl they are compiled C code. There are javascript variables in the cart (Pro level stores, partial in Manager) with information on the contents of the cart. See http://shopsite.com/help/11.1/en-US/sc/pro/cart.variables.html for a list of the javascript variables that you have access to.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Limit a product to U.S. purchasers?

Postby chico » Wed Nov 21, 2012 1:48 pm

Any progress on this? I cannot ship a certain product to US addresses.

Thanks.
chico
 
Posts: 31
Joined: Tue Mar 09, 2010 4:03 pm
Location: Central North America

Re: Limit a product to U.S. purchasers?

Postby Jim » Wed Nov 21, 2012 2:05 pm

Nothing has been implemented by ShopSite in this regard.

There are posts on the forum talking about how to use javascript and the checkit function to limit shipping. There is also a post on Lexiconn's forum about how to do several things with javascript in the shopping cart. See the post at: http://support.lexiconn.com/news/viewtopic.php?t=289
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 131 guests