Save the sum to a file called sum, sorted
awk -F, '{a[$1]+=$3;}END{for (i in a)print i", "a[i];}' filename | sort > sum
cat sum
product_a, 515
product_b, 348
product_c, 495
product_d, 27
Join the two files, first column of first file with first column of second (think "keys"); pipe it to awk and print reordered columns, using , as field separator (-F) and as the Output Field Separator (-OFS)
join -t ',' -1 1 -2 1 filename sum | awk -F, -OFS=, {'print $1"$1," $4"$4," $2"$2," $3}'
product_a, 515, domestic, 500
product_a, 515, abroad, 15
product_b, 348, domestic, 313
product_b, 348, abroad, 35
product_c, 495, domestic, 411
product_c, 495, abroad, 84
product_d, 27, domestic, 25
product_d, 27, abroad, 2