Post by danijr » Tue Nov 07, 2017 8:14 pm

Hello friends, I would like to ask how can I add to a method custom fields? :)

Image

My code from controller payment method

Code: Select all

<?php
class ControllerExtensionPaymentLoan extends Controller {
	public function index() {
		$data['button_confirm'] = $this->language->get('button_confirm');

		$data['text_loading'] = $this->language->get('text_loading');

		$data['continue'] = $this->url->link('checkout/success');

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

	public function confirm() {
		if ($this->session->data['payment_method']['code'] == 'loan') {
			$this->load->model('checkout/order');

			$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('loan_order_status_id'));
		}
	}
}

New member

Posts

Joined
Fri Dec 02, 2016 10:28 pm

Post by Qphoria » Tue Nov 07, 2017 11:38 pm

You can purchase my Custom Payment Form mod as shown there:
https://www.opencart.com/index.php?rout ... n_id=25062

Or if you only need a single field, you could buy my cheaper Purchase Order mod which is effectively one field
https://www.opencart.com/index.php?rout ... n_id=22180

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by danijr » Wed Nov 08, 2017 1:54 am

Thank you very much
O0

New member

Posts

Joined
Fri Dec 02, 2016 10:28 pm
Who is online

Users browsing this forum: Mike Guenther and 92 guests