Replace
$('#button-cart').bind('click', function() {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: $('.product-info.first input[type=\'text\'], .product-info.first input[type=\'hidden\'], .product-info.first input[type=\'radio\']:checked, .product-info.first input[type=\'checkbox\']:checked, .product-info.first select, .product-info.first textarea'),
to
addtocart2(pid) {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: $('#product-'+pid+' .product-info.first input[type=\'text\'], #product-'+pid+' .product-info.first input[type=\'hidden\'],#product-'+pid+' .product-info.first input[type=\'radio\']:checked, #product-'+pid+' .product-info.first input[type=\'checkbox\']:checked, #product-'+pid+' .product-info.first select,#product-'+pid+' .product-info.first textarea'),
And replace
<input type="button" value="Adauga in cos" id="button-cart" class="button" />
to
<input type="button" value="Adauga in cos" onclick="addtocart2(<?=$product_id ?>)" class="button" />
and in the end add html id to priduct-info div
<div class="product-info first">
replace to
<div class="product-info first" id="product-<?=$product_id?>">
I do not know how you do output,so $product_id may be changed to $product['product_id'] or $product2_id;