/**
  * 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);
 }
Exemple #2
0
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>
Exemple #3
0
    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 
Exemple #4
0
        $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;">