Page 1 of 2

Could not load template

Posted: Thu Mar 10, 2016 7:09 pm
by manojb05
Hi All

I am beginner in opencart using version 2.2.0.0. when i click the payment gateway (Payumoeny), I got a error, can you help for the same.
Notice: Error: Could not load template /home/domain/public_html/in/catalog/view/theme/default/template/default/template/payment/payu.tpl! in /home/domain/public_html/in/vqmod/vqcache/vq2-system_library_template_basic.php on line 26
http://prntscr.com/adfqaz

Regards

Manoj

Re: Could not load template

Posted: Thu Mar 10, 2016 7:19 pm
by Burt65
Could you provide a link to the extension you are using please..

Re: Could not load template

Posted: Thu Mar 10, 2016 7:24 pm
by manojb05
that error struggle with me 2days, i am deleted in my local server, please give me 15 mins. i will share with you. sorry for that

Re: Could not load template

Posted: Thu Mar 10, 2016 7:28 pm
by Burt65
No sorry, I meant a link to the extension in the OC shop. There is more than one, so I don't know which one you are using...

Re: Could not load template

Posted: Thu Mar 10, 2016 7:40 pm
by manojb05
thanks for your prompt reply, i say, i thought thats a bug, my entire website i deleted, its uploading not take more than 10 mins

Re: Could not load template

Posted: Thu Mar 10, 2016 7:45 pm
by Burt65
LOL...

I'm just trying to establish if you are using the correct extension version for the OpenCart you are using.

I don't need your site to be up and running...
Could not load template /home/domain/public_html/in/catalog/view/theme/default/template/default/template/payment/payu.tpl
If you are using the wrong version you may get this error...

Re: Could not load template

Posted: Thu Mar 10, 2016 7:50 pm
by manojb05
Payumoney provide a two bundle kit

1) PayUMoney_Opencart_Module_1.x.x.x
2) PayUMoney_Opencart_Module_2.x.x.x

I am using 2nd one
https://www.payumoney.com/websiteintegr ... footerlink

Re: Could not load template

Posted: Thu Mar 10, 2016 8:18 pm
by Burt65
Right.

PayUMoney_Opencart_Module_2.x.x.x is not compatible with Opencart 2.2.x.x

Don't worry is not a big deal. but you will need to contact PayUMoney here and let them know that you wish to have the Integration kit you are using upgraded for Opencart 2.2.x.x.

Cheers

Re: Could not load template

Posted: Tue Mar 22, 2016 7:08 pm
by mayanksethi
Hi manojb05,

Please have a look on the error again,
it says,
" Could not load template /home/domain/public_html/in/catalog/view/theme/default/template/default/template/payment/payu.tpl! in /home/domain/public_html/in/vqmod/vqcache/vq2-system_library_template_basic.php on line 26
you can see that default/template is repeating in the error whereas no such path exists. the right path would be
catalog/view/theme/default/template/payment/payu.tpl!

you can try this(this method is just to show you where the problem lies):-
1. In template folder make a new folder named default and in that folder make a new folder named template.
2. Now move the payments folder into new template folder from older one.
3. try to check out on the website, PayU extension will work. However, this method may change the path of other payment methods, they would stop working.

so the better way is to change the path in the error, rather than creating the path according to the error. and I dont know how to do that. Please let me know if some one knows how to change this.

Regards,
Mayank

Re: Could not load template

Posted: Wed May 18, 2016 3:42 am
by beebee
mayanksethi wrote:Hi manojb05,

Please have a look on the error again,
it says, " Could not load template /home/domain/public_html/in/catalog/view/theme/default/template/default/template/payment/payu.tpl! in /home/domain/public_html/in/vqmod/vqcache/vq2-system_library_template_basic.php on line 26

you can see that default/template is repeating in the error whereas no such path exists. the right path would be
catalog/view/theme/default/template/payment/payu.tpl!

you can try this(this method is just to show you where the problem lies):-
1. In template folder make a new folder named default and in that folder make a new folder named template.
2. Now move the payments folder into new template folder from older one.
3. try to check out on the website, PayU extension will work. However, this method may change the path of other payment methods, they would stop working.

so the better way is to change the path in the error, rather than creating the path according to the error. and I dont know how to do that. Please let me know if some one knows how to change this.

Regards,
Mayank
----------------------------

You are Right!!! It's the path that is incorrect, however, the PayUMoney Opencart 2.x.x.x Integration Document doesn't specify anything about it. Also, I couldn't find any other source on the website from where we can download for ver 2.2 :/

Re: Could not load template

Posted: Wed May 18, 2016 5:14 pm
by fido-x
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.

Re: Could not load template

Posted: Wed May 18, 2016 5:48 pm
by beebee
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.
YOU ARE THE BEST!!!
It worked! Now, the error is on the PayU page. I guess their demo is not working.
Thanks a ton!!

Do you have any thoughts on disabling the delivery method and auto applying the flat rate shipping?

Re: Could not load template

Posted: Wed May 18, 2016 6:00 pm
by fido-x
You'll probably find the same error in the admin component for this extension.

In admin/controller/payment/payu.php, find:

Code: Select all

$this->response->setOutput($this->load->view('payment/payu.tpl', $data));
and replace with:

Code: Select all

$this->response->setOutput($this->load->view('payment/payu', $data));
You will also need to check the links in that controller and replace 'SSL' (including the single quotes) with"true" (without the quotes), eg. replace:

Code: Select all

$this->response->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'],'SSL'));
with:

Code: Select all

$this->response->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'], true));
Also, move the language file to the new language folder.

Re: Could not load template

Posted: Wed May 18, 2016 6:14 pm
by beebee
Done!!
However, I couldn't find the path catalog/language/english/payment/payu.php but catalog/language/en-gb/payment/payu.php is intact.

Thanks again!

Re: Could not load template

Posted: Wed May 18, 2016 6:18 pm
by fido-x
I mean move the language file in the admin (ie. move admin/language/english/payment/payu.php to admin/language/en-gb/payment/payu.php).

Re: Could not load template

Posted: Tue May 31, 2016 11:29 pm
by pristinenote
A Big Thanks fido-x. It works! :)
A big thanks to beebee :))

Re: Could not load template

Posted: Thu Jun 09, 2016 4:15 am
by fesilva
Hello, I am having the same problem but with extension: https://www.opencart.com/index.php?rout ... _id=248630 (Image Color sWapping)
Error: /home1/domain/public_html/store/catalog/view/theme/default/template/default/template/product/product_svg.tpl! in /home1/ domain /public_html/store/vqmod/vqcache/vq2-system_library_template_basic.php on line 26
Any help is appreciated.

Thank you,
FS

Re: Could not load template

Posted: Fri Jun 10, 2016 10:49 am
by fido-x
Follow the instructions given above for the Payu payment method, just replace "payu" with "product_svg".

Re: Could not load template

Posted: Sun Jun 12, 2016 10:52 pm
by fesilva
@fido-x
Thank you, I try but it didn't work waiting for the developer.

Re: Could not load template

Posted: Tue Aug 09, 2016 7:55 am
by soft.anand
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.