Page 2 of 2

Re: Could not load template

Posted: Tue Aug 09, 2016 8:52 am
by straightlight
soft.anand wrote:HI fido-x First of all thanks a lot...i had the same issue..and after following your steps its working now...but now the problem is at the time of checkout it goes to payumoney site aftersuccessful payment at the time of call back again its showing an error message
Could not load template /home/website/public_html/opencart/catalog/view/theme/default/template/default/template/payment/payu_success.tpl! in /home/website/public_html/opencart/system/storage/modification/system/library/template/basic.php on line 26
please help me to solve it.
Followed is a FAQ topic regarding the system/storage/modification folder error messages. The issue you're reporting is not related from the core but rather from an extension: http://forum.opencart.com/viewtopic.php ... 11#p630211

Re: Could not load template

Posted: Fri Aug 26, 2016 6:57 am
by HealthGeek
fido-x wrote:I don't know who built this extension, but I can tell you how to fix it.

In the controller (catalog/controller/payment/payu.php), find the following block of code:

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/payu.tpl')) {
 return $this->load->view($this->config->get('config_template') . '/template/payment/payu.tpl', $data);
} else {
 return $this->load->view('default/template/payment/payu.tpl', $data);
}
and replace with:

Code: Select all

return $this->load->view('payment/payu', $data);
You'll also need to move the language file from catalog/language/english/payment/payu.php to catalog/language/en-gb/payment/payu.php.
Thank you SO MUCH!!!
This helped me with my PayFast extension :-)
Many thanks!

Re: Could not load template

Posted: Sun Oct 09, 2016 11:45 pm
by parth.nimavat
All these code edits and change of files can cause any element of opencart stop from working.. :o

The easiest and harmless option to make PayUmoney integration work without affecting any element of opencart is using this extension.

This is the PayUmoney official integration kit i edited in order to make it work with all series of opencart 2.0.0.0, 2.0.1.0, 2.0.1.1, 2.0.2.0, 2.0.3.1, 2.1.0.1, 2.1.0.2, 2.2.0.0

http://www.opencart.com/index.php?route ... n_id=28137

Dont worry its free to download and use.

http://www.opencart.com/index.php?route ... n_id=28137

Thank me Later ;)

O0

Re: Could not load template

Posted: Thu Oct 13, 2016 11:35 am
by fido-x
parth.nimavat wrote:All these code edits and change of files can cause any element of opencart stop from working.. :o
Not so! All of the code edits provided in this thread are for 3rd party add-ons and have no impact on OpenCart core files.
parth.nimavat wrote:The easiest and harmless option to make PayUmoney integration work without affecting any element of opencart is using this extension.

This is the PayUmoney official integration kit i edited in order to make it work with all series of opencart 2.0.0.0, 2.0.1.0, 2.0.1.1, 2.0.2.0, 2.0.3.1, 2.1.0.1, 2.1.0.2, 2.2.0.0
The purpose of this thread was to fix a compatibility issue with a PayU payment extension that wasn't working with OpenCart 2.3.0.x.

The extension you mention (which you have just added to the extension store) will have exactly the same problems as those already mentioned as it is not compatible with OpenCart 2.3.0.x.

Re: Could not load template

Posted: Fri Oct 14, 2016 11:29 pm
by parth.nimavat
fido-x wrote: The extension you mention (which you have just added to the extension store) will have exactly the same problems as those already mentioned as it is not compatible with OpenCart 2.3.0.x.
Thanx fido-x for bringing this to attention ! but this extension is not compatible with opencart 2.3.x.x as it is mentioned you can successfully make it work on 2.0.0.0, 2.0.1.0, 2.0.1.1, 2.0.2.0, 2.0.3.1, 2.1.0.1, 2.1.0.2, 2.2.0.0 Unfortunately it cant work with any newer version.
As i encountered working issues with official kit provided by payumoney on my opencart 2.2.0.0 based site, i edited the integration kit to make it work. It is working great on my site, and there must be many people with the same problem so its open for everybody to download it and use it on their site.

Re: Could not load template

Posted: Sat Oct 15, 2016 10:06 am
by fido-x
I've had a look at your PayU extension. It won't work!

