本文整理汇总了PHP中TiendaSelect::productattributeoptions方法的典型用法代码示例。如果您正苦于以下问题:PHP TiendaSelect::productattributeoptions方法的具体用法?PHP TiendaSelect::productattributeoptions怎么用?PHP TiendaSelect::productattributeoptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TiendaSelect
的用法示例。
在下文中一共展示了TiendaSelect::productattributeoptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getProductAttributeOptions
/**
* Expected to be called from ajax
*/
public function getProductAttributeOptions()
{
$attribute_id = JRequest::getInt('attribute_id', 0);
$name = JRequest::getVar('select_name', 'parent');
$id = JRequest::getVar('select_id', '0');
$response = array();
$response['msg'] = '';
$response['error'] = '';
if ($attribute_id) {
Tienda::load('TiendaSelect', 'library.select');
$response['msg'] = TiendaSelect::productattributeoptions($attribute_id, 0, $name . "[" . $id . "]");
} else {
$response['msg'] = '<input type="hidden" name="' . $name . "[" . $id . "]" . '" />';
}
echo json_encode($response);
}
示例2: foreach
echo TiendaHelperBase::currency($product->price);
?>
</span>
<!--attribute options-->
<div id='product_attributeoptions'>
<?php
$attributes = TiendaHelperProduct::getAttributes($product->product_id);
foreach ($attributes as $attribute) {
?>
<div class="pao" id='productattributeoption_<?php
echo $attribute->productattribute_id;
?>
'>
<?php
echo TiendaSelect::productattributeoptions($attribute->productattribute_id, '', 'attribute_' . $attribute->productattribute_id);
?>
</div>
<?php
}
?>
</div>
<!--quantity-->
<div id='product_quantity_input'>
<span class="title"><?php
echo JText::_('COM_TIENDA_QUANTITY');
?>
:</span>
<input type="text" name="product_qty" value="1" size="5" />
</div>
示例3: array
echo $attribute->productattribute_id;
?>
'>
<?php
echo "<span>" . $attribute->productattribute_name . " : </span>";
$key = 'attribute_' . $attribute->productattribute_id;
$selected = !empty($values[$key]) ? $values[$key] : '';
Tienda::load('TiendaSelect', 'library.select');
/*
$attribs = array('class' => 'inputbox',
'size' => '1',
'onchange'=>"Tienda.UpdateAddToCart( 'product','product_buy_".$item->product_id."', document.".$formName.", ".$working_image.", '".JText::_('COM_TIENDA_UPDATING_ATTRIBUTES')."' );"
);
*/
$attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => "Tienda.UpdateChangedAttribute( document." . $formName . ", " . $attribute->productattribute_id . ");\r\n Tienda.UpdateAddToCart( 'product','product_buy_" . $item->product_id . "', document." . $formName . ", " . $working_image . " );", 'changed_attr' => $changed_attr, 'changed_pao' => $changed_pao, 'pid' => $item->product_id);
echo TiendaSelect::productattributeoptions($attribute->productattribute_id, $selected, $key, $attribs);
?>
</div>
<?php
}
?>
<?php
if (!empty($vars->onDisplayProductAttributeOptions)) {
?>
<div class='onDisplayProductAttributeOptions_wrapper'>
<?php
echo $vars->onDisplayProductAttributeOptions;
?>
</div>
<?php
示例4: array
$opt->load($item->parent_productattributeoption_id);
$attribute_id = $opt->productattribute_id;
} else {
$attribute_id = 0;
}
echo TiendaSelect::productattributes($attribute_id, $row->product_id, $item->productattribute_id, array('class' => 'inputbox', 'size' => '1'), null, $allowAny = true, $title = 'COM_TIENDA_NO_PARENT');
?>
<div id="parent_option_select_<?php
echo $item->productattribute_id;
?>
">
<?php
if ($item->parent_productattributeoption_id) {
echo TiendaSelect::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;">