Author Topic: Product availabiity - order question  (Read 1545 times)

cvrak

  • Jr. Member
  • **
  • Posts: 95
  • A beginner
Product availabiity - order question
« 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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3731
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Product availabiity - order question
« Reply #1 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

cvrak

  • Jr. Member
  • **
  • Posts: 95
  • A beginner
Re: Product availabiity - order question
« Reply #2 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

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10431
  • VirtueMart Version: 3+
Re: Product availabiity - order question
« Reply #3 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));
         }