The folder structure you have provided is wrong AND there are also controllers, language files and template files from another payment method (paypoint) in the package which SHOULD NOT be there!

Re: Could not load template

Posted: Sat Oct 15, 2016 3:50 pm
by parth.nimavat
fido-x wrote:I've had a look at your PayU extension. It won't work!

The folder structure you have provided is wrong AND there are also controllers, language files and template files from another payment method (paypoint) in the package which SHOULD NOT be there!
It is there because of this vqmod error : http://www.image-share.com/upload/3344/45.jpg
and that time enabled payment gateway was only payumoney not paypoint.
other payment gateway file included in extension is default gateway provided with opencart installation.
the extension is free, im not charging anything, not even donation.
my site is running successfully with files provided in the extension that is why i uploaded it.

Re: Could not load template

Posted: Sat Oct 15, 2016 6:50 pm
by fido-x
parth.nimavat wrote:It is there because of this vqmod error : http://www.image-share.com/upload/3344/45.jpg
That error is the result of using deprecated code to load the template, which you still have in your extension, and is the same error that the OP was getting.
parth.nimavat wrote:other payment gateway file included in extension is default gateway provided with opencart installation.
Since the paypoint payment extension is already included, you should not need to re-include it in your package!
parth.nimavat wrote:my site is running successfully with files provided in the extension that is why i uploaded it.
It may be working for you, but I doubt that it would work for anyone else.

As I stated:
fido-x wrote:The folder structure you have provided is wrong ...
You have not set this up with the same folder structure that OpenCart uses. The admin controllers are in the wrong place and you've doubled up on the front-end template files.

Re: Could not load template

Posted: Sat Oct 15, 2016 7:43 pm
by parth.nimavat
fido-x wrote:Since the paypoint payment extension is already included, you should not need to re-include it in your package!
i added those because of making sure of it working !
fido-x wrote:It may be working for you, but I doubt that it would work for anyone else.
i use the same opencart as everyone else, so if it works for me, it should be working for other users as well
fido-x wrote:You have not set this up with the same folder structure that OpenCart uses. The admin controllers are in the wrong place and you've doubled up on the front-end template files.
you were right , i updated the file locations and re-uploaded the extension.
Doubling is meant to keep track of the original integration kit provided by payumoney. so either their way or my way, the extension should work.

http://www.opencart.com/index.php?route ... n_id=28137

Re: Could not load template

Posted: Sat Oct 15, 2016 8:49 pm
by fido-x
You still have deprecated code in the callback function in the front-end controller.

Code: Select all

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

Code: Select all

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

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/payu_failure.tpl')) {
	$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/payment/payu_failure.tpl', $data));
} else {
	$this->response->setOutput($this->load->view('default/template/payment/payu_failure.tpl', $data));
}
It is this code that is the root cause of the error message you posted in your image link.

If you change these to:

Code: Select all

$this->response->setOutput($this->load->view('payment/payu_success', $data));

Code: Select all

$this->response->setOutput($this->load->view('payment/payu_cancelled', $data));
and

Code: Select all

$this->response->setOutput($this->load->view('payment/payu_failure', $data));
respectively, you will not need to double up on the front-end template files.

Also, you should remove the paypoint stuff from your package.

Re: Could not load template

Posted: Sat Oct 15, 2016 10:50 pm
by parth.nimavat
i know. i tried that but then it showed error when tried to view order from the administration. so i changed it back to this..
i know it is not the admin file we're talking about here.. but my code works for me. thats all i can ask for.

Re: Could not load template

Posted: Sat Oct 15, 2016 11:01 pm
by OmerErdem
Hi Guys


Notice: Error: Could not load template /home/omererdem/public_html/mycarotoaksesuar.com/catalog/view/theme/default/template/common/footertop.tpl! in /home/omererdem/public_html/mycarotoaksesuar.com/system/library/template/php.php on line 23


I m having this notice?

Is anyone can help me pls ?

Re: Could not load template

Posted: Sun Oct 16, 2016 11:11 am
by fido-x
The extension from payumoney.com is not compatible with OpenCart version 2.x. It may "work", but it is not compatible. All they have done is take the version they did for OC 1.5.x and change:

