Oops. I forgot about products_t.tpl. Add the same code following these lines:
Code:
{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}
{section name=product loop=$products}
{assign var="discount" value=0}
The fields are assigned (I think) in the order you specify them in your upload or on your product edit page. The first one is [1] etc..