Addon With Custom Database Column. Column Showing As Null When It Has Value

We're currently developing an addon which adds a custom dropdown to the edit product page allowing the admin to state that a product is fresh. if the product is fresh certain shipping methods will be excluded.

when the addon is installed it adds a new column to the the product information database called is_fresh.

so far the dropdown on the product page works. selecting "yes" sets the value of is_fresh in the database to 1 for that product. I have then written the following script to add a "product is fresh" logo to the product page at the customer side.

{if $product.is_fresh}
always fresh

this goes into the template hook and it works absolutely fine.

The next step is to remove any shipping method unsuitable for fresh products at the checkout if there is a fresh product in the cart. For this I'm using the template hook to place my own code within the shipping section at the checkout.

I'm using the following code to test.

{foreach from=$group.products item="product"}


{if $product.is_fresh}



doesn't work

{/if} {/foreach}

Here it will successfully post the product name for each product in the basket but it shows the text "doesn't work" under each even when the product in the basket has the "is fresh" box ticked.

when you simply try to print the value of $product,is_fresh like so

{foreach from=$group.products item="product"}

nothing shows up at all as if the value of that column is null.

Does anyone know how I can fix this? Why does it work correctly on the product page but not at the checkout?