VirtueMart Forum

VirtueMart 2 + 3 => Product pricing => Topic started by: cvrak on July 13, 2021, 11:21:19 am

Title: Product availabiity - order question
Post by: cvrak on July 13, 2021, 11:21:19 am
Hi,
I have some sold out products, I want to be displayed in category view with prices (for the visitor to have an idea about all products) and I need that the customer cannot order it (by mistake). I've created a category "sold out" for these products.
How can I do it? Is it possible to de-activate order buttons just for the specific category?

Thanks

Joomla 3.9.27
php 7.4.20
VM 3.8.8
Title: Re: Product availabiity - order question
Post by: Jörgen on July 13, 2021, 11:24:27 am
In VM back end configuration->shop front

You have settings for when a product is out of stock. Please check.

Jörgen @ Kreativ Fotografi
Title: Re: Product availabiity - order question
Post by: cvrak on July 14, 2021, 08:23:18 am
I set " Displays 'Notify Me' instead of 'Add To Cart' button " and with a display:none css rule I hide it.
Thanks a lot!


In VM back end configuration->shop front

You have settings for when a product is out of stock. Please check.

Jörgen @ Kreativ Fotografi
Title: Re: Product availabiity - order question
Post by: PRO on July 16, 2021, 21:39:08 pm
for mine, i set availability to "stock"

Then, hide the add to cart form

   $cart_template='addtocart';
      if (($hasChilds==1) OR (KaizenProduct::hasParent($this->product->virtuemart_product_id))){
      echo shopFunctionsF::renderVmSubLayout('addtocartchilds',array('product'=>$this->product,'tall'=>$tall,'buy_split'=>$buy_split,'customs_count'=>$customs_count));
      
      }
      else{
      if ($this->product->product_availability!='stock'){
         echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$this->product,'tall'=>$tall,'buy_split'=>$buy_split,'customs_count'=>$customs_count));
         }