Magento Forum

   
Intercept addAction for CartController with a from requesting additional info
 
rwired
Jr. Member
 
Total Posts:  4
Joined:  2008-09-09
 

In my custom module I can overload the addAction() controller for Checkout/CartController.php

<?php
require_once 'Mage/Checkout/controllers/CartController.php';
class 
Company_SpecialCheckout_Checkout_CartController extends Mage_Checkout_CartController
{
    
# Overloaded addAction
    
public function addAction()
    
{
        
# when user tries to add to cart, request images from them
        # *********
        # *** what do i do in here to display a custom block ???? ###
        # *** and allow addAction to continue only if successfully validated form input ###
        # *********

        
parent::addAction();
    
}
}

I need to have a custom form displayed and only if the customer successfully completes this form is the product added to the cart.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top