Edycja zamówienia: Could not execute query

Data zgłoszenia: 17 04 2011

Status: Rozwiazany

Wersja systemu: 1.1.2

Priorytet: Wysoki

Autor: Paweł Kowalczyk

W przypadku nie szyfrowanych danych klientów występuje następujący błąd podczas próby edycji zlecenia: Could not execute query [Native Error: Unknown column ‘OS.name’ in ‘field list’] [User Info: SELECT O.clientid, O.customeropinion, O.`adddate` as order_date, O.idorder as order_id, OS.idorderstatus as current_status_id, OS.name as current_status, O.dispatchmethodprice as delivererprice, O.dispatchmethodname as deliverername, O.dispatchmethodid, O.paymentmethodid, O.paymentmethodname as paymentname, O.price as vat_value, O.globalprice as total, O.globalqty, O.orderstatusid, O.currencyid, O.currencysymbol, O.currencyrate, O.rulescartid FROM `order` O LEFT JOIN orderstatus OS ON OS.idorderstatus=orderstatusid WHERE idorder=3] Patch na funkcję getOrderById z pliku plugin/admin/core/order/model/order.php rozwiązujący problem: --- ./plugin/admin/core/order/model/order.orginal.php 2011-03-30 21:40:02.000000000 +0200 +++ ./plugin/admin/core/order/model/order.php 2011-04-17 23:33:36.187599052 +0200 @@ -400,15 +400,17 @@ { $sql = “SELECT O.clientid, O.customeropinion, - O.`adddate` as order_date, O.idorder as order_id, OS.idorderstatus as current_status_id, OS.name as current_status, + O.`adddate` as order_date, O.idorder as order_id, OS.idorderstatus as current_status_id, OST.name as current_status, O.dispatchmethodprice as delivererprice, O.dispatchmethodname as deliverername, O.dispatchmethodid, O.paymentmethodid, O.paymentmethodname as paymentname, O.price as vat_value, O.globalprice as total, O.globalqty, O.orderstatusid, O.currencyid, O.currencysymbol, O.currencyrate, O.rulescartid FROM `order` O LEFT JOIN orderstatus OS ON OS.idorderstatus=orderstatusid + LEFT JOIN orderstatustranslation OST ON OS.idorderstatus = OST.orderstatusid AND OST.languageid = :languageid WHERE idorder=:id”; $stmt = $this->registry->db->prepareStatement($sql); $stmt->setInt(’id’, $id); + $stmt->setInt(’languageid’, Helper::getLanguageId()); $rs = $stmt->executeQuery(); $Data = Array(); if ($rs->first()){



Komentarze

Dodaj swój komentarz