Page 1 of 1

opencart 2.1.0.2 Get order payment-city,address,country

Posted: Wed Dec 21, 2016 4:48 pm
by asparcilius
He all, Im implementing in oc 2 an invoice sistem.I have a problem when trying to get the order details.For example in the admin panel ---> view order(admin/view/template/sale/order_info.tpl), I inserted on the bottom of the page this code to generate the "payment city" <?php echo $payment_city; ?> and I'm getting this error Notice: Undefined variable: payment_city in.In oc 1.6 that code works ..

I checked the controller file and there seems to be these codes:

$data['payment_city'] = $order_info['payment_city'];
$data['payment_city'] = '';
'city' => $order_info['payment_city'],

Is there a way from the order to get the city,country etc..? In oc 2 all the order details for the location of the order are in one single function $payment_address; but i need payment_city,payment_country etc...

Re: opencart 2.1.0.2 Get order payment-city,address,country

Posted: Wed Dec 21, 2016 7:30 pm
by paulfeakins

Code: Select all

$data['payment_city'] = $order_info['payment_city'];
$data['payment_city'] = '';
Well you're setting payment_city and then immediately setting it to a blank string below, why are you doing that?

Re: opencart 2.1.0.2 Get order payment-city,address,country

Posted: Wed Dec 21, 2016 7:34 pm
by asparcilius
$data['payment_city'] = $order_info['payment_city'];
$data['payment_city'] = '';

This code in in the default opencart order.php admin controler....