本文整理匯總了PHP中comquick2cartHelper::getAttributeOptionCurrPrice方法的典型用法代碼示例。如果您正苦於以下問題:PHP comquick2cartHelper::getAttributeOptionCurrPrice方法的具體用法?PHP comquick2cartHelper::getAttributeOptionCurrPrice怎麽用?PHP comquick2cartHelper::getAttributeOptionCurrPrice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::getAttributeOptionCurrPrice方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAttrFieldTypeHtml
function getAttrFieldTypeHtml($data)
{
$parent = '';
if (isset($data['parent'])) {
$parent = $data['parent'];
}
$product_id = $data['product_id'];
$comquick2cartHelper = new comquick2cartHelper();
// $atri_options = comquick2cartHelper::getAttributeOption($attribute->itemattribute_id);// commented during multicurrency
$atri_options = $comquick2cartHelper->getAttributeOptionCurrPrice($data['itemattribute_id']);
$select_opt = array();
$userData = array();
$userData[] = 'Textbox';
if (!$data['attribute_compulsary'] && !in_array($data['fieldType'], $userData)) {
$select_opt[] = JHtml::_('select.option', "", "");
}
$returnHtml = '';
foreach ($atri_options as $atri_option) {
$attOp_price = (int) $atri_option->itemattributeoption_currency_price;
// IF 0 ATT PRIVE THEN DONT ADD +0 USD
if (!empty($attOp_price)) {
$priceText = $comquick2cartHelper->getFromattedPrice($atri_option->itemattributeoption_currency_price, NULL, 0);
$opt_str = $atri_option->itemattributeoption_name . ": " . $atri_option->itemattributeoption_prefix . " " . $priceText;
} else {
// If no price than dont append like +00.0 USD
$opt_str = $atri_option->itemattributeoption_name;
}
// Generate op according to datatype
if (in_array($data['fieldType'], $userData)) {
$returnHtml = "<input type='text' name='qtcUserField_" . $atri_option->itemattributeoption_id . "' class='input input-small " . $parent . '-' . $product_id . '_UserField' . "' >";
} else {
/* Amol change*/
$default_value = '';
if (isset($data['default_value'])) {
$default_value = $data['default_value'];
}
$field_name = 'attri_option';
if (isset($data['field_name'])) {
$field_name = $data['field_name'];
}
// user data
$select_opt[] = JHtml::_('select.option', $atri_option->itemattributeoption_id, $opt_str);
$returnHtml = JHtml::_('select.genericlist', $select_opt, $field_name, " class='q2c_AttoptionsMaxWidth {$parent}-{$product_id}_options'", 'value', 'text', $default_value, false);
}
}
return $returnHtml;
/* if (!in_array($data['fieldType'],$userData)) {
echo JHtml::_('select.genericlist', $select_opt, 'attri_option', " class='span2 {$parent}-{$product_id}_options'", 'value', 'text', '',false);
}*/
}