本文整理汇总了PHP中VirtueMartModelCustomfields::_getCustomPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP VirtueMartModelCustomfields::_getCustomPrice方法的具体用法?PHP VirtueMartModelCustomfields::_getCustomPrice怎么用?PHP VirtueMartModelCustomfields::_getCustomPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VirtueMartModelCustomfields
的用法示例。
在下文中一共展示了VirtueMartModelCustomfields::_getCustomPrice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderCustomfieldsFE
//.........这里部分代码省略.........
$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]);
}
$default = reset($customfields[$selectList[$customfield->virtuemart_custom_id]]->options);
foreach ($customfields[$selectList[$customfield->virtuemart_custom_id]]->options as &$productCustom) {
if (!isset($productCustom->customfield_price)) {
$productCustom->customfield_price = 0.0;
}
$price = VirtueMartModelCustomfields::_getCustomPrice($productCustom->customfield_price, $currency, $calculator);
if ($type == 'M') {
if (!isset($productCustom->customfield_value)) {
$productCustom->customfield_value = '';
}
$productCustom->text = VirtueMartModelCustomfields::displayCustomMedia($productCustom->customfield_value, 'product', $customfield->width, $customfield->height) . ' ' . $price;
} else {
$trValue = tsmText::_($productCustom->customfield_value);
if ($productCustom->customfield_value != $trValue and strpos($trValue, '%1') !== false) {
$productCustom->text = tsmText::sprintf($productCustom->customfield_value, $price);
} else {
$productCustom->text = $trValue . ' ' . $price;
}
}
}
$customfields[$selectList[$customfield->virtuemart_custom_id]]->display = JHtml::_($selectType, $customfields[$selectList[$customfield->virtuemart_custom_id]]->options, $customfields[$selectList[$customfield->virtuemart_custom_id]]->customProductDataName, $class, 'virtuemart_customfield_id', 'text', $default->customfield_value, $idTag);
//*/
} else {
if ($type == 'M') {
$customfield->display = VirtueMartModelCustomfields::displayCustomMedia($customfield->customfield_value, 'product', $customfield->width, $customfield->height);
} else {
$customfield->display = tsmText::_($customfield->customfield_value);
}
}
}
break;
// Property
// Property
case 'P':
//$customfield->display = vmText::_ ('COM_VIRTUEMART_'.strtoupper($customfield->customfield_value));
$attr = $customfield->customfield_value;
$lkey = 'COM_VIRTUEMART_' . strtoupper($customfield->customfield_value) . '_FE';
$trValue = tsmText::_($lkey);