How to do a background check on the product id in OpenCart?

<button class="btn btn-info" type="button" <?php if ($this->config->get('mmr_common_addtocart_hide_enabled')&&$product['quantity']<1) { ?>disabled="disabled" <?php } ?>
 onclick="addToCart('<?php echo $product['product_id']; ?>');">

 <?php if ($this--->config->get('mmr_common_addtocart_hide_enabled')&&$product['quantity']<1) { ?>

 <?php echo $product['stock']; ?>

 <?php }
 else { ?>
 <span class="glyphicon icon-cart-btn"></span>
 <?php echo $product['manufacturer'] =='216' ? 'Order' : $button_cart; ?>
 <?php } ?>
 </button>

This code displays the "Buy" button in Opencart.
Need to do so if the product id = 2282 regardless of the number, instead of add to cart to go to a item card.
Aydishnikov of the same product.
I have troubles with the php syntax(
June 10th 19 at 15:55
1 answer
June 10th 19 at 15:57
Solution
One of the options:
<?php if($product['product_id'] != 2282): // if product_id !=2282 ?>
 <button class="btn btn-info" type="button" <?php if ($this->config->get('mmr_common_addtocart_hide_enabled') && $product['quantity'] < 1) { ?>disabled="disabled" <?php } ?>
 onclick="addToCart('<?php echo $product['product_id']; ?>');">

 <?php if ($this--->config->get('mmr_common_addtocart_hide_enabled') && $product['quantity'] < 1) { ?>

 <?php echo $product['stock']; ?>

 <?php } else { ?>
 <span class="glyphicon icon-cart-btn"></span>
 <?php echo $product['manufacturer'] == '216' ? 'Order' : $button_cart; ?>
 <?php } ?>
</button>
 <?php else : // if product_id ==2282 ?>
 <a href="<?php echo $product['href']; ?>" class="btn btn-info">In card</a>
 <?php endif; ?>

Find more questions by tags OpenCart