Page 1 of 1

Is this a bug with the business tab in the OPC-menu?

PostPosted: Fri Apr 01, 2022 3:24 pm
by joomla@.....de
I'm not sure if the following behavior is a bug or if I'm following an incorrect premise.
I have created some costom fields in VM. In the OPC custom fields configuration, I have set this to business field only.
However, at checkout, these fields are always displayed, regardless of whether I click visitor or business in the OPC menu. Only when I also deactivate the checkbox for creating an account are these fields hidden as desired. But that only happens after I click on visitor again via the OPC menu.
I thought that with the OPC menu I could differentiate between visitors and business customers. But there is probably a difference between guest customers without an account and regular customers with an account. But why is the column called "Business field only"?
I took a look at the responsible script onepage.js. I think I can achieve the desired behavior by changing the line from 6247 onwards.
Code: Select all
// show

is_b = true;
break;


in

Code: Select all
// show

see sample page here: [url]https://www.etus-landgraf.com/teile-shop/warenkorb[/url]

if (d.value == 1) { is_b = true } else { is_b = false }
break;


Stan, can you give me some feedback on this?

see smpl page here: https://www.etus-landgraf.com/teile-shop/warenkorb

Re: Is this a bug with the business tab in the OPC-menu?

PostPosted: Fri Nov 25, 2022 5:19 pm
by admin
hello, i did quite a lots fixed and mods in this matter in last few months, including adding a "business support" for fields like company name (when not empty, display business fields... )

let me know at email if still have any issues with the current logic in this area, if opc can properly detect wrappers of the fields, it will hide b2c fields when business selector is detected. (including defualt values when customer first enters the cart)

best regards, stan