Mage_Checkout_Controller_Action Class Reference

Inheritance diagram for Mage_Checkout_Controller_Action:

Mage_Core_Controller_Front_Action Mage_Core_Controller_Varien_Action Mage_Checkout_MultishippingController Mage_Checkout_OnepageController

List of all members.

Protected Member Functions

 _preDispatchValidateCustomer ($redirect=true, $addErrors=true)


Detailed Description

Controller for onepage and multishipping checkouts

Definition at line 31 of file Action.php.


Member Function Documentation

_preDispatchValidateCustomer ( redirect = true,
addErrors = true 
) [protected]

Make sure customer is valid, if logged in By default will add error messages and redirect to customer edit form

Parameters:
bool $redirect - stop dispatch and redirect?
bool $addErrors - add error messages?
Returns:
bool

Definition at line 41 of file Action.php.

00042     {
00043         $customer = Mage::getSingleton('customer/session')->getCustomer();
00044         if ($customer && $customer->getId()) {
00045             $validationResult = $customer->validate();
00046             if ((true !== $validationResult) && is_array($validationResult)) {
00047                 if ($addErrors) {
00048                     foreach ($validationResult as $error) {
00049                         Mage::getSingleton('customer/session')->addError($error);
00050                     }
00051                 }
00052                 if ($redirect) {
00053                     $this->_redirect('customer/account/edit');
00054                     $this->setFlag('', self::FLAG_NO_DISPATCH, true);
00055                 }
00056                 return false;
00057             }
00058         }
00059         return true;
00060     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:51 2009 for Magento by  doxygen 1.5.8