News:

Support the VirtueMart project and become a member

Main Menu

show number of stack product in virtumart

Started by rpynco, August 16, 2018, 07:16:38 AM

Previous topic - Next topic

rpynco

Hi
I use the (sj market) template for my website with joomla 3X
I want to know how to display the merchandise of virtumart in stock products on the home page.
for example:
30 item in stock
thanks

Jörgen

Probably something like this:

$stocklevel = $product->product_in_stock - $product->product_ordered;
echo $stocklevel . vmText::_ ('VM_ITEM_IN_STOCK'));


Otherwise, ask SJ market.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

rpynco

Thank
Where should I add this code to my template?

Jörgen

QuoteI use the (sj market) template for my website with joomla 3X

You have a custom template, my guess would be in the templates/your_template/html/com_virtuemart/sublayouts/products.php.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

rpynco

In the description of the product virtumart displays the product inventory only in stuck and I want to show the stuok count. Will this problem be replaced by the replacement of this code?

Jörgen

My code shows (instock - ordered) amount, I can not know what your current template shows.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

rpynco

my template show "in stock" too but i want to display the number of inventory for example "30 item in stock"
Did you understand؟

Jörgen

#7
NO, did You read my answer ?

available = instock - ordered, what Do You want to see ????

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

$product->product_in_stock - $product->product_ordered;
Display the stock that the customer can order