Post by HAO » Sat Jul 28, 2018 12:35 am

How to change the path for Journal2 (Oen-Page Checkout)

My payment module is not working in Journal2 (Oen-Page Checkout), According to the developer's answer.

Payment module & Shipping module, Must be compatible with the following path:

Code: Select all

catalog/controller/journal2/checkout.php
catalog/view/theme/journal2/template/journal2/checkout/
But my payment module can only work in the following path:

Code: Select all

catalog/controller/checkout
catalog/view/theme/journal2/template/checkout
Even if I complete the change in the tpl file, But the following error message will still appear:

Code: Select all

Notice: Undefined variable: ecpay_isCollection in /home/*.*/public_html/catalog/controller/extension/module/ecpay_input.php on line 2
Excuse me, How do I change the path, let my Journal2 (Oen-Page Checkout) work properly?

My payment module download link:
https://github.com/ECPay/OpenCart2.3_Payment/releases

The Journal2 version I am using: JOURNAL_2.16.8

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by xxvirusxx » Sat Jul 28, 2018 3:06 pm

Edit Vqmod file, and try to change this:

Code: Select all

<file name="catalog/view/theme/*/template/checkout/payment_method.tpl">
with this:

Code: Select all

<file name="catalog/view/theme/*/template/journal2/checkout/payment_method.tpl">
LE. You use oc 2.3.0.2? because you posted in opencart 1.5 forum.

LE2. From catalog/controller/extension/payment/ecpay.php

Replace this:

Code: Select all

        // Get the template
        $config_template = $this->config->get('config_template');
        if (file_exists(DIR_TEMPLATE . $config_template)) {
            $payment_template = $config_template;
        } else {
            $payment_template = 'default';
        }
        $payment_template .= '/extension/payment/' . $this->model_name . '.tpl';
        
        return $this->load->view($payment_template, $data);
With this

Code: Select all

return $this->load->view('extension/payment/ecpay', $data);

Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO

Post by HAO » Sat Jul 28, 2018 5:14 pm

Sorry, I found posting a mistake.

My version is: 2. 3. 0. 2

I complete the change according to your steps, But the problem still exists.

I think it should be that other files still use the path:

Code: Select all

catalog/controller/checkout
Can you help me confirm what is the problem?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by xxvirusxx » Sat Jul 28, 2018 7:15 pm

HAO wrote:
Sat Jul 28, 2018 5:14 pm
Sorry, I found posting a mistake.

My version is: 2. 3. 0. 2

I complete the change according to your steps, But the problem still exists.
So what is the problem?

Not show on journal 2 quick checkout?

Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO

Post by HAO » Sat Jul 28, 2018 7:58 pm

Based on original content:

Code: Select all

   <file name="catalog/controller/checkout/payment_method.php">
       <operation info="payment info input">
           <search position="after"><![CDATA[
           model_extension_extension->getExtensions('payment');
           ]]></search>
           <add><![CDATA[
           include_once("catalog/controller/extension/module/ecpay.php");
           ]]></add>
       </operation>
   </file>
The complete source code would be like this:

Code: Select all

			// Payment Methods
			$method_data = array();

			$this->load->model('extension/extension');

			$results = $this->model_extension_extension->getExtensions('payment');
			include_once("catalog/controller/extension/module/ecpay.php");

			$recurring = $this->cart->hasRecurringProducts();

			foreach ($results as $result) {
				if ($this->config->get($result['code'] . '_status')) {
					$this->load->model('extension/payment/' . $result['code']);

					$method = $this->{'model_extension_payment_' . $result['code']}->getMethod($this->session->data['payment_address'], $total);

					if ($method) {
						if ($recurring) {
							if (property_exists($this->{'model_extension_payment_' . $result['code']}, 'recurringPayments') && $this->{'model_extension_payment_' . $result['code']}->recurringPayments()) {
								$method_data[$result['code']] = $method;
							}
						} else {
							$method_data[$result['code']] = $method;
						}
					}
				}
			}
I think it will be to complete the change in this file:

Code: Select all

catalog/controller/journal2/checkout.php
Can you confirm for me?

Attachments

JOURNAL_2.16.8 Original file.


HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by xxvirusxx » Sat Jul 28, 2018 9:03 pm

You don`t have payment_method.php in catalog/controller/journal2/checkout, so will be only

Code: Select all

<file name="catalog/controller/checkout/payment_method.php">
Better is to ask journal support :)

Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO

Post by HAO » Sun Jul 29, 2018 5:57 am

Unfortunately, Journal is unable to provide technical support.

Because this is a third-party customized service, Journal cannot provide.

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by straightlight » Sun Jul 29, 2018 7:08 pm

If their contact support is unable to provide the solution to your request, create a new service request in the Commercial Support section of the forum to get this done as a custom job.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 2 guests