The problem you are having is that you are not using the Product's master_categories_id
I also changed the formula a bit to account for when 0 so that didn't need a lot of change, example for cards to work with 2 categories:
Code:
$cnt_cards = $_SESSION['cart']->in_cart_check('master_categories_id','17'); // 2009 Allen & Ginter Base Cards
$cnt_cards = $cnt_cards + $_SESSION['cart']->in_cart_check('master_categories_id','13'); // 2009 Topps Base Cards
$card_ship = ceil($cnt_cards/4) * .17;
$card_ship = ($card_ship == 0 ? 0.00 : $card_ship+ 1.05);
Based on your site, and that this is going to be a lot more categories than this method is easily used for, you may want to alter it somewhat ...
If you are not using the products_model then this field would be ideal to use:
cards
hotwheels
shoes
as the content of the products_models field ... then the checks can be done with:
Code:
$cnt_cards = $_SESSION['cart']->in_cart_check('products_model','cards');
Code:
$cnt_hotwheels = $_SESSION['cart']->in_cart_check('products_model','hotwheels');
Code:
$cnt_shoes = $_SESSION['cart']->in_cart_check('products_model','shoes');
Meanwhile, try the code as it is setup now with the changes I added to your site to see how this works ...