<div class="summa"></div>
<div class="product1">
<div class="price">100</div>
<a data-id="633" class="buy-now" onclick="add(this)">Купить</a>
</div>
<div class="product2">
<div class="price">200</div>
<a data-id="632" class="buy-now" onclick="add(this)">Купить</a>
</div>
<script>
function add(elem) {
var res = document.getElementsByClassName('summa')[0],
price = parseInt(elem.parentElement.getElementsByClassName('price')[0].innerHTML),
sum = parseInt(res.innerHTML) | 0;
res.innerHTML = sum + price;
}
</script>