by admin » Mon Aug 02, 2021 4:55 pm
hello, you might want to create the field (cart field only) in virtuemart and mark it as "custom rendered" within opc shopper field configuration (and order field)
then you need to render it inside main opc form in onepage.unlogged(+logged+registration).tpl.php file as
<input type="hidden" name="{your vm field as you created it}" value="<?php htmlentities(json_encode($any_data_you_can_get_with_php)); ?>" id="my_custom_input" />
and/or you might want to inject the data with javascript per the ID of the hidden input.
there are other ways in OPC on how to handle this depending on security and source of the datas.
best regards, stan