#__virtuemart_order_items で見つけることができる製品属性
フィールド product_attribute には、正確な値とカスタム フィールドのタイトルが含まれています。
例えば:
{"2558":" <span class=\"costumTitle\">Gift Wrap<\/span><span class=\"costumValue\" >Yes<\/span>"}
これは、product_attribute 列のフィールドの値です (json_encoded)
class customTitle class span はフィールド ラベルです。= ギフト包装。customValue クラスのスパンには値が含まれます。=はい
この値を次のように取得できます
スパンを持つ最初の html タグは、対応するシンボルに変換する必要があります。ここのように
<span class="costumTitle">Gift Wrap</span><span class="costumValue" >Yes</span>
次に、単純に json_decode($value,true); 戻り配列はコンテンツを適切に取得します
例えば:
$str = '{"2558":"<span class="costumTitle">Gift Wrap</span><span class="costumValue" >Yes</span>"}';
$ar = json_decode($str,true);
print_r($ar);
次のような出力:
Array ( [2558] => <span class="costumTitle">Gift Wrap</span><span class="costumValue" >Yes</span> ) .
それが役立つことを願っています..