Page 1 of 1

Shopper Fields Display by Shopper Group

PostPosted: Wed Apr 19, 2023 3:04 pm
by spike1968
Hi,

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.

Re: Shopper Fields Display by Shopper Group

PostPosted: Fri Jun 23, 2023 12:16 pm
by admin
hello, this can be only done by custom logic within opc's theme's overrides/list_user_fields.{shipping+registration}.tpl.php

OR

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