addStandardDefaultViewLists($model); $this->inventorylist = $model->getProductListing(false,false,false,false); $this->pagination = $model->getPagination(); // Apply currency $currencydisplay = CurrencyDisplay::getInstance(); foreach ($this->inventorylist as $virtuemart_product_id => $product) { //TODO oculd be interesting to show the price for each product, and all stored ones $product->product_in_stock $price = isset($product->allPrices[$product->selectedPrice]['product_price'])? $product->allPrices[$product->selectedPrice]['product_price']:0; $product->product_instock_value = $currencydisplay->priceDisplay($price,'',$product->product_in_stock,false); $product->product_price_display = $currencydisplay->priceDisplay($price,'',1,false); $product->weigth_unit_display= ShopFunctions::renderWeightUnit($product->product_weight_uom); } $options = array(); $options[] = JHtml::_('select.option', '', vmText::_('COM_VIRTUEMART_DISPLAY_STOCK').':'); $options[] = JHtml::_('select.option', 'stocklow', vmText::_('COM_VIRTUEMART_STOCK_LEVEL_LOW')); $options[] = JHtml::_('select.option', 'stockout', vmText::_('COM_VIRTUEMART_STOCK_LEVEL_OUT')); $this->lists['stockfilter'] = JHtml::_('select.genericlist', $options, 'search_type', 'onChange="document.adminForm.submit(); return false;"', 'value', 'text', vRequest::getVar('search_type')); $this->lists['filter_product'] = vRequest::getVar('filter_product'); /* Toolbar */ $this->SetViewTitle('PRODUCT_INVENTORY'); JToolBarHelper::publish(); JToolBarHelper::unpublish(); parent::display($tpl); } } // pure php no closing tag