VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: gsstephens on October 20, 2014, 21:19:46 PM

Title: ship to address
Post by: gsstephens on October 20, 2014, 21:19:46 PM
VM 2 2.6.8
Joomla 2.5
Rockettheme

www.coastal.bigmonstermarketing.com

I sell firearms.  when firearms are added to the cart i need my "Ship To" to be required.  In the US you CANNOT purchase a firearm and have it delivered to your home.  It can ONLY be delivered to an Authorized and Licensed Federal Firearms dealer.

So, when a firearm is added to the cart i need a rule that stipulates that the "Ship To" is required.

If anyone can assist me in this I'd appreciate it.

Thanks
Title: Re: ship to address
Post by: GJC Web Design on October 21, 2014, 02:27:54 AM
Easiest would be some javascript that requires the ST fields to be filled
Title: Re: ship to address
Post by: gsstephens on October 21, 2014, 21:19:50 PM
good idea. the script would be product based, correct?
Title: Re: ship to address
Post by: GJC Web Design on October 21, 2014, 22:16:24 PM
you don't say if an ST address is required on every order...

normally you would trigger it by the submit - if ST field(s) not filled then show an error and not submit
Title: Re: ship to address
Post by: gsstephens on October 21, 2014, 22:23:29 PM
Not every checkout will need "ST".

If a firearm is a added to the cart then the "ST" takes on a different role/meaning.  In order for a purchaser to receive their firearm then it must be shipped to an "FFL" Federal Firearms Licensed dealer.

So, the "ST" is the FFL's contact info and address.
Title: Re: ship to address
Post by: GJC Web Design on October 21, 2014, 22:30:47 PM
then you will need a if statement  - if cart contains prod from (cat array of firearms)  then echo this JS validation
Title: Re: ship to address
Post by: alatak on October 22, 2014, 17:59:26 PM
Hello
May be you can add a custom field that requires to enter a ST address for that product.
If someone buys a knife and a firearm, you can deliver the knife to the ST, and the firearm to the specific address given in the custom field.