If one magazine costs $1, then 8 magazines cost 8*$1=$<<8*1=8>>8.
Let's define "x" as the cost of one chocolate bar.
The cost of four chocolate bars is equal to the cost of 8 magazines and 4*x=$8.
Dividing each side by 4, we get the cost of one chocolate bar x=$2.
Therefore, a dozen chocolate bars would cost 12*$2=$<<12*2=24>>24.
#### 24