VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: rogerd on March 23, 2018, 09:15:51 AM

Title: Shopper Fields dependent on shipping method, is it possible?
Post by: rogerd on March 23, 2018, 09:15:51 AM
Is it possible to have Shopper Fields dependent on the shipping method?

I sell digital downloads and tangible goods during checkout if the client is only purchased things deliverable by email I don't want them to have to fill out the address fields, but if it's a tangible goods then present mailing address fields. Can virtuemart do this natively or are there any plugins to provide this?

Thank you very much

Virtuemart version 3.2.12 J3.8.3
Title: Re: Shopper Fields dependent on shipping method, is it possible?
Post by: Studio 42 on March 23, 2018, 12:01:10 PM
I dont think that a plugin can do it, or you have to invert the field display logic with the plugin.
For eg, convert adress, last name or any fields to a plugin.
Check with the plugin If all product are digiital then not render the fields else display it.
Another solution, is to loop the products in the template overide file to check for digital and add a hide class and prefill the adress for mandatory fields with javascripts.
Title: Re: Shopper Fields dependent on shipping method, is it possible?
Post by: rogerd on March 30, 2018, 16:08:33 PM
Thank you for the information. I've looked into add-on extensions, plugins, etc. only able to find ones that pertain to shipping methods nothing to control the Shopper Fields.  From what I can tell it would need to be essentially the same code already used by the shipping methods querying the shipping weight and if it exceeds zero present fields for physical shipping.

I noticed your tag says developer is this something you'd be interested in doing, if yes, approximately how much would it cost?