VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: micropalla on July 20, 2022, 15:35:58 PM

Title: Hide available stock
Post by: micropalla on July 20, 2022, 15:35:58 PM
I ask to template creator if he can fix it.

Next question. Is there a way to hide the number of items a customer can buy?
Do I need to edit the code or maybe there is a switch for situations like this?
As you can image the canva that can be sold is is just one.

Thank you
Title: hide available stock
Post by: micropalla on July 20, 2022, 16:33:47 PM
I've found this but  still are visible + and -

.quantity-box .quantity-input, .quantity-box .quantity-controls {
  display: none;
}
Title: Hide available stock
Post by: micropalla on July 20, 2022, 16:51:21 PM
It could also be enough not to allowed to buy two items if there is only 1 i stock but i don't know why even if only 1 is in stock VM allows you to buy 2 or more...
Maybe some configuration i am missing?
Title: Hide available stock
Post by: micropalla on July 20, 2022, 16:54:48 PM
OK just used the "maximum quantity that can be bought" field. Don't know if it is the right solution but it works.
Title: Re: Hide available stock
Post by: Jörgen on July 20, 2022, 21:26:24 PM
No that is not right.
In vm configuration you will find options on how to deal with ordered items and stock.
This does not hide stock, but decides how vm deals with out of stock ordering.

Hiding the available stock could be done with css, check your template for the right css.

Jörgen