Shopper Fields Display by Shopper Group

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Shopper Fields Display by Shopper Group

Postby spike1968 » Wed Apr 19, 2023 3:04 pm


I want to display a custom shopper field by shopper group.

1. Does opc support this
2. If not where would I go to add custom code to do so.

Once again thanks for a brilliant component.
Posts: 18
Joined: Thu Nov 24, 2016 10:14 am

Re: Shopper Fields Display by Shopper Group

Postby admin » Fri Jun 23, 2023 12:16 pm

hello, this can be only done by custom logic within opc's theme's overrides/list_user_fields.{shipping+registration}.tpl.php


in latest opc there is an option to hide/show make required fields per:
- b2c vs b2b (where b2b comes from shopper groups configured in our moss plugin) - or you can use your own plugin to define shopper groups wich are b2b vs b2c
- hide/show field per "business selector" (you can choose a field that works as a business selector - dropdown,checkbox, etc... ) and when this field got proper value then other fields are shown/hidden
- latest opc has a new registration link to differentiate b2c vs b2b

for validation to work you might alter also overrides/onepage.cfg.php to define which fields are not required (or other logic from OPC Shopper fields) per current user's state.

best regards, stan
Site Admin
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Return to One Page Checkout for Virtuemart 3 on Joomla 3.x