AbanteCart Community
AbanteCart Development => Customization help => Topic started by: Green on December 21, 2014, 01:14:42 AM
-
This is my new sample extension.I replicated the code of product-purchased for testing. When i run this code, "page not found " is what i get. I have went through the documentations of abantecart, but i don know how to resolve this problem.Please give any suggestions to resolve this.
-
Hello,remove the .php for the $controllers from main.php file so it become like this:
$controllers = array(
'storefront' => array(),
'admin' => array(
'pages/trial/trial',
'responses/trial/trial'));
The developer tools add .php to $controllers by default,so we need to remove it manually.
Hope it helps.
-
I dont know how to thank you... Thousands of thanks to you.... Its working.. :D :D :D :D :D :) :) :) :) .... But i dont get value in listing_grid?.. Could you please help me..
-
I suggest you to read abantecart code first before creating extension that utilize listing_grid,so you know the flow or else you will be stuck.I previously spend time to read the code before creating extension.Here's a hint for you.Learn from the product listing grid:
admin\controller\pages\catalog\product.php from line 61-84
admin\controller\responses\listing_grid\product.php
Hope it helps
-
Yeah..I found where the problem is.Very thanks for your time to reply.
if (is_file($dir_app . $path_build . '.php')) {
echo "<script> console.log('inside if')</script>";
//Set pure controller route
$this->controller = $path_build;
//Set full file path to controller
$this->file = $dir_app . $path_build . '.php';
echo "<script> console.log('file : $dir_app/$path_build ')</script>";
//Build Controller class name
$this->class = 'Controller' . preg_replace('/[^a-zA-Z0-9]/', '', $path_build);
array_shift($path_nodes);
$pathfound = true;
break;
}
here my pages/trial/trial.php is not taken as file,its taken as folder.I don know why.
-
My code is not coming into controller/responses/. where to find the problem?
-
My code is not coming into controller/responses/. where to find the problem?
What do you mean?
Response controller should be called directly from URL or dispatcher instance.
Make sure the name of the controller and path is correct, as well as class name inside of controller itself.