News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Text input plugin does not output it's content. J2.5.4 VM2.0.6a

Started by milemaker, June 05, 2012, 09:13:38 AM

Previous topic - Next topic

milemaker

i had to downgrade from 2.0.7 back to 2.0.6a (to resolve cart variant price issue).

i am facing new problem however.

cart's custom field text input "vmcustom-textinput" plugin saves content to the database (virtuemart_order_items table) but does not output to admin / emails / invoice. (this does work in 2.0.7)

allowing vmdebug in customfields.php i can see content of input field as follows:

vmdebug $param Var1:
Add Gift Card yes

vmdebug $param Var1:
Array
(
    [textinput] => Array
        (
            [comment] => message test
        )
)


vmdebug $param Var1:
Please specify delivery dateTuesday 12th June

output is void however:
<p class="product-field-type-V">Add Gift Card yes</p>
<p class="product-field-type-E">Gift Card Message </p>
<p class="product-field-type-V">Please specify delivery date Tuesday 12th June</p>

desired output:
<p class="product-field-type-E">Gift Card Message message test</p>

customfields.php
if ($item->productCustom->field_type == "E") {
   

    } elseif ($item->productCustom->field_type == "G") {
    $child = self::getChild($item->productCustom->custom_value);
$value = $child->product_name;
} elseif ($item->productCustom->field_type == "M") {
$value = self::displayCustomMedia($item->productCustom->custom_value);
    } elseif (($item->productCustom->field_type == "S")) {
$value = $item->productCustom->custom_value;
}  else {
$value = $item->productCustom->custom_value;
    }
$html .=ShopFunctionsF::translateTwoLangKeys($item->productCustom->custom_title,$value);

$html .= '</p>';
    } else {
    // falldown method if customfield are deleted
    foreach((array)$param as $key => $value) {
$html .= '<br/ >'.($key?'<span>'.$key.' </span>':'').$value;
    }
    vmdebug('CustomsFieldOrderDisplay, $item->productCustom empty? '.$virtuemart_customfield_id);
    }



Database: virtuemart_order_items table
{"2006":" <span class=\"costumTitle\">Add Gift Card<\/span><span class=\"costumValue\" >yes<\/span>","1992":{"textinput":{"comment":"message test"}},"1999":" <span class=\"costumTitle\">Please specify delivery date<\/span><span class=\"costumValue\" >Tuesday 12th June<\/span>"}


any help would be much appreciated.

big thanks.

[attachment cleanup by admin]

milemaker

managed to make this work combining  some customfields.php 2.0.6 and 2.0.7 functions