Magento News

 

Help with Magento Custom Module. Redirect to another module and return to checkout

Magento shopping cart is built on the Zend Framework in PHP. This is the first time I’ve dealt with the Zend framework and I’m having the following difficulty…

I’m creating a custom module that will allow users to upload images whenever they purchase products.

I can overload the addAction() method whenever a user attempts to add a product to their cart. I can also create a custom module which presents the form to the user and accepts the file(s). However I’m not sure how to insert the code to run my module into my overloaded method:

<?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 suspect my difficulties come from my lack of knowledge of the Zend MVC way of doing things. I’ve studied all the Magento documentation/wikis/forum threads from top to bottom.

Help with Magento Custom Module. Redirect to another module and return to checkout

Possibly Related Posts:


 

Leave a Reply