本文整理汇总了PHP中VirtueMartModelCustomfields::displayCustomMedia方法的典型用法代码示例。如果您正苦于以下问题:PHP VirtueMartModelCustomfields::displayCustomMedia方法的具体用法?PHP VirtueMartModelCustomfields::displayCustomMedia怎么用?PHP VirtueMartModelCustomfields::displayCustomMedia使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VirtueMartModelCustomfields
的用法示例。
在下文中一共展示了VirtueMartModelCustomfields::displayCustomMedia方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderCustomfieldsFE
//.........这里部分代码省略.........
$selectType = 'select.genericlist';
if (!empty($customfield->is_input)) {
vmJsApi::chosenDropDowns();
$class = 'class="vm-chzn-select"';
}
} else {
$selectType = 'select.radiolist';
$class = '';
}
} else {
if ($type == 'M') {
$selectType = 'select.radiolist';
$class = '';
} else {
$selectType = 'select.genericlist';
if (!empty($customfield->is_input)) {
vmJsApi::chosenDropDowns();
$class = 'class="vm-chzn-select"';
}
}
}
if ($customfield->is_list and $customfield->is_list != 2) {
if (!empty($customfield->is_input)) {
$options = array();
if ($customfield->addEmpty) {
$options[0] = $emptyOption;
}
$values = explode(';', $customfield->custom_value);
foreach ($values as $key => $val) {
if ($val == 0 and $customfield->addEmpty) {
continue;
}
if ($type == 'M') {
$tmp = array('value' => $val, 'text' => VirtueMartModelCustomfields::displayCustomMedia($val, 'product', $customfield->width, $customfield->height));
$options[] = (object) $tmp;
} else {
$options[] = array('value' => $val, 'text' => tsmText::_($val));
}
}
$currentValue = $customfield->customfield_value;
$customfield->display = JHtml::_($selectType, $options, $customProductDataName . '[' . $customfield->virtuemart_customfield_id . ']', $class, 'value', 'text', $currentValue, $idTag);
} else {
if ($type == 'M') {
$customfield->display = VirtueMartModelCustomfields::displayCustomMedia($customfield->customfield_value, 'product', $customfield->width, $customfield->height);
} else {
$customfield->display = tsmText::_($customfield->customfield_value);
}
}
} else {
if (!empty($customfield->is_input)) {
if (!isset($selectList[$customfield->virtuemart_custom_id])) {
$selectList[$customfield->virtuemart_custom_id] = $k;
if ($customfield->addEmpty) {
if (empty($customfields[$selectList[$customfield->virtuemart_custom_id]]->options)) {
$customfields[$selectList[$customfield->virtuemart_custom_id]]->options[0] = $emptyOption;
$customfields[$selectList[$customfield->virtuemart_custom_id]]->options[0]->virtuemart_customfield_id = $emptyOption->value;
//$customfields[$selectList[$customfield->virtuemart_custom_id]]->options['nix'] = array('virtuemart_customfield_id' => 'none', 'text' => vmText::_ ('COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT'));
}
}
$tmpField = clone $customfield;
$tmpField->options = null;
$customfield->options[$customfield->virtuemart_customfield_id] = $tmpField;
$customfield->customProductDataName = $customProductDataName;
} else {
$customfields[$selectList[$customfield->virtuemart_custom_id]]->options[$customfield->virtuemart_customfield_id] = $customfield;
unset($customfields[$k]);