Specifically, in my adminhtml Grid.php I created a $collection in _prepareCollection() by using the getSelect()->join() and it works great. I've merged several tables.
Now I want to create a custom column that includes a value based on sku. Lets call it product type. I would like to do something like this:
foreach($collection as $item): if($item->getSku() == 'fresh') $item->setData('product_material','Fresh'); else $item->setData('product_material','Not Fresh'); $item->save(); endforeach;
I have more complex logic to build the product material, but you should get the point. The fact I found no clue on how to do this also tells me I'm probably approaching this incorrectly. Is there a better way to do this or a place to handle this?
I don't want to store this in a table yet because we are still defining what inputs generate the material type.