How to use multiple case when pressing the button a few?

Good day, have a form sort on the website:
if(!empty($filter['sort'])) {
 switch ($filter['sort']) {
// Available
 case 'in_cat_stock':
 $order = "(SELECT 1 FROM __variants pv WHERE pv.product_id=p.id AND pv.price>0 AND (pv.stock>0) LIMIT 1) DESC";
break;

 case 'in_cat_stock_desc':
 $order = "(SELECT 1 FROM __variants pv WHERE pv.product_id=p.id AND pv.price>0 AND (pv.stock<0) LIMIT 1) DESC";
break;

 //With the discount 
 case 'in_cat_sale':
 $order = '(SELECT pv.compare_price-pv.price FROM __variants pv WHERE pv.product_id=p.id AND pv.price>0 AND pv.position=(SELECT MIN(position) FROM __variants WHERE product_id=p.id LIMIT 1) LIMIT 1) DESC';
break;

 case 'in_cat_sale_desc':
 $order = '(SELECT pv.compare_price-pv.price FROM __variants pv WHERE pv.product_id=p.id AND pv.price<0 AND pv.position=(SELECT MIN(position) FROM __variants WHERE product_id=p.id LIMIT 1) LIMIT 1) DESC';
break;
}
 }


There are 2 buttons on the website
Where:
The PRESENCE of
case 'in_cat_stock' - in stock
case 'in_cat_stock_desc' - knocks by default

DISCOUNT
case 'in_cat_sale' discount
case 'in_cat_sale_desc' - knocks by default
P5LPrsmCLK0SypNGTdkHqyBNCznpB8hGcJT1NKyT

They work individually, if you press "In stock", the button slips "discount" or Vice versa.
How to make them work together if you click on turn 2, they are 2 active?
April 3rd 20 at 17:29
0 answer

Find more questions by tags PHPSmarty