Jump to content

White page when I add action to controller in the form


Recommended Posts

I am writing a module and I am returning a view in the getContent method like this:

public function getContent()
		{
			return $this->display(__FILE__, 'views/templates/admin/product_crawler.tpl');
		}

the product_crawler.tpl file looks like this:

<form method="POST" action="{$this->context->link->getAdminLink('ProductCrawlerGet')}">
	<input type="text" name="url">
	<input type="submit">
</form>

and in /modules/product_crawler/controllers/admin/ folder I have a getproducts.php file which looks like this:

<?php 
	/**
	* 
	*/
	class ProductCrawlerGetController extends ModuleAdminControllerCore
	{
		
		public function postProcess()
		{
			if (Tools::isSubmit('url'))
	      	{
	          	// form processing
	          	return 'success';
	      	}
		}
	}
?>

and when I press the configure on the module it shows a blank page, and when I remove the action link it shows the form correctly

What am I doing wrong ?

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...