Destination on Login for Phoenix Cart
=====================================
Version 1.0

This add-on gives a customer with items in their basket two clear choices after
they sign in: continue shopping or go directly to checkout.
The choice page also shows a compact preview of basket items, with thumbnails
and titles shortened to 34 characters for a tidy layout.

Compatibility
-------------

Designed for CE Phoenix Cart 1.1.0.6 and 1.1.0.7. The package uses Phoenix's
shop hooks and template system. It does not edit Phoenix core files and does not
add or change database tables.

Installation
------------

1. Make a backup of the files you are about to upload.
2. Upload the folders and files in this package to the root of your Phoenix
   Cart store, merging them with the existing includes and templates folders.
3. Sign out, add a product to the basket, and sign in again to test the choices.

The default page is installed in templates/default. If your store uses a
custom template that does not fall back to the default page template, copy
templates/default/includes/pages/choose_destination.php into the matching
templates/<your-template>/includes/pages/ directory.

How it works
------------

The site-wide hook marks a login form submission, then checks the restored cart
at Phoenix's early redirect hook. It sends signed-in customers with basket
items to choose_destination.php. Empty baskets keep Phoenix's normal login
redirect behaviour.

The choice page requires a signed-in customer and a non-empty basket. The
Continue shopping option returns to the store home page. The checkout option
opens checkout_shipping.php, where Phoenix continues its normal checkout flow.

Test checklist
--------------

- Sign in with items in the basket: the choice page appears.
- Select Continue shopping: the store home page opens and the basket remains.
- Sign in again and select Go to checkout: normal checkout begins.
- Sign in with an empty basket: Phoenix's usual post-login redirect remains.
- Submit an invalid login: the login error is shown and the choice page does
  not appear.
- Open choose_destination.php directly while signed out or with an empty
  basket: Phoenix redirects to login or the store home page as appropriate.

License
-------

Released under the GNU General Public License.
