There's a way around it, just make a few adjustments in the helper.
First you add the key the the array $hide you mentioned above. It's on line 74.
$hide = array("cf_id", "uid", "recordtime", "ipaddress", "cf_user_id", "formkey", "adjust_price");
Then on line 322 the function ValuesfromFormid is called from within VirtueMart when calculating price. You want your hidden adjustment value shown here! So we add an attribute to the function to tell it we need the value. Make it:
| Code: |
$formvalues = modBixvmChronoHelper::ValuesfromFormid ( $formid, 1, 'adjust_price' );
|
Then go to the function on line 61 and add the attribute. Give it an empty default value '', so it won't be missed if called without the parameter.:
| Code: |
function ValuesfromFormid ( $formid, $object = 0, $showfield = '' ) {
|
Then add it to the equation on line 77:
| Code: |
if ( !in_array($key, $hide) && $value != '' || $key == $showfield ) {
|
You should have 'adjust_price' in the hide array, as you did before.
It is hidden if the parameter showfield is empty (when called from cart-view), and shown when called with the attribute from VM product-class.
I didn't test it, so please let me know if it worked.
Good luck!
Matthijs