Re: Erro ao exibir e alterar pedido
Enviado: 02 Dez 2016, 10:09
por luisbacelli
luisbacelli escreveu:Manoel,
Estou com o mesmo problema e segui sua dica, porém, ao contrario... rsrs...
Vou explicar o que fiz:
Minha loja utiliza https. Verifiquei o banco e consta o store_url com https... imaginei que não iria estar, mas já estava. Troquei por http e acredite ou não, funcionou, mesmo minha loja estando em https. Não sei explicar o por que disso.
Agora que vem o outro problema, se minha loja está toda com https e o store_url também grava com https, o que tenho que fazer para resolver o problema.... ficar entrando no banco toda vez para substituir https para http, não vai rolar...
Acredito que resolvendo isso, servirá para os demais.
No aguardo.
Luis
Para resolver criei um arquivo e rodo a rotina para atualizar a tabela oc_order e de tempos em tempos eu rodo este arquivo num cron.
Dou um update trocando
https://minhaloja.com.br para
http://minhaloja.com.br e resolveu.
Sei que não é o 100% correto, mas foi a forma que encontrei pra sanar o meu problema. Fica a dica.
Valeu
Re: Erro ao exibir e alterar pedido
Enviado: 21 Dez 2016, 17:24
por vandersonolimpiaweb
Pessoal tive este mesmo problema hoje encontrei este passo a passo no fórum do Opencat e funcionou, sigam as dicas e após a alteração de um refresch no painel que funcionará: a versão que estou utilizando é a 2.2.0.0
This is how I patched mine to get around this error:
While editing orders in the adming, you'll get an error message like this when viewing an order.
Exception... "<no message>" nsresult: "0x805e0006 (<unknown>)" location: "JS frame ::
Looks like the API user tries to login via HTTP while the browser is in HTTPS
in admin/view/template/sale/order_info.tpl you'll find this line:
$.ajax({
url: '<?php echo $store_url; ?>index.php?route=api/login',
It shows that it's using a variable called '$store_url , which is defined in: admin/controller/sale/order.php
In admin/controller/sale/order.php Find this line:
$data['store_url'] = $order_info['store_url'];
You'll notice it pulls the url from the order, and not from your browsing context.
I'm not sure if I'm over riding some other functionality, but I added this:
$data['store_url'] = $order_info['store_url'];
# add the following
if( isset($_SERVER['HTTPS'] ) ) {
$data['store_url'] = str_replace('http://','https://',$data['store_url']);
}
It just checks if you're in SSL mode and swaps the http for https
When I did that everything started working.