Hi,
please, is there a way to show unpublished items in Inventory , so that we could see stocks for unpublished products too
Thanks.
Petra
You could just make a shopper group that no one sees... eg
call it 'unpublished' or 'not for sale'.. group
place the product in that group..
inventory would be seen and the product would not show in the shop.
You can easily make an override to the product list in admin that would show the stock:-
administrator/templates/isis/html/com_virtuemart/product/default.php
I like to have available and stock ("available" takes note of items that are on order)
$available = $product->product_in_stock - $product->product_ordered;
if ($available < 1){
echo "<div class='stockout'>";
echo "Out ". $available;
} elseif ($available > 1 && $available < $product->low_stock_notification ) {
echo "<div class='stocklow'>";
echo "Low ". $available;
} else {
echo "<div class='stockok'>";
echo "In ". $available;
}
echo "</div>";
echo 'Stk: '.$product->product_in_stock;
The divs just allow me to set colours via css
However if you must have this on the inventory page then the problem is in:-
administrator/components/com_virtuemart/views/inventory/view.html.php
$this->inventorylist = $model->getProductListing();
This assumes that only published is required and can be changed to:-
$this->inventorylist = $model->getProductListing(false,false,false,false);
Thank you, I will try it out, seem like good solutions to me both...
And this is Hutson - lol - your post to Pro in another message :-)
Excuse me? What are you talking about?
OOPs wires completely crossed - ignore :-)
OK, great to see that I am still sane :-)))
AH forgot to mention, that i added his line, so unpublished products should be loaded.
Perfect, is it in live version already, or will you send me last build for testing, Max?
http://virtuemart.net/news/latest-news/473-security-release-virtuemart-3-0-12