Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8755891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:56:38+00:00 2026-06-13T13:56:38+00:00

I have set the following Code within WebController.php /** * Export order grid to

  • 0

I have set the following Code within WebController.php

/**
* Export order grid to CSV format
*/
public function exportCsvAction()
{
    $fileName = sprintf('stores-%s.csv', date('Ymd'));
    $grid = $this->getLayout()->createBlock('adminhtml/web_web_grid');
    $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
}

I don’t know what is the problem that causing CSV not to be exported.

Following error is showing –

Fatal error: Call to a member function getCsvFile() on a non-object in
/var/www/projects/tmp/storelocator/app/code/local/Company/Web/controllers/Adminhtml/WebController.php
on line 0

Please help!
Thanks in Advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:56:39+00:00Added an answer on June 13, 2026 at 1:56 pm

    This line :

    $grid = $this->getLayout()->createBlock('adminhtml/web_web_grid');
    

    returns null. The error tells you it clearly :

    Fatal error: Call to a member function getCsvFile() on a non-object

    Are you sure this ‘adminhtml/web_web_grid’ relates to a block ?

    Do you have a folder/file Web/Web/Grid.php in the Block folder of the adminhtml module ?

    For example, if you didn’t overload the Mage_Adminhtml module, you should have a class named Mage_Adminhtml_Block_Web_Web_Grid in the folder app/code/local/Mage/Adminhtml/Block/Web/Web/Grid.php that’s what the createBlock('adminhtml/web_web_grid') is searching for

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code $.post( /factory/set,{ key : value }, function(response) { });
I have the following code set up in my Startup IDictionary<string, string> properties =
I have following code in my application: // to set tip - photo in
I have the following code to set a userId variable: (userId set in prior
I have the following code: UPDATE myTable SET Col1 = @Value However, I have
I have the following code: private static final Set<String> allowedParameters; static { Set<String> tmpSet
I have the following code: DECLARE @testDate date --SET @testDate=dateadd(wk, 5830, 0) SET @testDate='2011-09-26
I have the following code in my batch file @ECHO OFF SET /P NAME=Enter
I have the following code that seems like it should set my insertParameter but
I have the following code: $SQL = UPDATE jobs SET read = '1' WHERE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.