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

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

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

Postby » Fri Apr 01, 2022 3:24 pm

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;


Code: Select all
// show

see sample page here: [url][/url]

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

Stan, can you give me some feedback on this?

see smpl page here:
Posts: 35
Joined: Thu Jan 31, 2013 8:02 pm

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

Postby admin » Fri Nov 25, 2022 5:19 pm

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
Site Admin
Posts: 2680
Joined: Wed Jan 06, 2010 11:43 pm

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