Post by svremeto » Tue Jul 09, 2019 8:27 pm

Hello! I`ve tried to copy the Bank Transfer Module.

I`ve followed the instructions written here on this topic:
viewtopic.php?t=6696
I`ve found those files in different places as i`m using 2032 version but i followed the same steps.
I`ve replaced all the places where there is "bank transfer" or "bank_transfer" with "payoneer transfer". But I receive this message when I`m trying to complete the checkout: http://prntscr.com/oclkek
Then i replaced also everywhere its written "bank" with "payoneer" in all the files, but still facing the same error.

For example in these places it was written:

Code: Select all

<button type="submit" form="form-bank-transfer" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>

<?php echo $entry_bank; ?>

$_['entry_bank']

$data['entry_bank'] = $this->language->get('entry_bank');
Could you please help me to handle that problem?

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by thekrotek » Tue Jul 09, 2019 8:55 pm

Nobody will help you, because screenshot you provided is not helpful at all. Check the error log and provide the actual error message.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by svremeto » Wed Jul 10, 2019 4:07 pm

Hi, Thank you for your answer and sorry for that. I didn't knew it.

I`ve found the errors:

Code: Select all

2019-07-09 11:44:41 - PHP Notice:  Undefined variable: token in /admin/view/template/extension/module/quickcheckout.tpl on line 812
2019-07-09 11:44:41 - PHP Notice:  Undefined variable: token in /admin/view/template/extension/module/quickcheckout.tpl on line 909
2019-07-09 11:51:39 - PHP Notice:  Undefined variable: token in /admin/view/template/extension/module/quickcheckout.tpl on line 812
2019-07-09 11:51:39 - PHP Notice:  Undefined variable: token in /admin/view/template/extension/module/quickcheckout.tpl on line 909
2019-07-09 12:27:56 - PHP Notice:  Undefined variable: token in /admin/view/template/extension/module/quickcheckout.tpl on line 812
2019-07-09 12:27:56 - PHP Notice:  Undefined variable: token in /admin/view/template/extension/module/quickcheckout.tpl on line 909
Line 812

Code: Select all

$('select[name=\'quickcheckout_field_country[default]\']').on('change', function() {
	$.ajax({
LINE 812--> url: 'index.php?route=extension/module/quickcheckout/country&token=<?php echo $token; ?>&country_id=' + this.value,
Line 909

Code: Select all

function store() {
LINE 909--> location = 'index.php?route=extension/module/quickcheckout&token=<?php echo $token; ?>&store_id=' + $('select[name=\'store_id\']').val();

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by kestas » Wed Jul 10, 2019 6:17 pm

you should define token in corresponding controller file..

Code: Select all

$data['token'] = $this->session->data['token'];

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by svremeto » Thu Jul 11, 2019 2:21 pm

kestas wrote:
Wed Jul 10, 2019 6:17 pm
you should define token in corresponding controller file..

Code: Select all

$data['token'] = $this->session->data['token'];
Thank you for your help! But could you please let me know if i should add this row to the file or i should change an already existing row?

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by kestas » Thu Jul 11, 2019 2:37 pm

svremeto wrote:
Thu Jul 11, 2019 2:21 pm
kestas wrote:
Wed Jul 10, 2019 6:17 pm
you should define token in corresponding controller file..

Code: Select all

$data['token'] = $this->session->data['token'];
Thank you for your help! But could you please let me know if i should add this row to the file or i should change an already existing row?
Which row exist? Where is it, in which place? I don't see your files, I can't help. But if you'll correctly define token, all should work.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by svremeto » Thu Jul 11, 2019 2:52 pm

kestas wrote:
Thu Jul 11, 2019 2:37 pm
svremeto wrote:
Thu Jul 11, 2019 2:21 pm
kestas wrote:
Wed Jul 10, 2019 6:17 pm
you should define token in corresponding controller file..

Code: Select all

$data['token'] = $this->session->data['token'];
Thank you for your help! But could you please let me know if i should add this row to the file or i should change an already existing row?
Which row exist? Where is it, in which place? I don't see your files, I can't help. But if you'll correctly define token, all should work.
I`ve found in the file /admin/view/template/extension/module/quickcheckout.tpl the word "token" only 4 times and they are on these lines - 812 and 909. Should I define the token in this file or I should look for another?

By the way, the other 2 checkouts, that I have, are working pretty well. The bank transfer (which I copied for the current that I have a problem with) is working fine also.

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by kestas » Thu Jul 11, 2019 3:21 pm

