I'm creating a custom module for Magento 1.9 to email cart items. Every time the controller is called (from any URL) it empties the cart, but every ensuing call works perfectly (maintain same session, add items to cart, and call controller works).

I've isolated the behavior to the IndexController which extends Mage_Core_Controller_Front_Action. Even in the simplified code below, the same behavior occurs, and I've verified that the session ID and the formKey are present. Am I extending the wrong class, or is there something else wrong in this structure?


class Custom_EmailCart_IndexController extends Mage_Core_Controller_Front_Action {

    public function indexAction() {

// Email



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.