thelia/thelia — pull request #983 by roadster31 (2014-12-09 23:43:47+00:00)
Title: A PR dedicated to order statuses, and specially PAID, plus minor fixes and enhancements

This PR fixes #980. This is not a perfect fix, as a module may add one or more OrderStatus that implies the order is paid, but this is enough to solve the problem at the moment.

The order loop returns five new variables: HAS_PAID_STATUS, IS_PAID, IS_CANCELED, IS_NOT_PAID, IS_SENT and IS_PROCESSING, to allow a safe processing of order status ($STATUS > 2 is not safe, but so Thelia 1 :metal: )

BaseController::generateOrderPdf() throws an exception instead of returning null, to display an error page in front office instead of redirecting to index page if an error occurs.

Various CS and comment fixes while beeing around.