Code: Select all

$this->data['some_value']
to

Code: Select all

$data['some_value']
And, there are inconsistencies in this, as there are still some "$this->data['some_value']" calls in the controller(s), which will cause errors.

There are other issues, for example, the breadcrumbs:

Code: Select all

$data['breadcrumbs'][] = array(
	'text'      => $this->language->get('text_home'),
	'href'      => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),
	'separator' => false
);
The "separator" is not used in OC 2.x and the link to the admin "home" page in the above breadcrumb will only result in a 404 Page Not Found error. The above breadcrumb, for compatibility with OC 2.0.x and 2.1.x should be:

Code: Select all

$data['breadcrumbs'][] = array(
	'text' => $this->language->get('text_home'),
	'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL')
);
And for compatibility with OC 2.2 and later, it should be:

Code: Select all

$data['breadcrumbs'][] = array(
	'text' => $this->language->get('text_home'),
	'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
);
Further issues involve the calling of paypoint template files in the front-end controller's callback function. There are probably a few other issues as well, all of which are present in your extension.

Frankly, I wouldn't use their extension in a production environment nor, for that matter, would I use (or recommend) yours, since it is based on theirs.

@OmerErdem
The error you are getting is most likely the result of similar issues to those that started this thread. You should be able to fix your problems using the same principles as those provided.

If you're not sure where to look, I would suggest getting in contact with the developer of the extension you are using that is causing the error.

Re: Could not load template

Posted: Fri Mar 24, 2017 8:09 pm
by bindashsandeep
I am using 2.3.0.2 and I am having the same issue. After successful transaction, it redirect to the bellow url and showing:

http://www.posakaworld.com/index.php?ro ... u/callback

The www.posakaworld . com page isn’t working
www.posakaworld . com is currently unable to handle this request.
HTTP ERROR 500


After I refresh the page it shows me the bellow errors.

Notice: Undefined index: unmappedstatus in /home/a6087dfb/posakaworld.com/catalog/controller/extension/payment/payu.php on line 267Notice: Undefined index: unmappedstatus in /home/a6087dfb/posakaworld.com/catalog/controller/extension/payment/payu.php on line 273Notice: Undefined index: unmappedstatus in /home/a6087dfb/posakaworld.com/catalog/controller/extension/payment/payu.php on line 277Notice: Undefined index: unmappedstatus in /home/a6087dfb/posakaworld.com/catalog/controller/extension/payment/payu.php on line 281Notice: Undefined index: unmappedstatus in /home/a6087dfb/posakaworld.com/catalog/controller/extension/payment/payu.php on line 285Notice: Undefined index: unmappedstatus in /home/a6087dfb/posakaworld.com/catalog/controller/extension/payment/payu.php on line 289

Can you please guide me to fix this :)

HealthGeek wrote:
Fri Aug 26, 2016 6:57 am
fido-x wrote:I don't know who built this extension, but I can tell you how to fix it.

In the controller (catalog/controller/payment/payu.php), find the following block of code:

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/payu.tpl')) {
 return $this->load->view($this->config->get('config_template') . '/template/payment/payu.tpl', $data);
} else {
 return $this->load->view('default/template/payment/payu.tpl', $data);
}
and replace with:

Code: Select all

return $this->load->view('payment/payu', $data);
You'll also need to move the language file from catalog/language/english/payment/payu.php to catalog/language/en-gb/payment/payu.php.
Thank you SO MUCH!!!
This helped me with my PayFast extension :-)
Many thanks!

Re: Could not load template

Posted: Fri Aug 04, 2017 11:18 pm
by Pchibuike
Please help, am experiencing same thing now after installing voguepay plugin at https://www.opencart.com/index.php?rout ... egory_id=3 , below is the error message appearing in my frontend:
Notice: Error: Could not load template /home/aim/public_html/catalog/view/theme/default/template/payment/voguepay.tpl! in /home/aim/public_html/system/modification/system/engine/loader.php on line 45 what exactly do i need to change therein?

Re: Could not load template

Posted: Sun Sep 24, 2017 4:39 pm
by tonkp