Post by uki » Tue Sep 28, 2021 12:27 am

OC ver - 3.0.3.2
Showing a blank page without error on clicking generate "Print Shipping List" if required shipping is set to NO. How to get the dispatch note to show ....

uki
Newbie

Posts

Joined
Sun Aug 29, 2021 9:12 pm

Post by ADD Creative » Tue Sep 28, 2021 12:52 am

The order won't have a shipping method or shipping address. You would need to modify the function shipping() in admin/controller/sale/order.php to account for this.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by uki » Tue Sep 28, 2021 2:07 am

ADD Creative wrote:
Tue Sep 28, 2021 12:52 am
The order won't have a shipping method or shipping address. You would need to modify the function shipping() in admin/controller/sale/order.php to account for this.
tried to remove requirment of shipping still blank page
// Make sure there is a shipping method
if ($order_info && $order_info['']) {

uki
Newbie

Posts

Joined
Sun Aug 29, 2021 9:12 pm

Post by straightlight » Tue Sep 28, 2021 4:01 am

uki wrote:
Tue Sep 28, 2021 2:07 am
ADD Creative wrote:
Tue Sep 28, 2021 12:52 am
The order won't have a shipping method or shipping address. You would need to modify the function shipping() in admin/controller/sale/order.php to account for this.
tried to remove requirment of shipping still blank page
// Make sure there is a shipping method
if ($order_info && $order_info['']) {
Complete modifications. Error logs.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by ADD Creative » Tue Sep 28, 2021 5:01 am

uki wrote:
Tue Sep 28, 2021 2:07 am
ADD Creative wrote:
Tue Sep 28, 2021 12:52 am
The order won't have a shipping method or shipping address. You would need to modify the function shipping() in admin/controller/sale/order.php to account for this.
tried to remove requirment of shipping still blank page
// Make sure there is a shipping method
if ($order_info && $order_info['']) {
Would need to be.

Code: Select all

if ($order_info) {
But you will probably run into other errors.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Tue Sep 28, 2021 4:40 pm

In order to help you, we'd need more details, such as the extensions used, theme installed , the contents of your OpenCart error.log and the server's error log.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Tue Sep 28, 2021 6:45 pm

uki wrote:
Tue Sep 28, 2021 12:27 am
OC ver - 3.0.3.2
Showing a blank page without error on clicking generate "Print Shipping List" if required shipping is set to NO. How to get the dispatch note to show ....
Sounds like you should just pay a developer to sort this.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Gergely » Tue Sep 28, 2021 8:52 pm

As per ADD Creative:
ADD Creative wrote:
Tue Sep 28, 2021 5:01 am
Would need to be.

Code: Select all

if ($order_info) {
But you will probably run into other errors.
But you will definitely spam your error log with "Unidentified index" Notices this way.
You could separate the "&&" into nested conditionals:

Code: Select all

if($order_info) {
  if($order_info['shipping_code']) {
    //Do everything related to shipping here
  }
  //Do everything NOT related to shipping here
}
You would also need to add conditional controls to the template file (admin/view/template/sale/order_shipping.twig), so that the rendered Dispatch Note is not littered with empty tables and non-sensical labels.

If you find any of this a bit intimidating, or don't know how to carry out these changes responsibly, please consider going with paulfeakins' advice.

I hope this helps!
Last edited by Gergely on Tue Sep 28, 2021 9:11 pm, edited 1 time in total.

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by mikeinterserv » Tue Sep 28, 2021 8:55 pm

What do you want a despatch note for if there is NO despatch or shipping.
Doesn't make sense - No shipping, only invoice exists, so what's your aim with a despatch note.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales
Who is online

Users browsing this forum: Adminas99999 and 165 guests