svremeto wrote:
Thu Jul 11, 2019 2:52 pm

I`ve found in the file /admin/view/template/extension/module/quickcheckout.tpl the word "token" only 4 times and they are on these lines - 812 and 909. Should I define the token in this file or I should look for another?
If you read my first post again you will find, that "you should define token in corresponding controller file.." So you should have in controller directory file with name quickcheckout.php and there you should define token.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by svremeto » Thu Jul 11, 2019 3:35 pm

kestas wrote:
Thu Jul 11, 2019 3:21 pm
svremeto wrote:
Thu Jul 11, 2019 2:52 pm

I`ve found in the file /admin/view/template/extension/module/quickcheckout.tpl the word "token" only 4 times and they are on these lines - 812 and 909. Should I define the token in this file or I should look for another?
If you read my first post again you will find, that "you should define token in corresponding controller file.." So you should have in controller directory file with name quickcheckout.php and there you should define token.
Thanks. I`ve found it and its written:

Code: Select all

    // Variable
    $data['token'] = $this->model_extension_d_opencart_patch_user->getToken();
I could change this with what you advise me but is there a possibility to crash the 2 checkouts that are working now?

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by kestas » Thu Jul 11, 2019 7:00 pm

svremeto wrote:
Thu Jul 11, 2019 3:35 pm
kestas wrote:
Thu Jul 11, 2019 3:21 pm
svremeto wrote:
Thu Jul 11, 2019 2:52 pm

I`ve found in the file /admin/view/template/extension/module/quickcheckout.tpl the word "token" only 4 times and they are on these lines - 812 and 909. Should I define the token in this file or I should look for another?
If you read my first post again you will find, that "you should define token in corresponding controller file.." So you should have in controller directory file with name quickcheckout.php and there you should define token.
Thanks. I`ve found it and its written:

Code: Select all

    // Variable
    $data['token'] = $this->model_extension_d_opencart_patch_user->getToken();
I could change this with what you advise me but is there a possibility to crash the 2 checkouts that are working now?
First your post about:
Hello! I`ve tried to copy the Bank Transfer Module
.

Next you talking about errors in quickcheckout.tpl.
I don't know why developers of quickcheckout module defining token in this way....

Code: Select all

 $data['token'] = $this->model_extension_d_opencart_patch_user->getToken();
Better if you ask them.
So please explain your problem consistently again.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by svremeto » Thu Jul 11, 2019 9:11 pm

kestas wrote:
Thu Jul 11, 2019 7:00 pm
First your post about:
Hello! I`ve tried to copy the Bank Transfer Module
.

Next you talking about errors in quickcheckout.tpl.
I don't know why developers of quickcheckout module defining token in this way....

Code: Select all

 $data['token'] = $this->model_extension_d_opencart_patch_user->getToken();
Better if you ask them.
So please explain your problem consistently again.
Yes. I copied the Bank Transfer module exactly according to the steps in the thread that I mentioned in my first post. But I am facing an unknown error. I cant complete the checkout. No redirecting happened and i should be redirected to the "Success Page".
So attached a screenshot of the error. Then the user called @thekrotek told me that no one can help me as I should show the error log.
So I attached the errors shown there. There was written that some error happened in the module "quickcheckout".
That's why I`m showing whats on the 812 and 909 lines of the file of the module "quickcheckout".
The Bank Transfer module is working properly but the copied module is not redirecting to the "Success Page".
Did I explain it better? Sorry for my English. I`m not a native English speaker.

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by kestas » Thu Jul 11, 2019 9:50 pm

This error you got in quickcheckout module , after you have installed your new copied module?

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by svremeto » Thu Jul 11, 2019 10:28 pm

Yes, exactly. But the error happened only for the new module. And the error happened also to the default opencart checkout.

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm

Post by kestas » Fri Jul 12, 2019 1:17 am

I have write PM. please read.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by johnp » Thu Jul 18, 2019 5:07 pm

You're probably better off using a custom payment module and creating your own. Personally I'm not a fan of copying core modules.

++ Quote OC10 for 10% off your first order ++
Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD 2.6.1 lover, user and geek.
Fast and Affordable Service for Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
https://www.asandwhenbusinessservices.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by svremeto » Thu Jul 18, 2019 7:24 pm

Problem solved thanks to @kestas . The problem was that i missed one letter when i was copying the module. Very stupid mistake... Thank you very much again!

New member

Posts

Joined
Tue Jul 28, 2015 11:46 pm
Who is online

Users browsing this forum: No registered users and 4 guests