本文整理汇总了PHP中CitruscartSelect::productattributeoptions方法的典型用法代码示例。如果您正苦于以下问题:PHP CitruscartSelect::productattributeoptions方法的具体用法?PHP CitruscartSelect::productattributeoptions怎么用?PHP CitruscartSelect::productattributeoptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CitruscartSelect
的用法示例。
在下文中一共展示了CitruscartSelect::productattributeoptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getProductAttributeOptions
/**
* Expected to be called from ajax
*/
public function getProductAttributeOptions()
{
$app = JFactory::getApplication();
$attribute_id = $app->input->getInt('attribute_id', 0);
$name = $app->input->getString('select_name', 'parent');
$id = $app->input->getString('select_id', '0');
$response = array();
$response['msg'] = '';
$response['error'] = '';
if ($attribute_id) {
Citruscart::load('CitruscartSelect', 'library.select');
$response['msg'] = CitruscartSelect::productattributeoptions($attribute_id, 0, $name . "[" . $id . "]");
} else {
$response['msg'] = '<input type="hidden" name="' . $name . "[" . $id . "]" . '" />';
}
echo json_encode($response);
}
示例2: foreach
if (!$selected_opts) {
$selected_opts = $default;
$selected_opts[] = 0;
}
foreach ($attributes as $attribute) {
?>
<div class="pao" id='productattributeoption_<?php
echo $attribute->productattribute_id;
?>
'>
<?php
echo "<span>" . $attribute->productattribute_name . " : </span>";
$key = 'attribute_' . $attribute->productattribute_id;
$selected = !empty($values[$key]) ? $values[$key] : $default[$attribute->productattribute_id];
$attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => "Citruscart.UpdateChangedAttribute( document.adminForm, " . $attribute->productattribute_id . ");Citruscart.UpdateAddToCart( 'pos', 'product_buy', document.adminForm, true );", 'changed_attr' => $changed_attr, 'changed_pao' => $changed_pao, 'pid' => $row->product_id);
echo CitruscartSelect::productattributeoptions($attribute->productattribute_id, $selected, $key, $attribs, null, $selected_opts);
?>
</div>
<?php
}
if (count($attributes)) {
?>
<input type="hidden" name="changed_attr" value="" />
<?php
}
?>
<?php
if (!empty($this->onDisplayProductAttributeOptions)) {
?>
<div class='onDisplayProductAttributeOptions_wrapper'>
示例3: array
Citruscart::load('CitruscartTableProductAttributeOptions', 'tables.productattributeoptions');
$opt = JTable::getInstance('ProductAttributeOptions', 'CitruscartTable');
$opt->load($item->parent_productattributeoption_id);
$attribute_id = $opt->productattribute_id;
} else {
$attribute_id = 0;
}
echo CitruscartSelect::productattributes($attribute_id, $row->product_id, $item->productattributeoption_id, array('class' => 'input-mini'), null, $allowAny = true, $title = 'COM_CITRUSCART_NO_PARENT');
?>
<div id="parent_option_select_<?php
echo $item->productattributeoption_id;
?>
">
<?php
if ($item->parent_productattributeoption_id) {
echo CitruscartSelect::productattributeoptions($attribute_id, $item->parent_productattributeoption_id, 'parent[' . $item->productattributeoption_id . ']', array('class' => 'input-mini'));
}
?>
</div>
</td>
<td>
<?php
echo CitruscartSelect::booleans($item->is_blank, 'blank[' . $item->productattributeoption_id . ']', array('class' => 'input-mini'), null, false, 'Select State', 'Yes', 'No');
?>
</td>
<td>
<input type="text" class="span1" name="ordering[<?php
echo $item->productattributeoption_id;
?>
]" value="<?php
echo $item->ordering;
示例4: array
$opt->load($item->parent_productattributeoption_id);
$attribute_id = $opt->productattribute_id;
} else {
$attribute_id = 0;
}
echo CitruscartSelect::productattributes($attribute_id, $row->product_id, $item->productattribute_id, array('class' => 'inputbox', 'size' => '1'), null, $allowAny = true, $title = 'COM_CITRUSCART_NO_PARENT');
?>
<div id="parent_option_select_<?php
echo $item->productattribute_id;
?>
">
<?php
if ($item->parent_productattributeoption_id) {
echo CitruscartSelect::productattributeoptions($attribute_id, $item->parent_productattributeoption_id, 'parent[' . $item->productattribute_id . ']');
}
?>
</div>
</td>
<td style="text-align: center;">
<input type="text" name="ordering[<?php
echo $item->productattribute_id;
?>
]" value="<?php
echo $item->ordering;
?>
" size="10" class="input-tiny" />
</td>
<td style="text-align: center;">