I tried posting this in First Steps, but I after several days of no replies, I'm thinking that this board might be the place for this more advanced question.

In short, I want to change some text on my Log In screen based on whether the Shopping Cart is empty or not.

Based on Eric Leuenberger's excellent 20 Ways template pack, I've altered my Login screen to say "New Customer? Please start your checkout here." which, when the Shopping Cart has something in it, makes sense. But when the Shopping Cart is empty, then I'd be afraid it would be confusing for my shoppers, so I want to have some alternate text for when the shopping cart is empty.

I now have that:
define('HEADING_NEW_CUSTOMER', 'New Customer? Please start your checkout here.');
define('HEADING_NEW_CUSTOMER_2', 'New Customer? You can create an account here for faster Checkout.');
And here is how I've altered my tpl_login_default.php file (around line 67):

Code:
<?php echo zen_draw_form('create_account', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field('action', 'process') . zen_draw_hidden_field('email_pref_html', 'email_format'); ?>
<fieldset>
	  <php?
    if ($_SESSION['cart']->count_contents() > 0) {
<legend><?php echo HEADING_NEW_CUSTOMER; ?></legend>
	} else {
<legend><?php echo HEADING_NEW_CUSTOMER_2; ?></legend>
	}
	  ?>
Unfortunately, I'm getting this:



Can someone point me in the right direciton of making this work? Is it a PHP error? Am I not calling the Shopping Cart correctly?

If someone could help me with this, I would greatly appreciate it.

Thank you,

Alex