VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Yaya27 on November 03, 2021, 10:35:50 AM

Title: Use several "Action when a Product is Out of Stock" depending of product
Post by: Yaya27 on November 03, 2021, 10:35:50 AM
Hi,

In our VM configuration, we selected this "Action when a Product is Out of Stock" : Products Out of Stock are orderable.

I wanted to find out if VirtueMart (even with an extension) allows to override this behavior by another for only few products or a category. For example stop the sale for few products in spite of the general setting.

Thanks for your help.
Title: Re: Use several "Action when a Product is Out of Stock" depending of product
Post by: pinochico on November 03, 2021, 11:18:47 AM
Add product to new category
Edit productdetail.php and add if/else

"If product is from the new category, don't call sub layout add to cart"

very easy end quickly.
Go on :)