Post by nabouill » Mon Jun 13, 2016 5:56 am

Hello,

I have developed a new page based on category.php and category.tpl, named categorySport.php and categorySport.tpl
This page is use for showing only sub categories about sport.

I call it with a link like:

Code: Select all

http://www.mysite.fr/index.php?route=product/categorySport&path=60
This work perfectly on my PC in local on a wamp server.
But when i test this on my website online, i have a white page with error:
PHP Notice: Error: Could not load template /home/mysite/www/catalog/view/theme/default/template/product/CategorySport.tpl! in /home/mysite/www/vqmod/vqcache/vq2-system_engine_loader.php on line 45
I dont understand, i have exactly the same files on local and on the server, i have clear the cache of opencart and vqmod, i have the same configuration and the same version of php on local and on the server (php 7)
I have reupload the files 2 times for be sure.

edit: say me if you want see my files.

Anyone have an idea please ?

Thank you in advance for your response.
Last edited by nabouill on Wed Jun 15, 2016 3:01 pm, edited 1 time in total.

opencart 2.0.1.1 fr
-vqmod


New member

Posts

Joined
Thu May 16, 2013 6:41 am

Post by IP_CAM » Mon Jun 13, 2016 6:45 am

you possibly should do such better without the Uppercase Characters, but it's just a wild guess...
CategorySport

Ernie
Last edited by IP_CAM on Wed Jun 15, 2016 6:42 am, edited 1 time in total.

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by fido-x » Mon Jun 13, 2016 10:42 am

nabouill wrote:I have developed a new page ... named categorySport.php and categorySport.tpl
...
This work perfectly on my PC in local on a wamp server.
But when i test this on my website online, i have a white page with error:
PHP Notice: Error: Could not load template /home/mysite/www/catalog/view/theme/default/template/product/CategorySport.tpl! in /home/mysite/www/vqmod/vqcache/vq2-system_engine_loader.php on line 45
I dont understand, i have exactly the same files on local and on the server, i have clear the cache of opencart and vqmod, i have the same configuration and the same version of php on local and on the server (php 7)
I have reupload the files 2 times for be sure.
You named your files categorySport, yet you are calling them with CategorySport (note the capitalisation).

Windows does not differentiate between upper case and lower case letters. As far as Windows is concerned, the are the same, which is why it works on your PC in a local wampp server.

However, Linux (the operating system used on the server) does differentiate. To a Linux installation, upper case and lower case letters are different characters.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by nabouill » Wed Jun 15, 2016 5:24 am

Exactly ! thank you very much for your response, i have find my error, in my file "categorySport.php"

Code: Select all

<?php
class ControllerProductCategorySport extends Controller {
	public function index() {

.....

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/CategorySport.tpl')) {
$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/CategorySport.tpl', $data));
} else { $this->response->setOutput($this->load->view('default/template/product/CategorySport.tpl', $data));

.....

}
Just remplace 'CategorySport.tpl' by 'categorySport.tpl' and it's work fine.

Thanks again.

opencart 2.0.1.1 fr
-vqmod


New member

Posts

Joined
Thu May 16, 2013 6:41 am
Who is online

Users browsing this forum: No registered users and 3 guests