Should probably put the print after computing the fallbacks for the plan_id and plan_quantity, so we see what is actually getting set