I have the message "Controller Not Found" when i try to see an order on my Prestashop Back-office.
The strange thing is that i have this error only on one order, and the others work correctly.
Do you have any idea ?
I'm on Prestashop 1.6.
Thanks a lot!
Please check that file AdminOrdersController.php is there at the following path of your PrestaShop directory:
/controllers/admin
If there is a file there then you can also check the permission for that file, it might be a permission issue.
Try deleting any closing php tags. That fixed my issue.
Thanks. I'm having the same issue.. I put that code in a controller file. I found out the issue in case. The issue was that I love code highlighting and often put <?PHP at the top of the blade views and the Controller (logic .php file).
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class JoeSearchController extends Controller
{
public function delete($id)
{
DB::table('user')->where('userID', '=', $id)->delete();
return redirect('history deleted');
}
}
Related
I have created a plugin. There is a backend listing form my plugin. so I have done this by using vue.js (https://developers.shopware.com/developers-guide/lightweight-backend-modules/)
There are no issues with the first plugin.
I have created another plugin. this plugin also has backend listing. I have created layout.tpl in my plugins _base folder.
But the problem is the 2nd plugin also loading the layout.tpl of the first plugin.
How to resolve this issue?
I have cleared the cache. But no hope.
Finally, I have fixed this issue by adding the following line of code in the backend controller.
$this->get('Template')->setTemplateDir([]);
--------Function------
public function preDispatch() {
$this->get('Template')->setTemplateDir([]);
$this->get('template')->addTemplateDir(__DIR__ . '/../../Resources/views/');
}
you should always "prefix" your views directory with an additional directory named like your plugin. Like this: Resources/views/backend/my_plugin_name/layout.tpl
With this you should not have the problem that one plugin uses the other plugins template file.
Best regards from Schöppingen
Michael Telgmann
Can someone help me with a file path problem I am experiencing with a custom Prestashop module 1.6 version?
The following works perfectly in a localhost environment:
return $this->display(__FILE__, '../../product-list.tpl');
however does not work on a live server. The following does work:
return $this->display(__FILE__, '../../themes/default-bootstrap/product-list.tpl');
which is not acceptable as some customers will not be using the default-bootstrap theme.
Any assistance with this problem will be appreciated.
Thanks
"$this->display" command has many dependencies on ModuleCore SO it's better to use include on custom tpl file:
return $this->display(__FILE__, 'views/templates/custom.tpl');
then on your custom.tpl :
{include file="$tpl_dir./product-list.tpl" products=$products}
When I call a class from a controller that uses Imagick it works just fine.
When I call the same class from a job it cannot find Imagick
using
$image = new \Imagick();
So not a namespace issue.
Any thoughts most welcome.
EDIT:
So this is a Mac/MAMP specific issue. Works on my production server so I am not so concerned. Both have Imagick extension installed. I suspect artisan listen is making php calls using the system version of php. I did check:phpversion() in my script and it is php 7.020 for both the controller and the job that has the issue. I can live with the mystery :)
Laravel Don't have own Imagick Class u can't use it be default if you have own class add on app/config.php aliases if you don't have i suggest use http://image.intervention.io/getting_started/installation for image convert or crop or anything u like
i have just installed opencart 2.3.0.2 and vqmod but i am facing a problem now. In previous version of opencart when i was using the below code in vqmod xml file
global $config;
$variableA = $config->get('field_value');
then in $variableA i got the value which i saved in the db from admin section but now in 2.3.0.2 when i use this code it shows fatal error
Fatal error: Call to a member function get() on null
please tell me how can i get the value in vqmod xml file so i can use this variable further
Thanks
Define the variable in a file controller first:
$data['variableA'] = $this->config->get('variableA');
then (for example) echo the variable in a view file:
<?php echo $variableA; ?>
Has anyone tried using this in a custom html module in joomla 3.3? Is there any reason why it wouldn't work? Can anyone share what they found works for this situation? Thank you in advance.
<script src="/jssor.slider.min.js"></script>
The reference path of 'jssor.slider.min.js' is invalid.
You will get '404 not found' error to access http://www.cyberfishmultimedia.com/jssor.slider.min.js