I made a little label program that displays a list or statuses for me.
Right now it only displays on status. The code is:
"order_status" => "16"
16 is my shipping label status in Opencart
I'm stuck trying to figure out how I add a and/or to that line.
I would like it display not only "16" but also "2" which is my confirmed order status.
Anybody a code wizard that can tell me how?
Right now it only displays on status. The code is:
"order_status" => "16"
16 is my shipping label status in Opencart
I'm stuck trying to figure out how I add a and/or to that line.
I would like it display not only "16" but also "2" which is my confirmed order status.
Anybody a code wizard that can tell me how?
Self Taught Opencart User & Developer Since 2010.
By using Events, that would be the quickest and easy to accomplish this. With the localisation/order_status/getOrderStatuses() , a list can be pulled from the models.
Wiki: https://github.com/opencart/opencart/wiki/Events-System .
However, since you've developed a label program, if it's external from Opencart, you could also rely on the External API from my repository: https://github.com/straightlight/openca ... upload/api .
Wiki: https://github.com/opencart/opencart/wiki/Events-System .
However, since you've developed a label program, if it's external from Opencart, you could also rely on the External API from my repository: https://github.com/straightlight/openca ... upload/api .
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thank you but no.
I'm just looking to edit that line. That's all.
I'm just looking to edit that line. That's all.
Self Taught Opencart User & Developer Since 2010.
What line?Rainforest wrote: ↑Tue Oct 20, 2020 10:07 pmThank you but no.
I'm just looking to edit that line. That's all.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I think you didn't read my original post
"Right now it only displays on status.
The code is:
order_status" => "16""
Self Taught Opencart User & Developer Since 2010.
Is that part of code to fill array ?
Like:
Code: Select all
$statuses[] = array(
"label" => "My label 16",
"order_status" => "16"
);
Like:
Code: Select all
if ($order_status_id == 16) then {
$statuses[] = array(
"label" => "My label 16",
"order_status" => "16"
);
}
Rainforest wrote: ↑Tue Oct 20, 2020 9:52 pmI would like it display not only "16" but also "2" which is my confirmed order status.
Code: Select all
if ($order_status_id == 16) then {
$statuses[] = array(
"label" => "My label 16",
"order_status" => "16"
);
} elseif ($order_status_id == 2) then {
$statuses[] = array(
"label" => "Confirmed",
"order_status" => "2"
);
}
Last edited by pprmkr on Wed Oct 21, 2020 7:47 pm, edited 1 time in total.
Yeah, I read it. It's just too vague.Rainforest wrote: ↑Wed Oct 21, 2020 6:31 pmI think you didn't read my original post
"Right now it only displays on status.
The code is:
order_status" => "16""
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The code needed to be updated. Simple fix
adding a comma
"16,20"
To look for two different statuses
adding a comma
"16,20"
To look for two different statuses
Self Taught Opencart User & Developer Since 2010.
Who is online
Users browsing this forum: No registered users and 16 guests