Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

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