Thanks
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Not mentioned on your first post. Then, contact the extension developer to resolved this issue.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I can update status via extention... Below the code I can add
Code: Select all
if($order['order_status_id'] == 5)
Code: Select all
$ch = curl_init();
$headers = array(
'Accept: application/json',
'Content-Type: application/json',
);
curl_setopt($ch, CURLOPT_URL, $order['tracking_url']);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HEADER, 0);
$body = '{}';
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$authToken = curl_exec($ch);
if(strpos($authToken, "Teslim Edildi")!=0){
strpos($authToken, "Teslim Edildi");
$konum = strpos($authToken, "Teslim Edildi");
$konumfark = $konum +13;
$konum2 = strpos($authToken, "Teslim Edildi",$konumfark);
$fark = $konum2-$konum-13;
$teslimat = substr($authToken,$konumfark,$fark);
echo "Teslim edildi";
}
else {
echo $order['tracking_no'];
} ?></a></td><?php } ?
serkanc wrote: ↑Mon Mar 11, 2019 7:32 pmThis is not the issue of this extention. I added the lines below to order_list.tpl. It checks the carrier shipping information, if the packaged delivered. If it's delivered than It writes instead of tracking number, "Delivered"... I want also update the status from Shipped to Delivered...
I can update status via extention... Below the code I can addto update the order_status_id to 11....Code: Select all
if($order['order_status_id'] == 5)
Code: Select all
$ch = curl_init(); $headers = array( 'Accept: application/json', 'Content-Type: application/json', ); curl_setopt($ch, CURLOPT_URL, $order['tracking_url']); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HEADER, 0); $body = '{}'; curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_POSTFIELDS,$body); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 30); $authToken = curl_exec($ch); if(strpos($authToken, "Teslim Edildi")!=0){ strpos($authToken, "Teslim Edildi"); $konum = strpos($authToken, "Teslim Edildi"); $konumfark = $konum +13; $konum2 = strpos($authToken, "Teslim Edildi",$konumfark); $fark = $konum2-$konum-13; $teslimat = substr($authToken,$konumfark,$fark); echo "Teslim edildi"; } else { echo $order['tracking_no']; } ?></a></td><?php } ?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Absolutely, here: viewforum.php?f=88Pls paste me the topic related to my question...
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I might want to alter the orders page format, adding a segment, however I can't discover the tpl document. Could somebody help me?serkanc wrote: ↑Sat Mar 09, 2019 9:33 pmI have made a script, which checks the status of the tracking code of orders on order list page and if it's delivered I can write instead of tracking number, "delivered". I want also change the status shipped to completed, but I cannot access addOrderHistory function. I looked at the order_info.tpl ajax codes ( I have no knowledge about ajax ) I have to put a button. Is there any other way to use the function in order_list.tpl telldunkin.
Thanks
The solution has been provided above.Arnold626 wrote: ↑Wed Apr 14, 2021 12:13 pmI might want to alter the orders page format, adding a segment, however I can't discover the tpl document. Could somebody help me?serkanc wrote: ↑Sat Mar 09, 2019 9:33 pmI have made a script, which checks the status of the tracking code of orders on order list page and if it's delivered I can write instead of tracking number, "delivered". I want also change the status shipped to completed, but I cannot access addOrderHistory function. I looked at the order_info.tpl ajax codes ( I have no knowledge about ajax ) I have to put a button. Is there any other way to use the function in order_list.tpl.
Thanks
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "order_history SET order_id = '" . (int)$order_id . "', order_status_id = '" . (int)$order_status_id . "', notify = '" . (int)$notify . "', comment = '" . $this->db->escape($comment) . "', tracking_number = '" . $this->db->escape($tracking_number) . "', date_added = NOW()");
Users browsing this forum: No registered users and 3 guests