
Originally Posted by
Ajeh
If you go to the empty shopping_cart you will note that there isn't a link to checkout_shipping ...
If you empty your shopping_cart you will note that there isn't a link in the header for the checkout_shipping ...
If you have your shopping_cart sidebox always on ... you will note when empty that there isn't a link to checkout_shipping ...
This is the default out of the box behaviour but it is not always so. Some people have the checkout button always present and this was the case on the site I have just set up. The client wanted the checkout button always present so that the interface was consistent and buttons where not appearing and disappearing.
Assuming that an empty cart means the session timed out is not always a valid assumption, especially in a product that is meant to be configurable as Zen Cart is. Wouldn't it be better to explicitly check for a session timeout? Something like...
PHP Code:
// if the session has timed out then redirect the customer to the time out page
if (!isset($_SESSION['cart']))
zen_redirect(zen_href_link(FILENAME_TIME_OUT));
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($_SESSION['cart']->count_contents() == 0)
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
Regards,
Christian.